if (target == null) {
if (target == null || target.equals(ce())) {
    public void boardHexMoused(BoardEvent b) {        if (!client.isMyTurn()             || (b.getModifiers() & MouseEvent.BUTTON1_MASK) == 0) {            return;        }        if (b.getType() == b.BOARD_HEX_DRAGGED) {            if (!b.getCoords().equals(client.game.board.lastCursor)) {                client.game.board.cursor(b.getCoords());                // either turn or move                client.bv.clearMovementData();                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) {            final Entity target = client.game.getEntity(b.getCoords());            client.game.board.select(b.getCoords());            client.bv.clearMovementData();            Coords moveto = b.getCoords();            client.bv.drawMovementData(ce(), cmd);            md = new MovementData(cmd);                        if (gear == Compute.GEAR_CHARGE) {                // check if target is valid                if (target == null) {                    client.doAlertDialog("Can't perform charge", "No target!");                    clearAllMoves();                    return;                }                                // check if it's a valid charge                ToHitData toHit = Compute.toHitCharge(client.game, cen, target.getId(), md);                if (toHit.getValue() != ToHitData.IMPOSSIBLE) {                    // if yes, ask them if they want to charge                                                // if they answer yes, charge                        moveTo(md);                        return;                                        // else clear movement                } else {                    // if not valid, tell why                    client.doAlertDialog("Can't perform charge", toHit.getDesc());                    clearAllMoves();                }            }                        butMove.setLabel("Move");            butMove.setEnabled(true);        }    }