public static void BroadcastWinner() { if (Players.Any(i => i.Point >= GameWinPoint)) { ShapesPanel.Clear(); BroadcastShapes(); RequestSendMessage($"{Players.First(i => i.Point >= GameWinPoint).Name} ({Players.First(i => i.Point >= GameWinPoint).Point}) is Won"); RequestSendMessage($"Game Finished"); GameRunning = false; } }
// ClearShapes: Clear the ShapesPanel, and re-broadcast it to all other clients private static void ClearShapes() { ShapesPanel.Clear(); BroadcastShapes(); }