Fix: Pawns don't all promote into black pieces anymore
parent
00f371b913
commit
176fdd42d1
|
|
@ -217,7 +217,7 @@ class Position {
|
||||||
}
|
}
|
||||||
enPassantTargetSquare = (startSquare - endSquare == 16) ? startSquare - 8 : null;
|
enPassantTargetSquare = (startSquare - endSquare == 16) ? startSquare - 8 : null;
|
||||||
if (endSquare < 8) {
|
if (endSquare < 8) {
|
||||||
board[endSquare] = Piece.pieceByFenCharacter[promotingPiece]!;
|
board[endSquare] = Piece.pieceByFenCharacter[promotingPiece?.toUpperCase()]!;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -263,7 +263,7 @@ class Position {
|
||||||
}
|
}
|
||||||
enPassantTargetSquare = (endSquare - startSquare == 16) ? startSquare + 8 : null;
|
enPassantTargetSquare = (endSquare - startSquare == 16) ? startSquare + 8 : null;
|
||||||
if (endSquare > 55) {
|
if (endSquare > 55) {
|
||||||
board[endSquare] = Piece.pieceByFenCharacter[promotingPiece]!;
|
board[endSquare] = Piece.pieceByFenCharacter[promotingPiece?.toLowerCase()]!;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue