private Scenery AStarAlgorithm(MovableEntity goal, List<Scenery> opened, List<Scenery> closed) {
    while (opened.size() > 0) {
      for (Scenery scenery : closed) {
        scenery.highLight();
      }
      for (Scenery scenery : opened) {
        scenery.highLight2();
      }
      // choose the best Scenery (based on F score) in opened and add it to
      // the
      // closed list and remove it from the list
      Scenery best = findBestFScore(goal, opened);
      opened.remove(best);
      closed.add(best);
      // if the one we choose is our goal then be and populate best list
      if (best.equals(goal.getTileIAmIn())) {
        if (closed.size() <= 0) {
          return null;
        } else {
          return closed.get(0);
        }
      } else {
        // else we get the neighbors of the best choice and iterate through
        // them
        Set<Scenery> neighbors = getAdjacencies(best);
        for (Scenery neighbor : neighbors) {
          // if our choice (a specific neighor chosen by the iterator) was one
          // we previously marked as "open" or "closed" (by putting it in the
          // respective list) then check if changing the parent of our choice
          // to
          // this path is better than the path it was on. if it is better then
          // let it be. if it is not do the ordinary operations of adding it
          // to
          // the list

          // check suceeds skip everything
          if (opened.contains(neighbor) || closed.contains(neighbor)) {
            // no need to check its type or anything because only walkable
            // tiles are allowed in to the opened list.
            Scenery tmpSquare = new EmptySpace(neighbor);
            tmpSquare.setParent(best);
            if (tmpSquare.getFCost(goal.getTileIAmIn()) >= neighbor.getFCost(goal.getTileIAmIn())) {
              continue;
            }
          }
          // if it fails continue and place the neighbor at the beginning of
          // the
          // opened list and remove it from the closed list
          neighbor.setParent(best);
          opened.remove(neighbor);
          closed.remove(neighbor);
          opened.add(0, neighbor);
        }
      }
    }
    return null;
  }