de.spieleck.game.base
Class GameStateBase

java.lang.Object
  |
  +--de.spieleck.game.base.GameStateBase
All Implemented Interfaces:
GameBean, GamePersist, GameState, PlayerCollection, ReadablePlayerCollection, java.io.Serializable, VisibleGameState
Direct Known Subclasses:
NumfieldState

public abstract class GameStateBase
extends java.lang.Object
implements GameState

Interface a GameTable, i.e. a virtual place, where some players play a game.

See Also:
Serialized Form

Constructor Summary
GameStateBase()
           
 
Method Summary
 GameRule getGameRule()
          VisibleGameState API.
 GameRuleCustomizer getGameRuleCustomizer()
          VisibleGameState API.
 int getPlayerCount()
          PlayerCollection API.
 java.util.Iterator getPlayers()
          PlayerCollection API.
 boolean isIn(GamePlayer p)
          PlayerCollection API.
 void join(GamePlayer player)
          PlayerCollection API.
 void leave(GamePlayer player)
          PlayerCollection API.
protected  void setGameCustomizer(GameRuleCustomizer customizer)
           
protected  void setGameRule(GameRule rule)
           
 void setPlayers(PlayerCollection players)
          Store the players in the GameState.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.spieleck.game.base.GameState
createMove, doTurn, getVisibleGameState, setPlayerMove
 
Methods inherited from interface de.spieleck.game.base.PlayerCollection
canJoin, canLeave
 

Constructor Detail

GameStateBase

public GameStateBase()
Method Detail

setPlayers

public void setPlayers(PlayerCollection players)
Store the players in the GameState.

getGameRule

public GameRule getGameRule()
VisibleGameState API.
Specified by:
getGameRule in interface VisibleGameState

setGameRule

protected void setGameRule(GameRule rule)

getGameRuleCustomizer

public GameRuleCustomizer getGameRuleCustomizer()
VisibleGameState API.
Specified by:
getGameRuleCustomizer in interface VisibleGameState

setGameCustomizer

protected void setGameCustomizer(GameRuleCustomizer customizer)

join

public void join(GamePlayer player)
          throws GameException
PlayerCollection API.
Specified by:
join in interface PlayerCollection

getPlayerCount

public int getPlayerCount()
PlayerCollection API.
Specified by:
getPlayerCount in interface ReadablePlayerCollection

getPlayers

public java.util.Iterator getPlayers()
PlayerCollection API.
Specified by:
getPlayers in interface ReadablePlayerCollection

isIn

public boolean isIn(GamePlayer p)
PlayerCollection API.
Specified by:
isIn in interface ReadablePlayerCollection

leave

public void leave(GamePlayer player)
           throws GameException
PlayerCollection API.
Specified by:
leave in interface PlayerCollection


gameframe project