client = null;
    public void actionPerformed(java.awt.event.ActionEvent ev) {        for (int i = 0; i < 11; i++) {            if (ev.getSource() == butStartPos[i]) {                if (client.game.getOptions().booleanOption("double_blind") &&                    client.game.getOptions().booleanOption("exclusive_db_deployment")) {                    if (i == 0) {                        clientgui.doAlertDialog("Starting Position not allowed","In Double Blind play, you cannot choose 'Any' as starting position.");                        return;                    }                    for (Enumeration e = client.game.getPlayers();e.hasMoreElements();) {                        Player player = (Player)e.nextElement();                        if (player.getStartingPos() == 0) {                            continue;                        }                        // check for overlapping starting directions                        if ((player.getStartingPos() == i ||                            player.getStartingPos()+1 == i ||                            player.getStartingPos()-1 == i) &&                            player.getId() != client.getLocalPlayer().getId() ) {                           clientgui.doAlertDialog("Must choose exclusive deployment zone","When using double blind, each player needs to have an exclusive deployment zone.");                           return;                        }                    }                }                if(client.game.getOptions().booleanOption("deep_deployment") && i > 0 && i <= 9)                    i += 10;                client.getLocalPlayer().setStartingPos(i);                client.sendPlayerInfo();                // If the gameoption set_arty_player_homeedge is set,                // set all the player's offboard arty units to be behind the newly                // selected home edge.                if (client.game.getOptions().booleanOption("set_arty_player_homeedge")) { //$NON-NLS-1$                    int direction = IOffBoardDirections.NONE;                    switch(i) {                        case 0:                            break;                        case 1:                        case 2:                        case 3:                            direction = IOffBoardDirections.NORTH;                            break;                        case 4:                            direction = IOffBoardDirections.EAST;                            break;                        case 5:                        case 6:                        case 7:                            direction = IOffBoardDirections.SOUTH;                            break;                        case 8:                            direction = IOffBoardDirections.WEST;                            break;                        case 11:                        case 12:                        case 13:                            direction = IOffBoardDirections.NORTH;                            break;                        case 14:                            direction = IOffBoardDirections.EAST;                            break;                        case 15:                        case 16:                        case 17:                            direction = IOffBoardDirections.SOUTH;                            break;                        case 18:                            direction = IOffBoardDirections.WEST;                            break;                    }                    Enumeration thisPlayerArtyUnits = client.game.getSelectedEntities                    ( new EntitySelector() {                            public boolean accept( Entity entity ) {                                if ( entity.getOwnerId() == client.getLocalPlayer().getId() )                                    return true;                                return false;                            }                        } );                    while (thisPlayerArtyUnits.hasMoreElements()) {                        Entity entity = (Entity) thisPlayerArtyUnits.nextElement();                        if (entity.getOffBoardDirection() != IOffBoardDirections.NONE) {                            if (direction > IOffBoardDirections.NONE) {                                entity.setOffBoard(entity.getOffBoardDistance(), direction);                            }                        }                    }                }            }        }        setVisible(false);    }