public interface Board
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
position()
Returns a copy of the position on this the board.
|
java.lang.String |
toAlgebraic(int move)
Converts an integer representation of one move to its algebraic
representation.
|
java.lang.String |
toAlgebraic(int[] moves)
Converts an integer representation of one or more moves to their
algebraic representation.
|
Board |
toBoard(Game game)
Converts the current state of a game object to its board object
representation.
|
Board |
toBoard(java.lang.String notation)
Converts a board notation to a board object.
|
int |
toMove(java.lang.String notation)
Converts an algebraic move notation to an integer representation.
|
int[] |
toMoves(java.lang.String notation)
Converts an algebraic moves notation to an integer move array
representation.
|
java.lang.String |
toNotation()
Converts this board object to its equivalent board notation.
|
java.lang.String |
toString()
Returns an human readable string representation of this object.
|
int |
turn()
Returns which player is to move for the board position
|
int turn()
java.lang.Object position()
Board toBoard(Game game)
game
- A game objectjava.lang.IllegalArgumentException
- If the game is not validBoard toBoard(java.lang.String notation)
notation
- A board notationjava.lang.IllegalArgumentException
- If the notation is not validjava.lang.String toNotation()
java.lang.String toString()
toString
in class java.lang.Object
java.lang.String toAlgebraic(int move)
move
- A move identifierjava.lang.IllegalArgumentException
- if the move is not validjava.lang.String toAlgebraic(int[] moves)
moves
- Moves arrayjava.lang.IllegalArgumentException
- if a move is not validint toMove(java.lang.String notation)
notation
- Move notationjava.lang.IllegalArgumentException
- If the notation does not
represent a valid moveint[] toMoves(java.lang.String notation)
notation
- Moves notationjava.lang.IllegalArgumentException
- If the notation does not
represent a valid move sequence