Ejemplo n.º 1
0
        private void NextStepBtnClick(object sender, EventArgs e)
        {
            if (LifeGrid.IsGridRepeated())
            {
                ClearGameWhenGameOver();
                return;
            }

            LifeGrid.UpdateGridNextStep();
            UpdateGameStep();
        }
Ejemplo n.º 2
0
        private void TimerTick(object sender, EventArgs e)
        {
            if (LifeGrid.IsGridRepeated())
            {
                ClearGameWhenGameOver();
                gameTimer.Stop();
                return;
            }

            LifeGrid.UpdateGridNextStep();
            UpdateGameStep();

            if (CellsCount == 0)
            {
                ClearGameWhenGameOver();
                gameTimer.Stop();
            }
        }