|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A data model for a game of ConwayGo.
$Id: Game.java,v 1.7 2004/07/30 21:05:58 mk Exp $
Method Summary | |
void |
addGameListener(GameListener listener)
Adds a GameListener that will be notified of game events. |
Board |
getBoard()
Returns the board with the game position. |
Engine |
getPlayer(boolean direction)
Returns the routine that makes the moves in the specified direction. |
Engine |
getPlayerToMove()
Returns the player that has to move now. |
void |
play()
Starts playing the game. |
void |
removeGameListener(GameListener listener)
Removes a GameListener. |
void |
setPlayer(boolean direction,
Engine player)
Sets the routine that makes the moves in the specified direction. |
Method Detail |
public void addGameListener(GameListener listener)
public void removeGameListener(GameListener listener)
public Engine getPlayer(boolean direction)
public Engine getPlayerToMove()
public void setPlayer(boolean direction, Engine player)
public Board getBoard()
public void play() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- If a player is null or the game is already running.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |