mirror of
https://gitlab.com/manzerbredes/chessarbiter.git
synced 2025-05-23 07:37:40 +00:00
Debug en passant!
This commit is contained in:
parent
1e5a34d8d2
commit
f60b684790
2 changed files with 23 additions and 0 deletions
|
@ -110,6 +110,13 @@ bool ChessArbiter::Play(std::string move) {
|
|||
} else if (!fen.player && (dst[1] - src[1] == 2)) {
|
||||
newFen.en_passant = src[0] + std::string() + (char)(src[1] + 1);
|
||||
}
|
||||
if (dst == fen.en_passant) {
|
||||
if (fen.player) {
|
||||
board.RemovePiece(dst[0] + std::string() + (char)(dst[1] + 1));
|
||||
} else {
|
||||
board.RemovePiece(dst[0] + std::string() + (char)(dst[1] - 1));
|
||||
}
|
||||
}
|
||||
newFen.halfmove = 0; // Pawn moves reset half moves
|
||||
}
|
||||
// Captures reset half moves
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue