entity.setGame(this);
    private void reindexEntities() {        entityIds.clear();        for (Enumeration i = entities.elements(); i.hasMoreElements();) {            final Entity entity = (Entity)i.nextElement();            entityIds.put(new Integer(entity.getId()), entity);        }    }