View Single Post
Old 06-13-2007, 05:41 PM   #2 (permalink)
jaeusm
 
Software Developer

Join Date: Mar 2006

Location: Columbus, OH

Posts: 569

jaeusm is on a distinguished road

Default Re: Help with objects in Java

You should have a game manager class that will host the game, instantiate player/robot objects, and be responsible for starting and stopping games. As long as each robot object publicly exposes its attack number, the game manager class (or subsystem) should have no problem determining the winner. Maybe each robot should send a message to the game manager when its attack number changes. You'll have to decide what design you like best, but you should use a third party (game manager) to keep track of (or monitor) attack numbers.
jaeusm is offline