public void StartGame() { GameSettingsWindow gameSettingsWindow = new GameSettingsWindow(); if (gameSettingsWindow.ShowDialog() == DialogResult.OK) { GameState gameState = new GameState(gameSettingsWindow.BoardSize, gameSettingsWindow.IsTwoPlayers); BoardWindow boardWindow = new BoardWindow(gameState); gameState.InitForNewGame(); boardWindow.ShowDialog(); } }
private void ButtonGameSettings_Click(object sender, RoutedEventArgs e) { var settingsWindow = new GameSettingsWindow(); ShowNewWindow(settingsWindow); }
static void Init() { GameSettingsWindow window = (GameSettingsWindow)EditorWindow.GetWindow(typeof(GameSettingsWindow)); window.Show(); }