private boolean doMoveUnits(long idleTime) {
private synchronized boolean doMoveUnits(long idleTime) {
    private boolean doMoveUnits(long idleTime) {    	boolean movingSomething = false;		if (movingUnits.size() > 0) {		    	moveWait += idleTime;		    	if (moveWait > Settings.moveStepDelay) {		    	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;		    			if (movePath.size() > 0) { 	    				int j = ((Integer) movePath.elementAt(0)).intValue();	    				int y = j & 255;	    				int x = (j >> 8) & 255;	    				int facing = (j >> 16) & 255;	    					    				redrawMovingEntity(e, new Coords(x, y), facing);	    				movePath.removeElementAt(0);	    			} else {	    				redrawEntity(game.getEntity(e.getId()));	    				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;	}