about summary refs log tree commit diff
path: root/src/Xanthous/App.hs
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2019-12-30T17·30-0500
committerGriffin Smith <root@gws.fyi>2019-12-30T17·30-0500
commitdcf44f29f5df75dedae62a9820b06d7c4cd36df1 (patch)
treeb713100df2e1a58c015af53771f0263ea4250f7a /src/Xanthous/App.hs
parente76567b9e776070812838828d8de8220c2a461e7 (diff)
Place doors on the level
Pick a random subset of cells on the level that have a wall on two
opposite sides and are clear on the other two sides, and place closed,
unlocked doors on those cells.
Diffstat (limited to 'src/Xanthous/App.hs')
-rw-r--r--src/Xanthous/App.hs6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/Xanthous/App.hs b/src/Xanthous/App.hs
index 2bdf6142f9fd..5fb70bd075b6 100644
--- a/src/Xanthous/App.hs
+++ b/src/Xanthous/App.hs
@@ -90,11 +90,7 @@ initLevel = do
     generateLevel SCaveAutomata CaveAutomata.defaultParams
     $ Dimensions 80 80
 
-  entities <>= (SomeEntity <$> level ^. levelWalls)
-  entities <>= (SomeEntity <$> level ^. levelItems)
-  entities <>= (SomeEntity <$> level ^. levelCreatures)
-  entities <>= (SomeEntity <$> level ^. levelTutorialMessage)
-
+  entities <>= levelToEntityMap level
   characterPosition .= level ^. levelCharacterPosition
 
 --------------------------------------------------------------------------------