Esempio n. 1
0
        //делаем шаг
        public void MakeTurn(int aliveNeighCount)
        {
            if (Slate == CellSlate.Dead && aliveNeighCount == 3)
            {
                Slate = CellSlate.Alive;
            }

            if (Slate == CellSlate.Alive && (aliveNeighCount > 3 || aliveNeighCount < 2))
            {
                Slate = CellSlate.Dead;
            }
        }
Esempio n. 2
0
        ////координаты
        //public int x;
        //public int y;

        //конструктор
        public Cell(/*int x, int y,*/ CellSlate slate = CellSlate.Dead)
        {
            //this.x = x;
            //this.y = y;
            Slate = slate;
        }