Skip to content

Commit 744fa3c

Browse files
committed
Fixes SebLague#172
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.
1 parent 385851a commit 744fa3c

File tree

1 file changed

+1
-8
lines changed
  • Chess-Challenge/src/Framework/Application/UI

1 file changed

+1
-8
lines changed

Chess-Challenge/src/Framework/Application/UI/BoardUI.cs

+1-8
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,7 @@ public void OverrideSquareColour(int square, HighlightType hightlightType)
162162
_ => Color.PINK
163163
};
164164

165-
if (squareColOverrides.ContainsKey(square))
166-
{
167-
squareColOverrides[square] = col;
168-
}
169-
else
170-
{
171-
squareColOverrides.Add(square, col);
172-
}
165+
squareColOverrides[square] = col;
173166
}
174167

175168
public void HighlightLegalMoves(Board board, int square)

0 commit comments

Comments
 (0)