private static void algorithmPrompt(Graph g) {
        String algorithmChoice;
        if (!g.hasNegativeWeights()) {
            while (true) {
                System.out.println("Which algorithm to use?");
                System.out.println("  b - Breadth-first search");
                System.out.println("  d - Dijkstra's algorithm");
                algorithmChoice = s.nextLine();
                if (algorithmChoice.equals("b")) {
                    AlgorithmInterface.setAlgorithm(new BreadthFirstSearch(GraphInterface.getGraph()));
                    break;
                } else if (algorithmChoice.equals("d")) {
                    AlgorithmInterface.setAlgorithm(new Dijkstra(GraphInterface.getGraph()));
                    break;
                }
            }
        } else {
            System.out.println("Graph has negative edge weights so breadth-first search will be used.");
            AlgorithmInterface.setAlgorithm(new BreadthFirstSearch(GraphInterface.getGraph()));
        }

        UILogic.start();
    }