Ejemplo 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;
            }
        }
Ejemplo 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;
        }