if (cen.getEntity().isImmobile()) {
if (game.getOptions().booleanOption("skip_ineligable_movement") && cen.getEntity().isImmobile()) {
    public MovePath calculateMoveTurn() {        long enter = System.currentTimeMillis();        int initiative = 0;        MoveOption min = null;        System.out.println("beginning movement calculations...");        //first check and that someone else has moved so we don't replan        Object[] enemy_array = this.getEnemyEntities().toArray();        for (int j = 0; j < enemy_array.length; j++) {            if (!((Entity) enemy_array[j]).isSelectableThisTurn(game)) {                initiative++;            }        }        // if nobody's moved and we have a valid move waiting, use that        if (initiative == enemies_moved && old_moves != null) {            min = this.old_moves.getResult();            if (min == null                || !min.isMoveLegal()                || (min.isPhysical && centities.get(min.getPhysicalTargetId()).isPhysicalTarget)) {                this.old_moves = null;                System.out.println("recalculating moves since the old move was invalid");                return calculateMoveTurn();            }        } else {            enemies_moved = initiative;            Vector possible = new Vector();            Enumeration e = game.getEntities();            while (e.hasMoreElements()) {                Entity entity = (Entity) e.nextElement();                CEntity cen = centities.get(entity);                cen.refresh();                firstPass(cen);            }            Iterator i = this.getEntitiesOwned().iterator();            boolean short_circuit = false;            while (i.hasNext()) {                Entity entity = (Entity) i.next();                CEntity cen = centities.get(entity);                // if we can't move this entity right now, ignore it                if (!game.getTurn().isValidEntity(entity, game)) {                    continue;                }                System.out.println("Contimplating movement of " + entity.getShortName() + " " + entity.getId());                MoveOption[] result = calculateMove(entity);                if (cen.getEntity().isImmobile()) {                    cen.moved = true;                } else if (!cen.moved) {                    if (result.length < 6 && result.length > 0) {                        //move to the head of the class...                        min = (MoveOption) result[0];                        short_circuit = true;                        //break;                    }                    possible.add(result);                }            }            //should ignore mechs that are not engaged            //and only do the below when there are 2 or mechs left to move            if (!short_circuit) {                if (this.getEntitiesOwned().size() > 1) {                    GALance lance = new GALance(this, possible, 50, 80);                    lance.evolve();                    min = lance.getResult();                    this.old_moves = lance;                } else if (((MoveOption[]) possible.elementAt(0)).length > 0) {                    min = ((MoveOption[]) possible.elementAt(0))[0];                }            }        }        if (min == null) {            min = new MoveOption(game, centities.get(getFirstEntityNum()));        }        for (int d = 0; d < enemy_array.length; d++) {            Entity en = (Entity) enemy_array[d];            CEntity enemy = centities.get(en);            int enemy_hit_arc =                CEntity.getThreatHitArc(                    enemy.current.getFinalCoords(),                    enemy.current.getFinalFacing(),                    min.getFinalCoords());            MoveOption.DamageInfo di = (MoveOption.DamageInfo) min.damageInfos.get(enemy);            if (di != null) {                enemy.expected_damage[enemy_hit_arc] += di.min_damage;            }            if (enemy.expected_damage[enemy_hit_arc] > 0) {                enemy.hasTakenDamage = true;            }        }        if (min.isPhysical) {            centities.get(min.getPhysicalTargetId()).isPhysicalTarget = true;        }        System.out.println(            min.getEntity().getShortName()                + " "                + min.getEntity().getId()                + " "                + min.getFinalCoords()                + " "                + min.toString()                + "\n Utility: "                + min.getUtility()                + " \n"                + min.tv                + "\n");        min.getCEntity().current = min;        min.getCEntity().last = min;        this.my_mechs_moved++;        min.getCEntity().moved = true;        long exit = System.currentTimeMillis();        System.out.println("move turn took " + (exit - enter) + " ms");        return min;    }