suicideChess
Class Board
java.lang.Object
suicideChess.Board
- public class Board
- extends java.lang.Object
This class contains the board representation.
The board is represented using bitboards.
- a1 is square 0
- h8 is square 7
- a2 is square 8
- ... and so on
- Version:
- $LastChangedRevision: 19 $, $LastChangedDate: 2006-01-10 12:35:32 +0000 (Tue, 10 Jan 2006) $
- Author:
- Jean-Baptiste Hétier
Constructor Summary |
Board()
Constructor of the class Board |
Method Summary |
void |
display()
This function can be used to display the board
Black pieces are displayed in uppercase letters. |
void |
doMove(Move move)
This methods takes a Move and applies it (updating the bitboard) |
suicideChess.Piece |
getPiece(suicideChess.Square onSquare)
This function searchs for what piece is on a square. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NB_OF_RANKS
public static final int NB_OF_RANKS
- See Also:
- Constant Field Values
NB_OF_FILES
public static final int NB_OF_FILES
- See Also:
- Constant Field Values
NB_OF_SQUARES
public static final int NB_OF_SQUARES
- See Also:
- Constant Field Values
Board
public Board()
throws suicideChess.Square.NotAValidSquare
- Constructor of the class Board
- Throws:
NotAValidSquare
suicideChess.Square.NotAValidSquare
doMove
public void doMove(Move move)
throws Board.NoPieceOnSquare
- This methods takes a
Move
and applies it (updating the bitboard)
- Parameters:
move
- The move that is to be done
- Throws:
Board.NoPieceOnSquare
- If a piece is trying to be moved from a square that does not exist.- See Also:
Move
getPiece
public suicideChess.Piece getPiece(suicideChess.Square onSquare)
- This function searchs for what piece is on a square.
- Parameters:
onSquare
- The Square on which we will look for a piece.
- Returns:
- a
Piece
- See Also:
Board.NoPieceOnSquare
,
Piece
display
public void display()
- This function can be used to display the board
Black pieces are displayed in uppercase letters.