private void GenerateNewWorld() { GameRecord.IsEnabled = true; ListBoxSavedGames.SelectedIndex = -1; loadedGame = false; recording = false; int.TryParse(WorldWidth.Text, out int width); int.TryParse(WorldHeight.Text, out int height); bool infinite = (bool)WorldInfinite.IsChecked; GridControl1.GenerateNewWorld(width, height, infinite); UpdatePlayButton(); }