Add random generator update when creature does random turn
This commit is contained in:
@@ -18,6 +18,7 @@ import Sound.Data
|
||||
import Geometry
|
||||
import LensHelp
|
||||
|
||||
--import System.Random
|
||||
import Data.List
|
||||
import Data.Maybe
|
||||
--import Data.Function
|
||||
@@ -45,6 +46,7 @@ updateUniverse u = case _menuLayers u of
|
||||
{- | The update step. -}
|
||||
functionalUpdate :: Configuration -> World -> World
|
||||
functionalUpdate cfig w = checkEndGame
|
||||
-- . updateRandGen
|
||||
. (worldClock +~ 1)
|
||||
. doRewind
|
||||
. updateDistortions
|
||||
@@ -83,6 +85,10 @@ functionalUpdate cfig w = checkEndGame
|
||||
where
|
||||
(x,y) = cloudZoneOfPoint $ stripZ $ _clPos cl
|
||||
|
||||
-- hack
|
||||
--updateRandGen :: World -> World
|
||||
--updateRandGen = randGen %~ (snd . (uniform :: StdGen -> (Int,StdGen)))
|
||||
|
||||
doRewind :: World -> World
|
||||
doRewind w = case _maybeWorld w of
|
||||
Just' w' -> w' & timeFlow .~ RewindingLastFrame
|
||||
|
||||
Reference in New Issue
Block a user