if (b.getType() == b.BOARD_HEX_DRAGGED) {
if (b.getType() == BoardEvent.BOARD_HEX_DRAGGED) {
    public void boardHexMoused(BoardEvent b) {        // ignore buttons other than 1        if (!client.isMyTurn() || (b.getModifiers() & MouseEvent.BUTTON1_MASK) == 0) {            return;        }        // check for shifty goodness        if (shiftheld != ((b.getModifiers() & MouseEvent.SHIFT_MASK) != 0)) {            shiftheld = (b.getModifiers() & MouseEvent.SHIFT_MASK) != 0;        }        if (b.getType() == b.BOARD_HEX_DRAGGED) {            if (!b.getCoords().equals(client.game.board.lastCursor) || shiftheld || gear == Compute.GEAR_TURN) {                client.game.board.cursor(b.getCoords());                // either turn or move                cmd = md.getAppended(currentMove(md.getFinalCoords(ce().getPosition(), ce().getFacing()), md.getFinalFacing(ce().getFacing()), b.getCoords()));                client.bv.drawMovementData(ce(), cmd);            }        } else if (b.getType() == b.BOARD_HEX_CLICKED) {            Coords moveto = b.getCoords();            client.bv.drawMovementData(ce(), cmd);            md = new MovementData(cmd);            client.game.board.select(b.getCoords());            if (shiftheld || gear == Compute.GEAR_TURN) {                butDone.setLabel("Move");                return;            }            if (gear == Compute.GEAR_CHARGE) {                // check if target is valid                final Targetable target = this.chooseTarget( b.getCoords() );                if (target == null || target.equals(ce())) {                    client.doAlertDialog("Can't perform charge", "No target!");                    clearAllMoves();                    gear = Compute.GEAR_LAND;                    return;                }                // check if it's a valid charge                ToHitData toHit = Compute.toHitCharge( client.game,                                                       cen,                                                       target,                                                       md);                if (toHit.getValue() != ToHitData.IMPOSSIBLE) {                    // Determine how much damage the charger will take.                    int toAttacker = 0;                    if ( target.getTargetType() == Targetable.TYPE_ENTITY ) {                        Entity te = (Entity) target;                        toAttacker = Compute.getChargeDamageTakenBy(ce(),te);                    }                    else if ( target.getTargetType() ==                              Targetable.TYPE_BUILDING ) {                        Building bldg = client.game.board.getBuildingAt                            ( moveto );                        toAttacker = Compute.getChargeDamageTakenBy(ce(),bldg);                    }                    // Ask the player if they want to charge.                    if ( client.doYesNoDialog                         ( "Charge " + target.getDisplayName() + "?",                           "To Hit: " + toHit.getValueAsString() +                           " (" + Compute.oddsAbove(toHit.getValue()) +                           "%)   (" + toHit.getDesc() + ")"                           + "\nDamage to Target: "+                           Compute.getChargeDamageFor(ce(),md.getHexesMoved())+                           " (in 5pt clusters)"+ toHit.getTableDesc()                           + "\nDamage to Self: " +                           toAttacker +                           " (in 5pt clusters)" ) ) {                        // if they answer yes, charge the target.                        md.getStep(md.length()-1).setTarget(target);                        moveTo(md);                    } else {                        // else clear movement                        clearAllMoves();                    };                    return;                } else {                    // if not valid, tell why                    client.doAlertDialog( "Can't perform charge",                                          toHit.getDesc() );                    clearAllMoves();                    gear = Compute.GEAR_LAND;                    return;                }            } else if (gear == Compute.GEAR_DFA) {                // check if target is valid                final Targetable target = this.chooseTarget( b.getCoords() );                if (target == null || target.equals(ce())) {                    client.doAlertDialog("Can't perform D.F.A.", "No target!");                    clearAllMoves();                    gear = Compute.GEAR_LAND;                    return;                }                // check if it's a valid DFA                ToHitData toHit = Compute.toHitDfa( client.game,                                                    cen,                                                    target,                                                    md);                if (toHit.getValue() != ToHitData.IMPOSSIBLE) {                    // if yes, ask them if they want to DFA                    if ( client.doYesNoDialog                         ( "D.F.A. " + target.getDisplayName() + "?",                           "To Hit: " + toHit.getValueAsString() +                           " (" + Compute.oddsAbove(toHit.getValue()) +                           "%)   (" + toHit.getDesc() + ")"                           + "\nDamage to Target: " +                           Compute.getDfaDamageFor(ce()) +                           " (in 5pt clusters)" + toHit.getTableDesc()                           + "\nDamage to Self: " +                           Compute.getDfaDamageTakenBy(ce()) +                           " (in 5pt clusters) (using Kick table)" ) ) {                        // if they answer yes, DFA the target                        md.getStep(md.length()-1).setTarget(target);                        moveTo(md);                    } else {                        // else clear movement                        clearAllMoves();                    };                    return;                } else {                    // if not valid, tell why                    client.doAlertDialog( "Can't perform D.F.A.",                                          toHit.getDesc() );                    clearAllMoves();                    gear = Compute.GEAR_LAND;                    return;                }            }            butDone.setLabel("Move");            updateProneButtons();            updateRACButton();            updateLoadButtons();        }    }