Add destroyable lighting

This commit is contained in:
2021-03-27 11:59:34 +01:00
parent 151fa5b6bd
commit 2897c65e9e
7 changed files with 135 additions and 143 deletions
+12
View File
@@ -0,0 +1,12 @@
module Dodge.Creature.Update
where
import Dodge.Data
import System.Random
-- combinators for helping with dealing with creature update
type CRUpdate = World -> (World -> World,StdGen) -> Creature -> ((World -> World,StdGen), Maybe Creature)
unrandUpdate :: (Creature -> World -> World) -> (Creature -> Maybe Creature)
-> CRUpdate
unrandUpdate h cF w (f,g) cr = ( ( h cr . f , g) , cF cr )