private int getColumn() {
        Scanner inFile = new Scanner(System.in);
        String column = null;
        boolean valid = false;
        while (!valid) {
            column = inFile.nextLine(); //gets input
                   if ("1".equals(column) || "2".equals(column) || "3".equals(column)
                    || "4".equals(column) || "5".equals(column) 
                    || "6".equals(column) || "7".equals(column))
                valid = true;
        else {
                System.out.println("Invalid command. Please enter a valid command.");
                continue;
            }            
        }
        int columnInt = Integer.parseInt(column)-1;
        return columnInt;
    }