Skip to content

Commit

Permalink
Use Equals instead of reference comparison for giacomelli#70
Browse files Browse the repository at this point in the history
  • Loading branch information
Darcara committed Dec 9, 2022
1 parent e19cb03 commit c876934
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GeneticSharp.Extensions/Checkers/CheckersSquare.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public bool RemovePiece()
{
if (CurrentPiece != null)
{
if (CurrentPiece.CurrentSquare == this)
if (Equals(CurrentPiece.CurrentSquare, this))
{
CurrentPiece.CurrentSquare = null;
}
Expand Down

0 comments on commit c876934

Please sign in to comment.