private void addNeighbors(GridNode node, boolean cutCorners)
    {
        int x = node.getX(); int y = node.getY();
        for(int dy = -1; dy <= 1; dy++) {
            for(int dx = 1; dx >= -1; dx--) {
                GridNode neighbor = myGrid.getNode(x + dx, y + dy);
                if(isValidNeighbor(node, neighbor)) 
                {
                    if(!(dx != 0 && dy != 0) || cutCorners)
                    {
                        if(!openList.contains(neighbor))
                        {
                            neighbor.setParent(node);
                            calculateNodeScore(neighbor);
                            openList.add(neighbor);
                        }
                        else if(calcuateGScore(node, neighbor) + node.getGScore() < neighbor.getGScore()) //If the path through us is better
                        {
                            neighbor.setParent(node);
                            calculateNodeScore(neighbor);
                        }
                    }
                }
            }
        }
    }//end addNeighbors