private void NewGame() { korobeiniki?.Stop(); timer.Stop(); model.EndGame(); PlayingArea.Controls.Clear(); sizeForm.ShowDialog(); }
private void Model_GameOver(object sender, EventArgs e) { timer.Stop(); korobeiniki?.Stop(); TimeSpan elapsedTime = DateTime.Now - startTime; MessageBox.Show($"Game lasted for {elapsedTime.Minutes} minutes {elapsedTime.Seconds} seconds", "Game Over", MessageBoxButton.OK); model.EndGame(); viewModel.EndGame(); }
private void EndGame() { _model.EndGame(); }