private void checkLocation(WorldLocation l) {
        if (!checkedLocations.contains(l)) {
            if (l.getTile().canItemAlgorithmPass()) {
                newLocations.add(l);
                if (possibleItems.contains(l)) {
                    itemLocations.add(l);
                }
            } else if (l.getMetadata() instanceof TileMetadataDoor) {
                if (!((TileMetadataDoor) l.getMetadata()).isLocked()
                        || unlockedDoors.contains(((TileMetadataDoor) l.getMetadata()).getKeyId())) {
                    newLocations.add(l);
                    if (possibleItems.contains(l)) {
                        itemLocations.add(l);
                    }
                } else if (door == null) {
                    door = l;
                }
            }
        }
        
        checkedLocations.add(l);
    }