Class Pawn


public class Pawn extends Piece
The type Pawn.
  • Field Details

    • direction

      public final int direction
      The Direction.
  • Constructor Details

    • Pawn

      public Pawn(Color color, Location location)
      Instantiates a new Pawn.
      Parameters:
      color - the color
      location - the location
  • Method Details

    • getNaturalMoves

      public List<Move> getNaturalMoves(Board board)
      Gets natural moves.
      Overrides:
      getNaturalMoves in class Piece
      Parameters:
      board - the board
      Returns:
      the natural moves
    • getThreatenedLocations

      public List<Location> getThreatenedLocations(Board board)
      Gets threatened locations.
      Specified by:
      getThreatenedLocations in class Piece
      Parameters:
      board - the board
      Returns:
      the threatened locations