{
startPoint.x = from.x;
startPoint.y = from.y;
startPoint.weight = 0;
startPoint.parent = null;
destPoint.x = to.x;
destPoint.y = to.y;
destPoint.weight = 0;
open = new PriorityQueue<PointWeighted>(1);
open.add(startPoint);
dest = to;
for(int i = 0; i <= mapsize; i++)
for(int j = 0; j <= mapsize; j++)
closed[i][j] = 0;
generateNodes(from);
curPoint = startPoint;
closed[curPoint.x][curPoint.y] = 1;
//find the path
for(;;)
{
curPoint = open.remove();
closed[curPoint.x][curPoint.y] = 1;
if(curPoint.x == destPoint.x && curPoint.y == destPoint.y)
{
break;
}
generateNodes
(new Point(curPoint.
x, curPoint.
y));
}
//create the path
for(;;)
{
calcedPath.
addPoint(new Point(curPoint.
x, curPoint.
y));
if(curPoint.parent == null)
break;
curPoint = curPoint.parent;
}
return calcedPath;
}
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"text\/x-go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"mysql","xml":"xml","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","ecmascript":"javascript","groovy":"text\/x-groovy","haskell":"text\/x-haskell","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mysql":"mysql","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"plsql","properties":"text\/x-properties","scheme":"text\/x-scheme","vb":"text\/vbscript","vbnet":"text\/vbscript","verilog":"text\/x-verilog","yaml":"text\/x-yaml"}