UnitLocation loc = ( (UnitLocation) movePath.elementAt(0) );
int j = ((Integer) movePath.elementAt(0)).intValue(); int y = j & 255; int x = (j >> 8) & 255; int facing = (j >> 16) & 255;
    private synchronized boolean doMoveUnits(long idleTime) {        boolean movingSomething = false;        if (movingUnits.size() > 0) {            moveWait += idleTime;            if (moveWait > GUIPreferences.getInstance().getInt("AdvancedMoveStepDelay")) {                java.util.Vector spent = new java.util.Vector();                for (int i = 0; i < movingUnits.size(); i++) {                    Object[] move = (Object[]) movingUnits.elementAt(i);                    Entity e = (Entity) move[0];                    java.util.Vector movePath = (java.util.Vector) move[1];                    movingSomething = true;                    Entity ge = game.getEntity(e.getId());                     if (movePath.size() > 0) {                        UnitLocation loc =                            ( (UnitLocation) movePath.elementAt(0) );                        if (ge != null) {                            redrawMovingEntity( e,                                                loc.getCoords(),                                                loc.getFacing() );                        }                        movePath.removeElementAt(0);                    } else {                        if (ge != null) {                            redrawEntity(ge);                        }                        spent.addElement(move);                    }                }                for (int i = 0; i < spent.size(); i++) {                    Object[] move = (Object[]) spent.elementAt(i);                    movingUnits.removeElement(move);                }                moveWait = 0;                if (movingUnits.size() == 0) {                    movingEntitySpriteIds.clear();                    movingEntitySprites.removeAllElements();                    ghostEntitySprites.removeAllElements();                    processBoardViewEvent(new BoardViewEvent(this, BoardViewEvent.FINISHED_MOVING_UNITS));                }            }        }        return movingSomething;    }