[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Initializing and Reinitializing Instance variables



Irv Kalb wrote:
I hadn't thought of the extra "Session" object, it sounds like an interesting
approach.  However, I'm looking for a clear solution that I can teach to
students who are just learning about OOP.

Don't think of it as an extra session object, rather think
of it as creating a new Game object for each game. I think
that's actually a clearer and more OO way to approach the
problem than trying to clear out and re-use an existing
object.

--
Greg