Refactor creature ai

This commit is contained in:
2021-05-20 21:25:42 +02:00
parent 4463dc7716
commit 114335fdbe
32 changed files with 449 additions and 270 deletions
+3 -1
View File
@@ -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