|
|
@ -13,8 +13,10 @@ public class Pawn extends Piece {
|
|
|
|
ArrayList<BoardCoordinate> possibleMoves = new ArrayList<>();
|
|
|
|
ArrayList<BoardCoordinate> possibleMoves = new ArrayList<>();
|
|
|
|
if (this.black) {
|
|
|
|
if (this.black) {
|
|
|
|
possibleMoves.add(new BoardCoordinate(position.x, position.y + 1));
|
|
|
|
possibleMoves.add(new BoardCoordinate(position.x, position.y + 1));
|
|
|
|
|
|
|
|
if (position.y == 1) possibleMoves.add(new BoardCoordinate(position.x, position.y + 2));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
possibleMoves.add(new BoardCoordinate(position.x, position.y - 1));
|
|
|
|
possibleMoves.add(new BoardCoordinate(position.x, position.y - 1));
|
|
|
|
|
|
|
|
if (position.y == 6) possibleMoves.add(new BoardCoordinate(position.x, position.y - 2));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return possibleMoves;
|
|
|
|
return possibleMoves;
|
|
|
|
}
|
|
|
|
}
|
|
|
|