예제 #1
0
 private void NewGameSinglePlayerCommand_executed(object sender, ExecutedRoutedEventArgs e)
 {
     borderPlayer1.DataContext = null;
     borderPlayer2.DataContext = null;
     gameController = new SinglePlayerGameController(gameGrid, gameOptions.SelectedIconSet);
     gameController.StartGame();
 }
예제 #2
0
 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();
 }
예제 #3
0
 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();
 }
예제 #4
0
 void MainWindow_Loaded(object sender, RoutedEventArgs e)
 {
     gameController = new SinglePlayerGameController(this.gameGrid, gameOptions.SelectedIconSet);
 }
예제 #5
0
 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();
 }
예제 #6
0
 private void Single_Click(object sender, RoutedEventArgs e)
 {
     borderPlayer1.DataContext = null;
     borderPlayer2.DataContext = null;
     gameController = new SinglePlayerGameController(gameGrid, gameOptions.SelectedIconSet);
     gameController.StartGame();
 }