public void getInput() {
   
        String command = null;
        Scanner inFile = new Scanner(System.in);

        do {
            try{
            this.display(); // display the menu

            // get commaned entered
            command = inFile.nextLine();
            command = command.trim().toUpperCase();
            
            switch (command) {
                case "T":
                    this.gameMenuControl.takeTurn();
                    break;
                case "D":
                    gameMenuControl.displayBoard();
                    break;
                case "N":
                    gameMenuControl.startNewGame();
                    break;
                case "R":
                    gameMenuControl.displayStatistics();
                    break;
                case "P":
                    gameMenuControl.displayPreferencesMenu();
                    break;
                case "H":
                    gameMenuControl.displayHelpMenu();
                    break;
                case "Q":                   
                    break;
                default: 
                    new BattleshipError().displayError("Invalid command. Please enter a valid command.");
            }
        } catch (GameException e) {
                    System.out.println("\n" + e.getMessage());
                }  
        } while (!command.equals("Q"));
    }