Exemplo n.º 1
0
        private void BirthORDie()
        {
            int[,] city = new int[CELLS1, CELLS1];
            for (int i = 0; i < CELLS1; i++)
            {
                for (int j = 0; j < CELLS1; j++)
                {
                    if (this.terrain[i, j] == 0 && exactlyThree(i, j))
                    {
                        city[i, j] = 1;
                    }
                    else if (this.terrain[i, j] == 1 && lessThanTwoORmoreThanThree(i, j))
                    {
                        city[i, j] = 0;
                    }
                    else
                    {
                        city[i, j] = terrain[i, j];
                    }
                }
            }

            this.terrain = city;
            TurnFinished?.Invoke(this, new TurnFinishedInfoEventArgs(terrain));
            Thread.Sleep(300);
        }
Exemplo n.º 2
0
Arquivo: Turn.cs Projeto: odmiex/NKM
 public void Finish()
 {
     TurnFinished?.Invoke();
 }
Exemplo n.º 3
0
 private void OnTurnFinished() => TurnFinished?.Invoke(this, EventArgs.Empty);
Exemplo n.º 4
0
Arquivo: Turn.cs Projeto: tojatos/NKM
 public void Finish() => TurnFinished?.Invoke(CharacterThatTookActionInTurn);