pyherc
pyherc copied to clipboard
ai fsm
add ai fsm (finite state machine) language:
(ai-fsm Skeleton
(patrol [model actions]
...
(when (enemy-close? self) (transition-to attack {})))
(attack [model actions rng]
...
(transition-to patrol {}))))
Expands to class Skeleton with act method and respective methods for handling different states.