예제 #1
0
파일: Cell.cs 프로젝트: cyacedev/conway
 public CellDensity(int cellCount)
 {
     fromX          = new CellCoords(int.MaxValue, 0);
     fromY          = new CellCoords(0, int.MaxValue);
     toX            = new CellCoords(int.MinValue, 0);
     toY            = new CellCoords(int.MinValue, 0);
     this.cellCount = cellCount;
 }
예제 #2
0
파일: Cell.cs 프로젝트: cyacedev/conway
        public void AddCellCoordToCheck(CellCoords checkCoords)
        {
            if (checkCoords.x < fromX.x)
            {
                fromX = checkCoords;
            }

            if (checkCoords.y < fromY.y)
            {
                fromY = checkCoords;
            }
            if (checkCoords.x > toX.x)
            {
                toX = checkCoords;
            }
            if (checkCoords.y > toY.y)
            {
                toY = checkCoords;
            }
        }
예제 #3
0
파일: Cell.cs 프로젝트: cyacedev/conway
 public ChangedCellCoords(CellCoords changedCoords, bool newLife)
 {
     this.cellCoords = changedCoords;
     this.newLife    = newLife;
 }