Play around with tesla arcs

This commit is contained in:
2025-01-16 12:18:25 +00:00
parent 5fb71cec39
commit 881b866ed2
11 changed files with 227 additions and 230 deletions
+10 -1
View File
@@ -1,4 +1,7 @@
module Dodge.Randify where
module Dodge.Randify (
gRandify,
runStateWorld,
) where
import Control.Lens
import Control.Monad.State
@@ -9,3 +12,9 @@ gRandify :: GenWorld -> State StdGen GenWorld -> GenWorld
gRandify gw mw =
let (gw', g) = runState mw (_randGen $ _gwWorld gw)
in gw' & gwWorld . randGen .~ g
-- this can possibly be done using zoom in a clever way
runStateWorld :: World -> State StdGen World -> World
runStateWorld gw mw =
let (gw', g) = runState mw (_randGen gw)
in gw' & randGen .~ g