public static boolean yesTo(Scanner console, String prompt) {
        for (;;) {
            System.out.print(prompt + " (y/n)? ");
            String response = console.nextLine().trim().toLowerCase();
            if (response.equals("y"))
                return true;
            else if (response.equals("n"))
                return false;
            else
                System.out.println("Please answer y or n.");
        }
    }