Package com.amirhn.Pieces
Class Pawn
java.lang.Object
com.amirhn.Pieces.Piece
com.amirhn.Pieces.Pawn
The type Pawn.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetNaturalMoves
(Board board) Gets natural moves.getThreatenedLocations
(Board board) Gets threatened locations.Methods inherited from class com.amirhn.Pieces.Piece
canBeCapturedBy, copy, equals, generate, generate, getAllowedMoves, getLocation, getSymbol, hashCode, hasMoved, isAllowedToMove, removeLocation, setLocation, setLocationBack, toString
-
Field Details
-
direction
public final int directionThe Direction.
-
-
Constructor Details
-
Pawn
Instantiates a new Pawn.- Parameters:
color
- the colorlocation
- the location
-
-
Method Details
-
getNaturalMoves
Gets natural moves.- Overrides:
getNaturalMoves
in classPiece
- Parameters:
board
- the board- Returns:
- the natural moves
-
getThreatenedLocations
Gets threatened locations.- Specified by:
getThreatenedLocations
in classPiece
- Parameters:
board
- the board- Returns:
- the threatened locations
-