Skip to content

v1.1.4

Choose a tag to compare

@carldea carldea released this 11 Oct 04:05
· 4 commits to main since this release

A bug fix related to defining simple transitions such as .t("north"). The From or previous state is from the lastest To state that was set. e.g. .s(some state) or .t("transition1", toState).

  • new StatePattern().initial(STATE1).t("walk").s(STATE2) is
    initial ---> STATE1 --walk--> STATE2
  • new StatePattern().initial(STATE1).t("run") is
    initial ---> STATE1 --run--> STATE1
  • new StatePattern().initial(STATE1).t("jog", STATE2).t("sprint") is
    initial ---> STATE1 --jog--> STATE2 --sprint--> STATE2
  • new StatePattern().initial(STATE1).t("jog", STATE2).t("sprint", STATE3, STATE4) is
    initial ---> STATE1 --jog--> STATE2, STATE3 --sprint--> STATE4