com.antelmann.game
Class MoveTemplate
java.lang.Object
com.antelmann.game.MoveTemplate
- All Implemented Interfaces:
- GameMove, Serializable
public class MoveTemplate
- extends Object
- implements GameMove
MoveTemplate just provides a skeleton implementation for
the GameMove interface, so you can focus soley on
the game specific properties of the GameMove.
Move specific distingtions - other than the player role -
have to be specified by a subclass. If the only distingtion
for a move in a game is who plays the move, however, instances
of this class will in fact be sufficient for use in that game.
- Author:
- Holger Antelmann
- See Also:
GameMove,
GamePlay,
Serialized Form
|
Field Summary |
protected int |
player
|
player
protected int player
MoveTemplate
public MoveTemplate(int player)
getPlayer
public int getPlayer()
- Description copied from interface:
GameMove
- returns the game player role that plays this move
- Specified by:
getPlayer in interface GameMove
- See Also:
GamePlay.numberOfPlayers()
toString
public String toString()
- Overrides:
toString in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads