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

Public Member Functions

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

◆ Knight()

Knight.Knight ( int  x,
int  y,
PieceColor  color 
)
inline
Parameters
xcoordinate
ycoordinate
colorof piece

Member Function Documentation

◆ boardCharacter()

char Knight.boardCharacter ( )
inline

character representation on board

Returns

◆ isValidMove()

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

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