public boolean isRoadValid(MapEdge edge) {
        int graphState = PathFinder.getState();
        int type = edge.getType();
        String oneway = edge.getOneWay();

        if (graphState == 0) { /* car graph */
            if (oneway.equalsIgnoreCase("n") || edge.getMaxSpeed() == 0 || type == 8 || type == 48) {
                view.showWarningForSelectedRoad(graphState);
                return false;
            } else {
                return true;
            }
        } else { /* walk graph */
            if (type == 1 || type == 31 || type == 41) { /* Highway */
                view.showWarningForSelectedRoad(graphState);
                return false;
            } else {
                return true;
            }
        }
    }