private void CancelMove() { if (f == false) { game.gameCaretaker.states.Pop(); f = true; } if (game.counter != -1) { game.Cancel(); RefreshButtonField(); label1.Text = game.counter.ToString(); game.counter--; } else { MessageBox.Show("Ходов еще не было!"); f = false; RestoreGameAfter0(); } }
private void GameUndo() { if (f == false) { game.gameCaretaker.states.Pop(); f = true; } if (game.counter != -1) { game.Cancel(); RefreshButtonField(); (info.Items[1] as StatusBarItem).Content = game.counter.ToString(); game.counter--; } else { MessageBox.Show("Ходов еще не было!"); f = false; RestoreGameAfter0(); } }