Ejemplo n.º 1
0
 public CellSet followCell(Cell cell, Cell blocked) {
   if (isIntersection(cell)) return followIntersection(cell, blocked);
   if (isCorner(cell)) return followCorner(cell, blocked);
   if (isLine(cell)) return followLine(cell, blocked);
   if (isStub(cell)) return followStub(cell, blocked);
   if (isCrossOnLine(cell)) return followCrossOnLine(cell, blocked);
   System.err.println("Umbiguous input at position " + cell + ":");
   TextGrid subGrid = getTestingSubGrid(cell);
   subGrid.printDebug();
   throw new RuntimeException("Cannot follow cell " + cell + ": cannot determine cell type");
 }