public Minesweeper() { InitializeComponent(); g = Grid.newGrid("medium", this); void EasyStartBtnClicked(object sender, MouseEventArgs e) { bool newGame = StartNewGame(); if (newGame) { g = Grid.newGrid("easy", this); } } void MediumStartBtnClicked(object sender, MouseEventArgs e) { bool newGame = StartNewGame(); if (newGame) { g = Grid.newGrid("medium", this); } } void HardStartBtnClicked(object sender, MouseEventArgs e) { bool newGame = StartNewGame(); if (newGame) { g = Grid.newGrid("hard", this); } } this.EasyStartBtn.MouseClick += EasyStartBtnClicked; this.MediumStartBtn.MouseClick += MediumStartBtnClicked; this.HardStartBtn.MouseClick += HardStartBtnClicked; timer.Interval = 1; UpdateFlagCounter(g.GetMineCount()); }