Allow for random choice between placements in different rooms

This commit is contained in:
2021-11-26 12:20:20 +00:00
parent aad79bdf25
commit 123bcd2c94
27 changed files with 260 additions and 191 deletions
+11
View File
@@ -0,0 +1,11 @@
module Dodge.Randify where
import Dodge.Data
import Dodge.LevelGen.LevelStructure
import System.Random
import Control.Monad.State
import Control.Lens
gRandify :: GenWorld -> State StdGen GenWorld -> GenWorld
gRandify gw mw = let (gw',g) = runState mw (_randGen $ _gWorld gw)
in gw' & gWorld . randGen .~ g