mirror of
https://gitlab.com/manzerbredes/chessarbiter.git
synced 2025-05-23 07:37:40 +00:00
Debug en passant capture
This commit is contained in:
parent
adaec1ba14
commit
16f2c01327
2 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue