Cleanup
This commit is contained in:
+20
-13
@@ -1,5 +1,8 @@
|
||||
{-# LANGUAGE TupleSections #-}
|
||||
module Dodge.Room.Start where
|
||||
module Dodge.Room.Start
|
||||
( startRoom
|
||||
, randomChallenges
|
||||
) where
|
||||
import Dodge.UseAll
|
||||
import Dodge.Data
|
||||
import Dodge.LevelGen.Data
|
||||
@@ -53,12 +56,13 @@ startRoom i = join (takeOne
|
||||
[-- (,) (0.5::Float) ((chainUses <$> sequence [powerFakeout,fmap fst $weaponRoom i])
|
||||
-- <&> (,TreeSubLabelling "chainUses <$> sequence [powerFakeout,weaponRoom i]" Nothing))
|
||||
-- wat
|
||||
-- rezBoxesWp >>= rToOnward "rezBoxesWp"
|
||||
-- , rezBoxThenWeaponRoom i
|
||||
-- , rezBoxesWpCrit >>= rToOnward "rezBoxesWpCrit"
|
||||
runPastStart i >>= rToOnward ("runPastStart " ++ show i)
|
||||
-- , startCrafts >>= roomsContaining' [] >>= rezBoxThenRooms
|
||||
-- >>= rToOnward "startCrafts >>= roomsContaining [] >>= rezBoxThenRooms"
|
||||
-- rezBoxesWp >>= rToOnward "rezBoxesWp"
|
||||
attachOnward "rezBoxThenWeaponRoom" <$> preCritStart <*> weaponRoom i
|
||||
-- startThenWeaponRoom i
|
||||
-- rezBoxesWpCrit >>= rToOnward "rezBoxesWpCrit"
|
||||
-- runPastStart i >>= rToOnward ("runPastStart " ++ show i)
|
||||
-- startCrafts >>= roomsContaining' [] >>= preCritStart
|
||||
-- >>= rToOnward "startCrafts >>= roomsContaining [] >>= preCritStart"
|
||||
])
|
||||
randomChallenges :: RandomGen g => State g (MetaTree Room String)
|
||||
randomChallenges = shootingRange
|
||||
@@ -84,18 +88,21 @@ rezBoxesThenWeaponRoom :: RandomGen g => Int -> State g (MetaTree Room String)
|
||||
rezBoxesThenWeaponRoom i = do
|
||||
rboxes <- rezBoxes
|
||||
wroom <- weaponRoom i
|
||||
return $ tToBTree "rboxes" rboxes `attachOnward` wroom
|
||||
return $ attachOnward "rezBoxesThenWeaponRoom" rboxes wroom
|
||||
|
||||
rezBoxThenWeaponRoom :: RandomGen g => Int -> State g (MetaTree Room String)
|
||||
rezBoxThenWeaponRoom i = do
|
||||
rcol <- rezColor
|
||||
preCritStart :: RandomGen g => State g (MetaTree Room String)
|
||||
preCritStart = join $ takeOne [rezBoxes,rezBox']
|
||||
|
||||
startThenWeaponRoom :: RandomGen g => Int -> State g (MetaTree Room String)
|
||||
startThenWeaponRoom i = do
|
||||
startrm <- preCritStart
|
||||
wroom <- weaponRoom i
|
||||
return $ tToBTree "rezbox" (treePost [rezBox rcol, cleatOnward door]) `attachOnward` wroom
|
||||
return $ attachOnward "rezBoxThenWeaponRoom" startrm wroom
|
||||
|
||||
rezBoxThenRoom :: RandomGen g => Room -> State g (Tree Room)
|
||||
rezBoxThenRoom r = do
|
||||
rcol <- rezColor
|
||||
return $ treeFromTrunk [ rezBox rcol, door] $ pure r
|
||||
return $ treeFromTrunk [ rezBox rcol, cleatOnward door] $ pure r
|
||||
|
||||
rezBoxThenRooms :: RandomGen g => Tree Room -> State g (Tree Room)
|
||||
rezBoxThenRooms r = do
|
||||
|
||||
Reference in New Issue
Block a user