Polymorphise meta tree labels

This commit is contained in:
2022-06-13 15:22:15 +01:00
parent 31e7f4290e
commit 7a07fc97c2
19 changed files with 67 additions and 97 deletions
+3 -3
View File
@@ -38,7 +38,7 @@ import Data.List (intersperse)
initialAnoTree :: Annotation
initialAnoTree = OnwardList
$ intersperse (SpecificRoom $ tToBTree . pure <$> shuffleLinks (cleatOnward corridor))
$ intersperse (SpecificRoom $ tToBTree "cori" . pure <$> shuffleLinks (cleatOnward corridor))
[ IntAnno $ SpecificRoom . startRoom
-- , (SpecificRoom . return . tToBTree $ treePost [corridor,corridor,cleatOnward corridor])
, IntAnno $ PassthroughLockKeyLists
@@ -50,7 +50,7 @@ initialAnoTree = OnwardList
[ spNoID anyUnusedSpot (PutCrit invisibleChaseCrit)
, spNoID anyUnusedSpot (PutCrit armourChaseCrit)
]
, IntAnno $ SpecificRoom . fmap tToBTree . healthTest
, IntAnno $ SpecificRoom . fmap (tToBTree "healthTest") . healthTest
, SpecificRoom (tanksRoom [] [] >>= rToOnward "empty tanksRoom" . pure . cleatOnward)
, IntAnno $ PassthroughLockKeyLists lockRoomKeyItems itemRooms
, SpecificRoom randomChallenges
@@ -100,5 +100,5 @@ initialAnoTree = OnwardList
]
{- | A test level tree. -}
initialRoomTree :: State (StdGen,Int) (MetaTree Room)
initialRoomTree :: State (StdGen,Int) (MetaTree Room String)
initialRoomTree = annoToRoomTree initialAnoTree