private void expandNode(Node currentNode){
  Node neighbours[]=new Node[8];
  neighbours[0]=new Node(currentNode.x + unit,currentNode.y);
  neighbours[1]=new Node(currentNode.x + unit,currentNode.y + unit);
  neighbours[2]=new Node(currentNode.x + unit,currentNode.y - unit);
  neighbours[3]=new Node(currentNode.x - unit,currentNode.y);
  neighbours[4]=new Node(currentNode.x - unit,currentNode.y + unit);
  neighbours[5]=new Node(currentNode.x - unit,currentNode.y - unit);
  neighbours[6]=new Node(currentNode.x,currentNode.y + unit);
  neighbours[7]=new Node(currentNode.x,currentNode.y - unit);
  for (  Node neighbour : neighbours) {
    if (closedList.contains(neighbour) || !quadTree.isFilled(new Vector2(neighbour.x,neighbour.y))) {
      continue;
    }
    neighbour.parent=currentNode;
    if (!openList.contains(neighbour) || openList.contains(neighbour) && distance(openList.get(openList.indexOf(neighbour)),goal) > distance(neighbour,goal)) {
      openList.add(neighbour);
    }
  }
}

private void expandNode ( Node currentNode ) { Node neighbours [ ] = new Node [ 8 ] ; neighbours [ 0 ] = new Node ( currentNode . x + unit , currentNode . y ) ; neighbours [ 1 ] = new Node ( currentNode . x + unit , currentNode . y + unit ) ; neighbours [ 2 ] = new Node ( currentNode . x + unit , currentNode . y - unit ) ; neighbours [ 3 ] = new Node ( currentNode . x - unit , currentNode . y ) ; neighbours [ 4 ] = new Node ( currentNode . x - unit , currentNode . y + unit ) ; neighbours [ 5 ] = new Node ( currentNode . x - unit , currentNode . y - unit ) ; neighbours [ 6 ] = new Node ( currentNode . x , currentNode . y + unit ) ; neighbours [ 7 ] = new Node ( currentNode . x , currentNode . y - unit ) ; for ( Node neighbour : neighbours ) { if ( closedList . contains ( neighbour ) || ! quadTree . isFilled ( new Vector2 ( neighbour . x , neighbour . y ) ) ) { continue ; } neighbour . parent = currentNode ; if ( ! openList . contains ( neighbour ) || openList . contains ( neighbour ) && distance ( openList . get ( openList . indexOf ( neighbour ) ) , goal ) > distance ( neighbour , goal ) ) { openList . add ( neighbour ) ; } } }
expand the openlist by the surrounding fields in the quadtree
