|
| | Queen (int x, int y, PieceColor color) |
| |
| boolean | isValidMove (ChessBoard chessBoard, int moveToX, int moveToY) |
| |
| boolean | checkQueenMoves (ChessBoard chessBoard, int startX, int startY, int moveToX, int moveToY) |
| |
| boolean | checkDiagonal (ChessBoard chessBoard, int startX, int startY, int endX, int endY) |
| |
| boolean | checkColsRows (ChessBoard chessBoard, int startX, int startY, int endX, int endY) |
| |
| char | boardCharacter () |
| |
| | ChessPiece (int x, int y, PieceColor color) |
| |
| boolean | makeMove (ChessBoard chessBoard, int moveToX, int moveToY) |
| |
| char | boardCharacter () |
| |
| boolean | isValidMove (ChessBoard chessBoard, int moveToX, int moveToY) |
| |
| int [] | getCoordinates () |
| |
| PieceColor | getColor () |
| |
◆ Queen()
| Queen.Queen |
( |
int |
x, |
|
|
int |
y, |
|
|
PieceColor |
color |
|
) |
| |
|
inline |
- Parameters
-
| x | starting x coordinate |
| y | starting y coordinate |
| color | of piece |
◆ boardCharacter()
| char Queen.boardCharacter |
( |
| ) |
|
|
inline |
character representation on board
- Returns
◆ checkColsRows()
| boolean Queen.checkColsRows |
( |
ChessBoard |
chessBoard, |
|
|
int |
startX, |
|
|
int |
startY, |
|
|
int |
endX, |
|
|
int |
endY |
|
) |
| |
|
inline |
- Parameters
-
| chessBoard | we are playing on |
| startX | where the piece is starting at x |
| startY | where the piece is starting at y |
| endX | where the piece is going to x |
| endY | where the piece is going to y |
- Returns
- whether move is legal i.e. checks rook moves
-
◆ checkDiagonal()
| boolean Queen.checkDiagonal |
( |
ChessBoard |
chessBoard, |
|
|
int |
startX, |
|
|
int |
startY, |
|
|
int |
endX, |
|
|
int |
endY |
|
) |
| |
|
inline |
- Parameters
-
| chessBoard | we are playing on |
| startX | where the piece is starting at x |
| startY | where the piece is starting at y |
| endX | where the piece is going to x |
| endY | where the piece is going to y |
- Returns
- whether move is legal i.e. checks bishop rules
◆ checkQueenMoves()
| boolean Queen.checkQueenMoves |
( |
ChessBoard |
chessBoard, |
|
|
int |
startX, |
|
|
int |
startY, |
|
|
int |
moveToX, |
|
|
int |
moveToY |
|
) |
| |
|
inline |
- Parameters
-
| chessBoard | we are playing on |
| startX | where the piece is starting at x |
| startY | where the piece is starting at y |
| moveToX | where the piece is going to x |
| moveToY | where the piece is going to y |
- Returns
- whether move is legal i.e. checks rook and bishop moves
◆ isValidMove()
| boolean Queen.isValidMove |
( |
ChessBoard |
chessBoard, |
|
|
int |
moveToX, |
|
|
int |
moveToY |
|
) |
| |
|
inline |
- Parameters
-
| chessBoard | we are playing to |
| moveToX | where we want to move piece to x |
| moveToY | where we want to move piece to y |
- Returns
- whether move is valid
The documentation for this class was generated from the following file: