From 101054091d2b166f87c3ee5af6f99611a910cfec Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Thu, 16 Mar 2023 12:39:35 -0700 Subject: [PATCH] Fix black queen promotion --- src/Pawn.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Pawn.java b/src/Pawn.java index 8974601..d719ace 100644 --- a/src/Pawn.java +++ b/src/Pawn.java @@ -24,7 +24,7 @@ public class Pawn extends Piece { if (board.get(position.x + 1, position.y + 1) != null) { possibleMoves.add(new Move(position, new BoardCoordinate(position.x + 1,position.y + 1))); } - for (Move move : possibleMoves) move.isPromotion = position.y + 1 == 0; + for (Move move : possibleMoves) move.isPromotion = position.y + 1 == Board.BOARD_SIZE - 1; } else { if (board.get(position.x, position.y - 1) == null) { possibleMoves.add(new Move(position, new BoardCoordinate(position.x, position.y - 1)));