Fix new game resize bug

This commit is contained in:
2021-04-22 10:11:26 +02:00
parent 50e957818f
commit 60b2327909
6 changed files with 32 additions and 9 deletions
+4 -1
View File
@@ -392,6 +392,7 @@ blockedCorridor = do
n <- state $ randomR (0,3)
let plmnts = [PS (20,40) r $ PutBlock [5,5,5] (150/256, 75/256, 0, 250/256)
$ reverse $ rectNSWE 10 (-10) (-10) 10
,PS (20,15) 0 $ putLamp
]
sequence $ treePost (replicate n $ fmap Left $ randomiseOutLinks corridor)
$ fmap Right $ return $ set rmPS plmnts corridor
@@ -430,7 +431,9 @@ deadEndRoom = Room
where lnks = [((0,30) ,0)
]
{-
A random Either tree with a weapon and melee monster challenge.
-}
weaponRoom :: RandomGen g => State g (Tree (Either Room Room))
weaponRoom = do
x <- takeOne [ weaponEmptyRoom