Enumeration choices = null;
Enumeration choices;
    private Targetable chooseTarget(Coords pos) {        boolean friendlyFire = client.game.getOptions().booleanOption("friendly_fire"); //$NON-NLS-1$        // Assume that we have *no* choice.        Targetable choice = null;        Enumeration choices = null;                // Get the available choices, depending on friendly fire        if (friendlyFire) {            choices = client.game.getEntities(pos);        } else            choices = client.game.getEnemyEntities(pos, ce());                // Convert the choices into a List of targets.        Vector targets = new Vector();        while (choices.hasMoreElements()) {            choice = (Targetable) choices.nextElement();            if (!ce().equals(choice)) {                targets.addElement(choice);            }        }        // Is there a building in the hex?        Building bldg = client.game.getBoard().getBuildingAt(pos);        if (bldg != null) {            targets.addElement(new BuildingTarget(pos, client.game.getBoard(), false));        }        // Do we have a single choice?        if (targets.size() == 1) {            // Return  that choice.            choice = (Targetable) targets.elementAt(0);        }        // If we have multiple choices, display a selection dialog.        else if (targets.size() > 1) {            String[] names = new String[targets.size()];            for (int loop = 0; loop < names.length; loop++) {                names[loop] = ((Targetable) targets.elementAt(loop))                        .getDisplayName();            }            SingleChoiceDialog choiceDialog =                    new SingleChoiceDialog(clientgui.frame,                            Messages.getString("FiringDisplay.ChooseTargetDialog.title"), //$NON-NLS-1$                            Messages.getString("FiringDisplay.ChooseTargetDialog.message", new Object[]{pos.getBoardNum()}), //$NON-NLS-1$                            names);            choiceDialog.setVisible(true);            if (choiceDialog.getAnswer()) {                choice = (Targetable) targets.elementAt                        (choiceDialog.getChoice());            }        } // End have-choices        // Return the chosen unit.        return choice;    } // End private Targetable chooseTarget( Coords )