[Implementation] Elefant Hunt – Player, ElefantHunt

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.

Advertisements

About Wonjohn Choi
Hello, I am a software developer Wonjohn Choi. I live in Mississauga, Ontario, Canada and study at a school called St. Francis Xavier Secondary School. My core interests include Math, Computer Science, and Engineering. Thank you.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: