public void createEntity(Entity e) {
        Point pos = e.getPosition();
        int key = genKey(pos.getX(), pos.getY());
        if (!entities.containsKey(key)) {
            entities.put(key, new ArrayList<Entity>());
        }
        entities.get(key).add(e);
    }