Пример #1
0
 private void ProcessCells(VectorPair propagatePair)
 {
     if (outputGrid.CheckIfCellIsCollapsed(propagatePair.CellToPropagatePosition))
     {
         propagationHelper.EnqueueUncollapsedNeighbours(propagatePair);
     }
     else
     {
         PropagateNeighbours(propagatePair);
     }
 }
Пример #2
0
 public List <VectorPair> CheckIfNeighboursAreCollapsed(VectorPair pairToCheck, OutputGrid outputgrid)
 {
     return(Create4DirectionNeighbours(pairToCheck.CellToPropagatePosition, pairToCheck.BaseCellPosition)
            .Where(x => outputgrid.CheckIfValidPosition(x.CellToPropagatePosition) && outputgrid.CheckIfCellIsCollapsed(x.CellToPropagatePosition) == false)
            .ToList());
 }