about summary refs log tree commit diff
path: root/src/Xanthous/Generators/LevelContents.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Xanthous/Generators/LevelContents.hs')
-rw-r--r--src/Xanthous/Generators/LevelContents.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Xanthous/Generators/LevelContents.hs b/src/Xanthous/Generators/LevelContents.hs
index aaeb4a77fdda..96d64a693774 100644
--- a/src/Xanthous/Generators/LevelContents.hs
+++ b/src/Xanthous/Generators/LevelContents.hs
@@ -45,6 +45,8 @@ randomDoors cells = do
     candidateCells = filter doorable $ Arr.indices cells
     subsetRange = (0.8 :: Double, 1.0)
     doorable (x, y) =
+      not (fromMaybe True $ cells ^? ix (x, y))
+      &&
       ( fromMaybe True $ cells ^? ix (x - 1, y) -- left
       , fromMaybe True $ cells ^? ix (x, y - 1) -- top
       , fromMaybe True $ cells ^? ix (x + 1, y) -- right