private void EndGame(string lastWords) { _game.EndGame(); foreach (Button button in _gameButtons) { button.Enabled = false; button.BackColor = Color.Silver; } Invalidate(); MessageBox.Show(lastWords, "Game over."); }