private void CommandExecuted(object sender, ExecutedRoutedEventArgs e) { if (e.Command == ApplicationCommands.Close) { this.Close(); } if (e.Command == GameViewModel.StartGameCommand) { model = new GameViewModel(); var options = GameOptions.Create(); options.Save(); model.StartNewGame(); DataContext = model; PlayButton.Visibility = Visibility.Visible; PassButton.Visibility = Visibility.Visible; } e.Handled = true; }
public GameViewModel() { _players = new List <Player>(); this._gameOptions = GameOptions.Create(); }
public options() { _gameOptions = GameOptions.Create(); DataContext = _gameOptions; InitializeComponent(); }