|
Internet Chess ToolKit v0.2.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ictk.boardgame.chess.ChessGame
This is a container class to house the ChessGameInfo, ChessBoard and History for the Board.
Field Summary | |
static boolean |
BLACK
|
static boolean |
WHITE
|
Constructor Summary | |
ChessGame()
|
|
ChessGame(ChessGameInfo _gameInfo)
|
|
ChessGame(ChessGameInfo _gameInfo,
ChessBoard _board)
|
|
ChessGame(ChessGameInfo _gameInfo,
ChessBoard _board,
History _hist)
|
Method Summary | |
java.lang.String |
dump()
this is purely for diagnostic purposes. |
boolean |
equals(java.lang.Object obj)
compares the history (shallow equals) and gameinfo. |
Board |
getBoard()
returns the game board (if more than one it returns the first board which might be arbitrary. |
Board[] |
getBoards()
Board games with only one board return a single element Board[] array. |
Result |
getCurrentResult()
returns the current status of this Game. |
GameInfo |
getGameInfo()
this returns the GameInfo object for this game. |
History |
getHistory()
returns the move history for the entire game. |
int |
getNumberOfPlayers()
gets the number of players involved in this type of game, though there might not be two valid Player objects for this game. |
int[] |
getPlayersToMove()
returns an array containing the index number of the Players who have the ability to make a move at this time. |
int |
getPlayerToMove()
returns 0 if it is White to move, 1 if Black to move. |
Result |
getResult()
returns file final result of the game on the main line. |
int |
hashCode()
|
void |
setBoard(Board _board)
set the board for this game. |
void |
setGameInfo(GameInfo gi)
|
void |
setHistory(History _hist)
|
void |
setResult(Result result)
|
java.lang.String |
toString()
this is purely for diagnostic purposes. |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final boolean BLACK
public static final boolean WHITE
Constructor Detail |
public ChessGame()
public ChessGame(ChessGameInfo _gameInfo)
public ChessGame(ChessGameInfo _gameInfo, ChessBoard _board)
public ChessGame(ChessGameInfo _gameInfo, ChessBoard _board, History _hist)
Method Detail |
public int getNumberOfPlayers()
Game
getNumberOfPlayers
in interface Game
public GameInfo getGameInfo()
Game
getGameInfo
in interface Game
public void setGameInfo(GameInfo gi)
setGameInfo
in interface Game
public History getHistory()
Game
getHistory
in interface Game
public Board getBoard()
SingleBoardGame
getBoard
in interface SingleBoardGame
public Board[] getBoards()
Game
getBoards
in interface Game
public void setResult(Result result)
setResult
in interface Game
public int getPlayerToMove()
getPlayerToMove
in interface SingleBoardGame
public int[] getPlayersToMove()
Game
getPlayersToMove
in interface Game
public void setBoard(Board _board)
SingleBoardGame
setBoard
in interface SingleBoardGame
public void setHistory(History _hist)
setHistory
in interface Game
public Result getCurrentResult()
Game
getCurrentResult
in interface Game
public Result getResult()
Game
getResult
in interface Game
public java.lang.String toString()
public java.lang.String dump()
public boolean equals(java.lang.Object obj)
public int hashCode()
|
Submit a bug or feature Visit the Website Internet Chess ToolKit is licensed under the GPL v2 . |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |