entity.setGame(this);
    public void setEntity(int id, Entity entity) {        final Entity oldEntity = getEntity(id);        entities.setElementAt(entity, entities.indexOf(oldEntity));        entityIds.put(new Integer(id), entity);    }