public GameModel(IAsteroidDataAccess dataAccess) { _dataAccess = dataAccess; _bGameStopped = true; _bIsGameOver = false; _table = new AsteroidTable(); }
private void GameForm_Load(object sender, EventArgs e) { _dataAccess = new AsteroidFileDataAccess(); _model = new GameModel(_dataAccess); GenerateTable(); _timer = new Timer(); _timer.Interval = 1000; _timer.Tick += new EventHandler(Timer_Tick); this.KeyPreview = true; this.KeyDown += new System.Windows.Forms.KeyEventHandler(KeyEvent); button1.BackColor = Color.ForestGreen; }