private boolean isBlocked(int x, int y) {
        int key = genKey(x, y);
        boolean tileblocked = true;
        if (tileHashMap.containsKey(key)) {
            tileblocked = tileHashMap.get(key).isOpaque();
        }
        boolean entblocked = false;
        if (entities.containsKey(key)) {
            ArrayList<Entity> ents = entities.get(key);
            for (int c = 0; c < ents.size(); c++) {
                Entity ent = ents.get(c);
                if (!ent.isOpaque()) {
                    entblocked = true;
                }
            }
        }
        return entblocked && tileblocked;
    }