Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
 public GameModel(IMineSweeperDataAccess dataAccess)
 {
     _dataAccess = dataAccess;
 }