resolve still to fix
This commit is contained in:
@@ -723,9 +723,9 @@ TODO
|
||||
Position p = new Position(newx,newy);
|
||||
if ((newx >= 0) && (newy >= 0) && (newx < width) && (newy < height))
|
||||
{
|
||||
System.out.println("check " + p);
|
||||
if (isFlagSet(getCell(p),reversedirection))
|
||||
{
|
||||
System.out.println("check " + p);
|
||||
if (found != null)
|
||||
{
|
||||
// could be a unique parent of two paths...
|
||||
@@ -740,27 +740,24 @@ TODO
|
||||
DirectionPosition altfound = new DirectionPosition(reversedirection,p);
|
||||
cp.addFirst(altfound);
|
||||
altpath.addLast(cp);
|
||||
rlistener.notifySearchError("record alternate path " + p.toString());
|
||||
}
|
||||
else
|
||||
{
|
||||
// this was already solved, might be a loop.
|
||||
if (rlistener != null)
|
||||
{
|
||||
rlistener.notifySearchError("Loop : two parents " + found.toString() + " "
|
||||
rlistener.notifySearchError("Loop " + last.toString() + " has two parents " + found.toString() + " "
|
||||
+ p.toString());
|
||||
}
|
||||
continue;
|
||||
// continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
selectedDirection=reversedirection;
|
||||
if (isFlagSet(getCell(p), SOLVED ))
|
||||
if (! isFlagSet(getCell(p), SOLVED ))
|
||||
{
|
||||
// was already solved.
|
||||
found = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
found = new DirectionPosition(selectedDirection,p);
|
||||
if (rlistener != null)
|
||||
{
|
||||
@@ -768,7 +765,10 @@ TODO
|
||||
}
|
||||
}
|
||||
// support multiple pathes
|
||||
// break;
|
||||
}
|
||||
else
|
||||
{
|
||||
System.out.println("not reachable " + p + " from " + found);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user