Пример #1
0
 /// <summary>
 /// Initialization of a new game
 /// </summary>
 /// <param name="currentLevel">game level to start with</param>
 private void StartNewGame(GameLevel currentLevel)
 {
     mineSweeper = new MineSweeperBLT();
     mineSweeper.StartGame(currentLevel);
     InitiateButtons();
     DrawButtons();
     gameOver = false;
 }
Пример #2
0
 void DistroyMembers()
 {
     mineSweeper    = null;
     currentButtons = null;
     timer          = null;
     lblTimer       = null;
     currentMine    = null;
     gameOver       = false;
     pairs          = null;
 }
Пример #3
0
 void ConstructMembers()
 {
     mineSweeper = new MineSweeperBLT();
     StartNewGame(GameLevel.Beginner);
     Application.DoEvents();
     timer             = new Timer();
     lblTimer          = new Timer();
     timer.Interval    = 100;
     lblTimer.Interval = 100;
     timer.Tick       += new EventHandler(timer_Tick);
     lblTimer.Tick    += new EventHandler(lblTimer_Tick);
     leftRightClick    = 0;
     gameOver          = false;
     pairs             = new ArrayList();
 }