java.lang.Object
app.chess.StandardMover
- All Implemented Interfaces:
Mover
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPieceKilledByMove
(ChessMove move, ChessPiece[][] board) Checks if a move kills a piece (or pawn).makeMove
(int player, ChessMove move, ChessPiece[][] board, StateManager manager)
-
Constructor Details
-
StandardMover
StandardMover()
-
-
Method Details
-
getPieceKilledByMove
Description copied from interface:Mover
Checks if a move kills a piece (or pawn).- Specified by:
getPieceKilledByMove
in interfaceMover
- Parameters:
move
- A valid move that is to be evaluated. If it's invalid, an UB will occur.board
- A board on which the move should take place.- Returns:
- Null if there is no piece that's going to be taken, reference to said piece otherwise.
-
makeMove
public List<ChessPiece> makeMove(int player, ChessMove move, ChessPiece[][] board, StateManager manager)
-