Module app
Package app.chess

Class StandardMover

java.lang.Object
app.chess.StandardMover
All Implemented Interfaces:
Mover

class StandardMover extends Object implements Mover
  • Constructor Details

    • StandardMover

      StandardMover()
  • Method Details

    • getPieceKilledByMove

      public ChessPiece getPieceKilledByMove(ChessMove move, ChessPiece[][] board)
      Description copied from interface: Mover
      Checks if a move kills a piece (or pawn).
      Specified by:
      getPieceKilledByMove in interface Mover
      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)
      Specified by:
      makeMove in interface Mover