June 23, 2010 Leave a comment
There are two more classes that act as Engine: Player and ElefantHunt.
‘Player class’ is a blue print that represents a player. So it contains each and every attribute that normal player would have. For example, there are points (score obtained), position (position on the map), supplies (something to feed the hired hunters), name, and capturedAnimals (ArrayList that contains a list of Animal objects). Other than its attributes, it also contains behaviors (methods) necessary to control those attributes.
‘ElefantHunt class’ manages the whole flow of the game. It’s a place where every class meets together and cooperate. It has GUI related objects, information on map, information on players playing the game, # of supplies existing on the port and information on Hunter and Animals. As there are a number of attributes and behaviors in this class, I recommend you to check the source codes distributed with the game if interested.