示例#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;
 }