/// <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; }
void DistroyMembers() { mineSweeper = null; currentButtons = null; timer = null; lblTimer = null; currentMine = null; gameOver = false; pairs = null; }
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(); }