Refactor creature ai
This commit is contained in:
@@ -28,7 +28,9 @@ impulsiveAIR
|
||||
-> (World -> World, StdGen)
|
||||
-> Creature
|
||||
-> ((World -> World, StdGen) , Maybe Creature)
|
||||
impulsiveAIR impf w (f,g) cr = followImpulses w (f,g) . ($ w) . runReader . impf $ cr
|
||||
impulsiveAIR impf w (f,g) = followImpulses w (f,g') . ($ w) . runReader . impf
|
||||
where
|
||||
(g',_) = split g
|
||||
|
||||
impulsiveAI
|
||||
:: (World -> Creature -> Creature) -- ^ Internal AI update, should determine impulses
|
||||
|
||||
Reference in New Issue
Block a user