Skip to content

Commit

Permalink
Fixes SebLague#172
Browse files Browse the repository at this point in the history
I'm not sure if this is an actual fix, but it's difficult to recreate.
This allows for multiple writers and readers, so there may be some
instances where the highlighted cells are incorrect, but I'm not sure
how that would happen. This also should only happen when rapidly
visualizing bots, so shouldn't ever be noticeable anyway.
  • Loading branch information
harrisi committed Jul 22, 2023
1 parent 385851a commit 744fa3c
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions Chess-Challenge/src/Framework/Application/UI/BoardUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,7 @@ public void OverrideSquareColour(int square, HighlightType hightlightType)
_ => Color.PINK
};

if (squareColOverrides.ContainsKey(square))
{
squareColOverrides[square] = col;
}
else
{
squareColOverrides.Add(square, col);
}
squareColOverrides[square] = col;
}

public void HighlightLegalMoves(Board board, int square)
Expand Down

0 comments on commit 744fa3c

Please sign in to comment.