My Project
Public Member Functions | List of all members
Queen Class Reference
Inheritance diagram for Queen:
ChessPiece

Public Member Functions

 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 ()
 
- Public Member Functions inherited from ChessPiece
 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 ()
 

Additional Inherited Members

- Public Attributes inherited from ChessPiece
int x
 
int y
 

Constructor & Destructor Documentation

◆ Queen()

Queen.Queen ( int  x,
int  y,
PieceColor  color 
)
inline
Parameters
xstarting x coordinate
ystarting y coordinate
colorof piece

Member Function Documentation

◆ 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
chessBoardwe are playing on
startXwhere the piece is starting at x
startYwhere the piece is starting at y
endXwhere the piece is going to x
endYwhere 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
chessBoardwe are playing on
startXwhere the piece is starting at x
startYwhere the piece is starting at y
endXwhere the piece is going to x
endYwhere 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
chessBoardwe are playing on
startXwhere the piece is starting at x
startYwhere the piece is starting at y
moveToXwhere the piece is going to x
moveToYwhere 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
chessBoardwe are playing to
moveToXwhere we want to move piece to x
moveToYwhere we want to move piece to y
Returns
whether move is valid

The documentation for this class was generated from the following file: