Vector v = this.getLoadedUnits(); Enumeration iter = v.elements(); while (iter.hasMoreElements()) { ((Entity)iter.nextElement()).setGame(game); }
    public void setGame(Game game) {        this.game = game;        this.restore();        // Make sure the owner is set.        if ( null == owner ) {            if ( Entity.NONE == ownerId ) {                throw new IllegalStateException                    ( "Entity doesn't know its owner's ID." );            } else {                setOwner( game.getPlayer(ownerId) );            }        }    }