On Feb 8, 2008 4:46 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > bhaaluu wrote: > > > It also cleaned up main(), and put everything in well defined packages > > at the top of the program. > > Yes, good OOD puts things into cohesive, comprehensible packages. > > > I can see do difference in "game play". 8^D > > And that's a good thing, right? > > "Refactoring is the process of changing a software system in such a way > that it does not alter the external behavior of the code yet improves > its internal structure." -- Martin Fowler in Refactoring > > The refactoring you just did is called Extract Method: > http://www.refactoring.com/catalog/extractMethod.html > > Kent >
This is something that one can only gain from experience? I really had to struggle to get the Light class to work at all. I have no idea how many times I started over. But I do feel that I am starting to learn some of this stuff. As "simple" as the adventure game is, I can see that it will provide lots of practice for me to design and code it in Python OOP. Thanks Kent! -- b h a a l u u at g m a i l dot c o m "You assist an evil system most effectively by obeying its orders and decrees. An evil system never deserves such allegiance. Allegiance to it means partaking of the evil. A good person will resist an evil system with his or her whole soul." [Mahatma Gandhi] _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
