anonymous
  • anonymous
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
MIT 6.189 A Gentle Introduction to Programming Using Python (OCW)
schrodinger
  • schrodinger
See more answers at brainly.com
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this
and thousands of other questions

anonymous
  • anonymous
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)

Looking for something else?

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