protected boolean readYN() {
        String result = "";
        while (result.equals("")) {
            String in = scanner.nextLine();
            if (in.equalsIgnoreCase("y") || in.equalsIgnoreCase("n"))
                result = in;
            else System.out.println("Please type either 'y' or 'n'.");
        }
        return result.equals("y");
    }