Allow for random choice between placements in different rooms
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user