private void NewGameSinglePlayerCommand_executed(object sender, ExecutedRoutedEventArgs e) { borderPlayer1.DataContext = null; borderPlayer2.DataContext = null; gameController = new SinglePlayerGameController(gameGrid, gameOptions.SelectedIconSet); gameController.StartGame(); }
private void NewGameAgainstComputerCommand_Executred(object sender, ExecutedRoutedEventArgs e) { AgainstComputerGameController gameController = new AgainstComputerGameController(gameGrid, gameOptions.SelectedIconSet); borderPlayer1.DataContext = gameController.Player1; borderPlayer2.DataContext = gameController.Player2; this.gameController = gameController; gameController.StartGame(); }
private void TwoPlayer_Click(object sender, RoutedEventArgs e) { TwoPlayerGameController gameController = new TwoPlayerGameController(gameGrid, gameOptions.SelectedIconSet); borderPlayer1.DataContext = gameController.Player1; borderPlayer2.DataContext = gameController.Player2; this.gameController = gameController; gameController.StartGame(); }
void MainWindow_Loaded(object sender, RoutedEventArgs e) { gameController = new SinglePlayerGameController(this.gameGrid, gameOptions.SelectedIconSet); }
private void Single_Click(object sender, RoutedEventArgs e) { borderPlayer1.DataContext = null; borderPlayer2.DataContext = null; gameController = new SinglePlayerGameController(gameGrid, gameOptions.SelectedIconSet); string ThemeSelected = gameOptions.SelectedIconSet; switch(ThemeSelected) { case "frukt": this.Background = new ImageBrush(new BitmapImage(new Uri(@"pack://*****:*****@"pack://application:,,,/Images/wood-texture-14.png"))); break; } if(gameOptions.SelectedIconSet == "frukt") this.Background = new ImageBrush(new BitmapImage(new Uri(@"pack://application:,,,/Images/BasketPattern.png"))); gameController.StartGame(); }
private void Single_Click(object sender, RoutedEventArgs e) { borderPlayer1.DataContext = null; borderPlayer2.DataContext = null; gameController = new SinglePlayerGameController(gameGrid, gameOptions.SelectedIconSet); gameController.StartGame(); }