private void menuItemNewGame_Click(object sender, RoutedEventArgs e) { tableUserFoxes = null; tableCompFoxes = null; labelQuantity.Content = "Число лис на поле = " + CurrentNumFoxes.ToString(); UserFoxesTable tableUserFoxesNew = new UserFoxesTable(CurrentNumFoxes); ComputerFoxesTable tableCompFoxesNew = new ComputerFoxesTable(CurrentNumFoxes); tableUserFoxes = tableUserFoxesNew; tableCompFoxes = tableCompFoxesNew; CreateNewGame(); }
private void CreateGameForAll() { CurrentNumFoxes = 4; CurentBackgroundPath = ""; CurrentTypeGame = "На минимальное число ходов"; CurrentUserNumberMoves = 0; CurrentComputerNumberMoves = 0; UpdateOption(); labelQuantity.Content = "Число лис на поле = " + CurrentNumFoxes.ToString(); labelTypeGame.Content = "Тип игры: " + CurrentTypeGame.ToString(); tableUserFoxes = new UserFoxesTable(CurrentNumFoxes); CreateButtonLabelTableLeft(); CreateButtonLabelTableRight(); CreateListLabelFoxes(); VisibleAll("userTableButtons"); UpdateLabel("userTableButtons"); foreach (var item in labelFoxes) { item.Visibility = Visibility.Collapsed; } }