games.strategy.common.player
Class AbstractBasePlayer
java.lang.Object
games.strategy.common.player.AbstractBasePlayer
- All Implemented Interfaces:
- IGamePlayer
- Direct Known Subclasses:
- AbstractBaseAI, AbstractHumanPlayer
public abstract class AbstractBasePlayer
- extends java.lang.Object
- implements IGamePlayer
- Author:
- Lane Schwartz
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_name
protected final java.lang.String m_name
m_id
protected PlayerID m_id
m_bridge
protected IPlayerBridge m_bridge
AbstractBasePlayer
public AbstractBasePlayer(java.lang.String name)
- Parameters:
name - - the name of the player.
initialize
public void initialize(IPlayerBridge bridge,
PlayerID id)
- Description copied from interface:
IGamePlayer
- Called before the game starts.
- Specified by:
initialize in interface IGamePlayer
getGameData
protected final GameData getGameData()
- Get the GameData for the game.
getPlayerBridge
protected final IPlayerBridge getPlayerBridge()
- Get the IPlayerBridge for this game player.
getName
public final java.lang.String getName()
- Specified by:
getName in interface IGamePlayer
- Returns:
- the name of the game player
getID
public final PlayerID getID()
- Specified by:
getID in interface IGamePlayer
- Returns:
- the id of this player. This id is initialized by the initialize method.
start
public abstract void start(java.lang.String stepName)
- The given phase has started. We parse the phase name and call the apropiate method.
- Specified by:
start in interface IGamePlayer