Debug en passant capture

This commit is contained in:
Loic Guegan 2022-03-07 11:15:45 +01:00
parent adaec1ba14
commit 16f2c01327
2 changed files with 5 additions and 1 deletions

View file

@ -113,8 +113,10 @@ bool ChessArbiter::Play(std::string move) {
if (dst == fen.en_passant) {
if (fen.player) {
board.RemovePiece(dst[0] + std::string() + (char)(dst[1] + 1));
capture = 'P';
} else {
board.RemovePiece(dst[0] + std::string() + (char)(dst[1] - 1));
capture = 'p';
}
}
newFen.halfmove = 0; // Pawn moves reset half moves
@ -435,7 +437,7 @@ std::string ChessArbiter::ParseSAN(std::string SANMove) {
// Pawn moves
if (std::islower(SANMove[0])) {
piece = 'P';
hint=SANMove[0];
hint = SANMove[0];
// Not a capture
if (SANMove[1] != 'x') {
dst = SANMove.substr(0, 2);