Skip to content

Commit

Permalink
Fix a bug where the flag En_Passant may not be resetted.
Browse files Browse the repository at this point in the history
  • Loading branch information
DCourtel committed Mar 22, 2021
1 parent a7d20f5 commit 3f028bc
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 453 deletions.
5 changes: 1 addition & 4 deletions Chessboard Control/Board/Board.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1615,6 +1615,7 @@ private void MovePiece(ChessMove move)
}

/* if big pawn move, update the en passant square */
ep_square = EMPTY_SQUARE;
if (move.MoveKind.HasFlag(ChessMoveType.Big_Pawn))
{
var leftPiece = board[move.To.x88Notation - 1];
Expand All @@ -1636,10 +1637,6 @@ private void MovePiece(ChessMove move)
}
}
}
else
{
ep_square = EMPTY_SQUARE;
}

/* reset the 50 move counter if a pawn is moved or a piece is captured */
if (move.MovingPiece.Kind == ChessPieceKind.Pawn)
Expand Down
4 changes: 2 additions & 2 deletions Chessboard Control/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
// en utilisant '*', comme indiqué ci-dessous :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2103.21")]
[assembly: AssemblyFileVersion("1.0.2103.21")]
[assembly: AssemblyVersion("1.0.2103.22")]
[assembly: AssemblyFileVersion("1.0.2103.22")]
4 changes: 2 additions & 2 deletions Chessboard Tester/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
// en utilisant '*', comme indiqué ci-dessous :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2103.21")]
[assembly: AssemblyFileVersion("1.0.2103.21")]
[assembly: AssemblyVersion("1.0.2103.22")]
[assembly: AssemblyFileVersion("1.0.2103.22")]
4 changes: 2 additions & 2 deletions UnitTest Chessboard Control/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
[assembly: Guid("7f46f0c8-b7ae-4e64-aea7-5238103ac97a")]

// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2103.21")]
[assembly: AssemblyFileVersion("1.0.2103.21")]
[assembly: AssemblyVersion("1.0.2103.22")]
[assembly: AssemblyFileVersion("1.0.2103.22")]
Loading

0 comments on commit 3f028bc

Please sign in to comment.