Refactor, try to limit dependencies
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
module Dodge.Creature.ChainUpdates where
|
||||
import Dodge.Data
|
||||
|
||||
import Data.Foldable
|
||||
import Dodge.Data.World
|
||||
|
||||
chainCreatureUpdates
|
||||
:: [World -> Creature -> Creature]
|
||||
-> World -> Creature -> Creature
|
||||
chainCreatureUpdates ::
|
||||
[World -> Creature -> Creature] ->
|
||||
World ->
|
||||
Creature ->
|
||||
Creature
|
||||
chainCreatureUpdates ls w cr = foldl' unf cr ls
|
||||
where
|
||||
unf cr' g = g w cr'
|
||||
|
||||
Reference in New Issue
Block a user