aboutsummaryrefslogtreecommitdiff
path: root/src/board/board.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/board/board.cpp')
-rw-r--r--src/board/board.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/board/board.cpp b/src/board/board.cpp
index 39df3d3..7b53a1b 100644
--- a/src/board/board.cpp
+++ b/src/board/board.cpp
@@ -56,7 +56,7 @@ UndoMove MakeMove(Move move, Game *g) {
// Playing enpasstant
if (piece.type == PAWN && g->canEnpassant && move.To == g->enPassant) {
Position capturedPawn = move.To;
- capturedPawn.rank += piece.color ? 1 : -1;
+ capturedPawn.rank += piece.color ? -1 : 1;
undo.wasEnPassantCapture = true;
undo.enPassantCapturedSquare = capturedPawn;