Example #1
0
 public void CreateGame(int NumberTilesInRow, int NumberTilesInColumn, int NumberMines)
 {
     if (game != null)
     {
         game.StopGame();
         this.Controls.Remove(game);
     }
     game                = new Minesweeper.Game(NumberTilesInRow, NumberTilesInColumn, NumberMines);
     game.Name           = "Game";
     game.Location       = new Point(2, 27);
     this.Width          = (game.Width + 21);
     this.Height         = (game.Height + 69);
     this.game.GameWin  += Game_Win;
     this.game.GameOver += Game_Over;
     this.Controls.Add(game);
 }
Example #2
0
 public void CreateGame(Minesweeper.DifficultyGame difficulty)
 {
     if (game != null)
     {
         game.StopGame();
         this.Controls.Remove(game);
     }
     game                = new Minesweeper.Game(difficulty);
     game.Name           = "Game";
     game.Location       = new Point(2, 27);
     this.Width          = (game.Width + 21);
     this.Height         = (game.Height + 69);
     this.game.GameWin  += Game_Win;
     this.game.GameOver += Game_Over;
     this.Controls.Add(game);
 }