[Tutor] exercise with classes
rhettnaxel at gmail.com
Thu Feb 2 23:23:46 CET 2012
On Feb 2, 2012, at 12:36, Tonu Mikk <tmikk at umn.edu> wrote:
> I feel stumped and don't know how to go about creating this game with two classes.
> So far I have searched for info on how to pass variables from one class to another and have been able to create a small two class program (attached).
> Thank you,
I'm fairly certain that your second class is missing the most important function of a class, the __init__ function! It's necessary to initialize the object. Add it to your second class and see how it changes things.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor