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
3812a74cda
commit
b5f647e72a
2 changed files with 10 additions and 3 deletions
|
@ -105,7 +105,7 @@ bool ChessArbiter::Play(std::string move) {
|
|||
// Check enpassant
|
||||
newFen.en_passant = "-";
|
||||
if (moved.piece == 'p' || moved.piece == 'P') {
|
||||
if (fen.player && (dst[1] - src[1] == 2)) {
|
||||
if (fen.player && (src[1] - dst[1] == 2)) {
|
||||
newFen.en_passant = src[0] + std::string() + (char)(src[1] - 1);
|
||||
} else if (!fen.player && (dst[1] - src[1] == 2)) {
|
||||
newFen.en_passant = src[0] + std::string() + (char)(src[1] + 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue