protected boolean doChooseShip() {
        state = WAIT_SHIPCHOICE;
        try {
            //TODO: Load ship data from a file?
            this.state = TrekPlayer.WAIT_SHIPCHOICE;
            TrekLog.logMessage("User is choosing a ship...");
            boolean disconnect = false;
            String input;
            boolean passedCheck;
            String buffer1, buffer2;
            sendText("\r\n\r\nShip Classes:\r\n");
            buffer1 = TrekUtilities.format("  a", "Constitution II-A", 24);
            buffer2 = TrekUtilities.format("h", "Orion BR-5", 22);
            sendText(buffer1 + "     " + buffer2 + "\r\n");
            buffer1 = TrekUtilities.format("  b", "Excelsior", 24);
            buffer2 = TrekUtilities.format("i", "Orion BR-1000", 22);
            sendText(buffer1 + "     " + buffer2 + "\r\n");
            buffer1 = TrekUtilities.format("  c", "Larson", 24);
            buffer2 = TrekUtilities.format("j", "Gorn CL-13", 22);
            sendText(buffer1 + "     " + buffer2 + "\r\n");
            buffer1 = TrekUtilities.format("  d", "Freighter DY-600", 24);
            buffer2 = TrekUtilities.format("k", "Gorn CV-97", 22);
            sendText(buffer1 + "     " + buffer2 + "\r\n");
            buffer1 = TrekUtilities.format("  e", "Romulan Bird of Prey", 24);
            buffer2 = TrekUtilities.format("l", "Cardassian CDA-180", 22);
            sendText(buffer1 + "     " + buffer2 + "\r\n");
            buffer1 = TrekUtilities.format("  f", "Klingon EV-12", 24);
            buffer2 = TrekUtilities.format("m", "Cardassian CDA-120", 22);
            sendText(buffer1 + "     " + buffer2 + "\r\n");
            buffer1 = TrekUtilities.format("  g", "Klingon PB-13", 24);
            buffer2 = TrekUtilities.format("n", "Romulan Warbird", 22);
            sendText(buffer1 + "     " + buffer2 + "\r\n");
            sendText("\r\n");
            sendText("Experimental Vessels:\r\n");
            buffer1 = TrekUtilities.format("  o", "Klingon BOP", 24);
            buffer2 = TrekUtilities.format("r", "Gorn Scout", 22);
            sendText(buffer1 + "     " + buffer2 + "\r\n");
            buffer1 = TrekUtilities.format("  p", "Cardassian Galor", 24);
            buffer2 = TrekUtilities.format("s", "Romulan Interceptor", 22);
            sendText(buffer1 + "     " + buffer2 + "\r\n");
            buffer1 = TrekUtilities.format("  q", "Orion BR-2000", 24);
            buffer2 = TrekUtilities.format("t", "Federation Defiant", 22);
            sendText(buffer1 + "     " + buffer2 + "\r\n");
            sendText("\r\n");
            sendText("Classic Vessels:\r\n");
            buffer1 = TrekUtilities.format("  u", "Ferengi", 24);
            buffer2 = TrekUtilities.format("v", "Klingon D-10", 22);
            sendText(buffer1 + "     " + buffer2 + "\r\n");

            do {
                if (disconnect)
                    return false;
                sendText("\r\nEnter Class: ");
                do {
                    //input = getCharacterInput(false, true, false);
                    input = getBlockedInput(true, 60000, false);
                    if (input == null) {
                        disconnect = true;
                        break;
                    }
                    if (input.charAt(0) == 3)
                        return false;
                }
                while (input.equals(""));
                if (disconnect)
                    return false;
                input = input.toLowerCase();
                if (input.equals("a") || input.equals("b") || input.equals("c") || input.equals("d") || input.equals("e") || input.equals("f") || input.equals("g") || input.equals("h") || input.equals("i") || input.equals("j") || input.equals("k") || input.equals("l") || input.equals("m") || input.equals("n") || input.equals("o") || input.equals("p") || input.equals("q") || input.equals("r") || input.equals("s") || input.equals("t") || input.equals("u") || input.equals("v")) {
                    ship = TrekUtilities.getShip(input, this);
                    ship.setInitialDirection();
                    hud = new TrekHud(this);
                    passedCheck = true;
                    dbInt.loadTemplateKeymaps(this);
                    dbInt.saveNewShipRecord(this.ship);
                } else {
                    sendText("\r\nIllegal ship class.");
                    passedCheck = false;
                }
            }
            while (!passedCheck);
            TrekLog.logMessage("User finally chose a ship.");

            // display player specific login message
            String loginMessage = dbInt.getPlayerLoginMsg(dbPlayerID);
            if (loginMessage != null && !(loginMessage.equals(""))) {
                sendText("\r\n\r\n" + loginMessage.replaceAll("\n", "\r\n") + "\r\n");

                sendText("\r\nPress a key to proceed.");
                getBlockedInput(true, 60000, false);
            }

            state = WAIT_SUCCESSFULLOGIN;
            return true;
        } catch (Exception e) {
            TrekLog.logException(e);
            return false;
        }
    }