about summary refs log tree commit diff
path: root/src/Xanthous/Game/Arbitrary.hs
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2020-01-05T17·55-0500
committerGriffin Smith <root@gws.fyi>2020-01-05T17·55-0500
commit0f79a06733c30ddca4bc0746ddc99e1626775fff (patch)
tree7f9bffb1740a531ac11c3130020bb86723bde5a8 /src/Xanthous/Game/Arbitrary.hs
parent6b0bab0e85266ce66836c4584f8cc83b307a3af5 (diff)
Add staircases, and moving between levels
Currently we just pick randomly between the cave and dungeon level
generators. There's a lot of bugs here, but it's *sorta* working, so I'm
leaving it as is.
Diffstat (limited to 'src/Xanthous/Game/Arbitrary.hs')
-rw-r--r--src/Xanthous/Game/Arbitrary.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Xanthous/Game/Arbitrary.hs b/src/Xanthous/Game/Arbitrary.hs
index 3be711099c23..d6f4784d55ff 100644
--- a/src/Xanthous/Game/Arbitrary.hs
+++ b/src/Xanthous/Game/Arbitrary.hs
@@ -5,7 +5,7 @@
 --------------------------------------------------------------------------------
 module Xanthous.Game.Arbitrary where
 --------------------------------------------------------------------------------
-import           Xanthous.Prelude hiding (levels, foldMap)
+import           Xanthous.Prelude hiding (foldMap)
 --------------------------------------------------------------------------------
 import           Test.QuickCheck
 import           System.Random
@@ -23,13 +23,13 @@ instance Arbitrary GameState where
     chr <- arbitrary @Character
     charPos <- arbitrary
     _messageHistory <- arbitrary
-    levels <- arbitrary
+    levs <- arbitrary
     let (_characterEntityID, currentLevel) =
           EntityMap.insertAtReturningID charPos (SomeEntity chr)
-          $ extract levels
-        _levels = levels & current .~ currentLevel
+          $ extract levs
+        _levels = levs & current .~ currentLevel
     _revealedPositions <- fmap setFromList . sublistOf
-                         $ foldMap EntityMap.positions levels
+                         $ foldMap EntityMap.positions levs
     _randomGen <- mkStdGen <$> arbitrary
     let _promptState = NoPrompt -- TODO
     _activePanel <- arbitrary