|
|
| ChessBoard (int row, int col, boolean putPieces) |
| |
| void | putPieces () |
| |
| int | getXKingLocation (PieceColor color) |
| |
| int | getYKingLocation (PieceColor color) |
| |
| boolean | movePiece (int moveFromX, int moveFromY, int moveToX, int moveToY) |
| |
| int | inCheck (int moveFromX, int moveFromY, int moveToX, int moveToY) |
| |
| ChessPiece | getChessPiece (int x, int y) |
| |
| int | getCol () |
| |
| int | getRow () |
| |
| boolean | isFree (int x, int y) |
| |
| ChessPiece [][] | getChessBoard () |
| |
◆ getChessBoard()
◆ getChessPiece()
| ChessPiece ChessBoard.getChessPiece |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
inline |
- Parameters
-
- Returns
- chesspiece at x,y coordinate
◆ getCol()
| int ChessBoard.getCol |
( |
| ) |
|
|
inline |
◆ getRow()
| int ChessBoard.getRow |
( |
| ) |
|
|
inline |
◆ getXKingLocation()
| int ChessBoard.getXKingLocation |
( |
PieceColor |
color | ) |
|
|
inline |
- Parameters
-
- Returns
- returns King colors X location
◆ getYKingLocation()
| int ChessBoard.getYKingLocation |
( |
PieceColor |
color | ) |
|
|
inline |
- Parameters
-
- Returns
- returns King colors Y location
◆ inCheck()
| int ChessBoard.inCheck |
( |
int |
moveFromX, |
|
|
int |
moveFromY, |
|
|
int |
moveToX, |
|
|
int |
moveToY |
|
) |
| |
|
inline |
- Parameters
-
| moveFromX | Piece that we want to move at X coordinate |
| moveFromY | Piece that we want to move at Y coordinate |
| moveToX | Where we want to move piece to X coordinate |
| moveToY | Where we want to move piece to Y coordiante |
- Returns
- whether and what king is in check
◆ isFree()
| boolean ChessBoard.isFree |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
inline |
- Parameters
-
- Returns
- whether space is free at given x,y coordinate
◆ movePiece()
| boolean ChessBoard.movePiece |
( |
int |
moveFromX, |
|
|
int |
moveFromY, |
|
|
int |
moveToX, |
|
|
int |
moveToY |
|
) |
| |
|
inline |
- Parameters
-
| moveFromX | Piece that we want to move at X coordinate |
| moveFromY | Piece that we want to move at Y coordinate |
| moveToX | Where we want to move piece to X coordinate |
| moveToY | Where we want to move piece to Y coordiante |
- Returns
- allowed to move piece to given coordinate
◆ putPieces()
| void ChessBoard.putPieces |
( |
| ) |
|
|
inline |
Automates putting the pieces as they normally would be on the chess board
The documentation for this class was generated from the following file: