in reply to Re: Re: Daft text adventure project
in thread Daft text adventure project
And obviously, if the PCs and the monsters were both subtypes of the same class, they could presumably possess the same movement routine, called in different ways. I think
Actually the way it would work would be that they would both inherit from a common class (prototype critter?) and therefore would be called the same way, via say the hypothetical "move" method. But, you would override the move method to make it function differently depending on the type of NPC or to add an interface for the PC's. But you would still call it by the same method name. i.e. move
Wait! This isn't a Parachute, this is a Backpack!
In Section
Seekers of Perl Wisdom