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