private void FinishTasks() { // Painting the winning buttons. Point[] winIndices = curGame.GetWinnerIndexes(); if (winIndices != null) { foreach (Point point in winIndices) { ColorButton(buttons[point.X, point.Y], Color.Red); } } SetAllGameButtonsTo(false); resetButton.Text = GetWinnerString(); }