Quantcast

A community for students. Sign up today!

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

edjuradob

  • 2 years ago

I'm having trouble with the tetrominoes. I have created all of the shapes and i can draw all of them separatelly, but when i try to draw 2 or more, i get the following error: GraphicsError: Object currently drawn i've tried with the for loop given in the example and also i've tried this: new_win=GraphWin('Tetrominoes',900,150) tetrominoes=[I_Shape,J_Shape,L_Shape,O_Shape,S_Shape,T_Shape,Z_Shape] x=3 shape=I_Shape(Point(x,1)) shape2=J_Shape(Point(x+4,4)) shape2.draw(new_win) shape.draw(new_win) new_win.mainloop() and i keep getting the same error. Help please

  • This Question is Closed
  1. edjuradob
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    i've made it work, i can't use the same window twice, so, first have to define all the shapes and then draw them in the window. The code in the example doesn't work: for tetromino in tetrominoes: shape = tetromino(Point(x, 1)) shape.draw(win) x += 4 i made it work with the following changes: for tetromino in tetrominoes: shape=tetromino(Point(x,1)) print tetromino x+=4 shape.draw(new_win)

  2. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Ask a Question
Find more explanations on OpenStudy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.