private void GameView_Load(object sender, EventArgs e) { _dataAccess = new MineSweeperFileDataAccess(); InputForm IF = new InputForm(); IF.ShowDialog(); this.AutoSize = true; this.AutoSizeMode = AutoSizeMode.GrowAndShrink; _model = new GameModel(_dataAccess); _model.GameOver += new EventHandler <MineSweeperEventArgs>(Game_GameOver); _model.NewGame(IF.ChosenMapSize, IF.ChosenMineNumber); GenerateTable(); UpdateView(); }
public GameModel(IMineSweeperDataAccess dataAccess) { _dataAccess = dataAccess; }