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

Public Member Functions

 Rook (int x, int y, PieceColor color)
 
boolean isValidMove (ChessBoard chessBoard, int moveToX, int moveToY)
 
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

◆ Rook()

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

Member Function Documentation

◆ boardCharacter()

char Rook.boardCharacter ( )
inline
Returns
character representation on board

◆ checkColsRows()

boolean Rook.checkColsRows ( ChessBoard  chessBoard,
int  startX,
int  startY,
int  endX,
int  endY 
)
inline
Parameters
chessBoardwe are playing on
startXwhere the piece starts x
startYwhere the piece starts y
endXwhere we want piece to move to x
endYwhere we want piece to move to y
Returns

◆ isValidMove()

boolean Rook.isValidMove ( ChessBoard  chessBoard,
int  moveToX,
int  moveToY 
)
inline
Parameters
chessBoardwe are playing on
moveToXwhere we want piece to move to x
moveToYwhere we want piece to move to y
Returns

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