anonymous
  • anonymous
Iam working on the final project. Having trouble with draw current shape in Tetris __init__ method. If anyone can help Iam totaly lost. My ramdom shape is returned to self.current_shape but I can't draw it on the tetris board.
MIT 6.189 A Gentle Introduction to Programming Using Python (OCW)
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
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.
katieb
  • katieb
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
KonradZuse
  • KonradZuse
post code, and errors, etc.
anonymous
  • anonymous
This is the code to draw shape: self.current_shape.draw(self.win) This is the error message: Traceback (most recent call last): File "C:\Python25\tetris_template.py", line 518, in game = Tetris(win) File "C:\Python25\tetris_template.py", line 434, in __init__ self.current_shape.draw(self.win) File "C:\Python25\tetris_template.py", line 96, in draw block.draw(win) File "C:\Python25\graphics.py", line 363, in draw if canvas_frame.isClosed(): raise GraphicsError, "Can't draw to closed window" File "C:\Python25\lib\lib-tk\Tkinter.py", line 1732, in __getattr__ return getattr(self.tk, attr) AttributeError: isClosed
KonradZuse
  • KonradZuse
hmmm stll no idea, we need code examples.

Looking for something else?

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

More answers

KonradZuse
  • KonradZuse
look at the lines and see where your error is.
rsmith6559
  • rsmith6559
Looks to me like your window isn't open.
anonymous
  • anonymous
How do you open the window
KonradZuse
  • KonradZuse
It cannot be that hard. I could make a tetris game in Java. I wouldn't give up, keep at it. Window is probably the top level container like a JFrame. Then you put the Canvas like an AWT canvas then the rest of your components go on that. You're also giving up without showing us your code to help you. You expect us to know your issue without meeting us at least half way.
anonymous
  • anonymous
Thanks it wasn't hard. I over think things way to much. THANK YOU MUCH FOR SAYING NOT TO GIVE UP.
KonradZuse
  • KonradZuse
it happens, sometimes you burn yourself out and need to put it down for the day/week etc. Sometimes picking up a new project also helps. Giving up on something you spent time on is no fun. glad you fixed it, sorry I wasn't able to help you with the code.. i'm not a python user.

Looking for something else?

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