Posted by Daniel Longest on April 08, 2001 at 22:14:22:
In Reply to: Re: Creature interactions posted by Matt Green on April 08, 2001 at 21:19:31:
It depends on how your inheritance hierachy is set up. Also remember the spec says you can have a list of plants and list of animals, that might help you in some way, although it's not totally necessary.
Daniel
: Yeah I know, but I don't see how the creatures can interact with each other if they don't know what they are. Like if a grendel moves into a spot with a plant, he's not going to eat the plant. With abstract classes, I don't see a way to ascertain what kind of object is in the square...e.g. is making a virtual function in your creature class called something like isAnimal legal? It seems necessary for helping inter-creature relations.
: Matt