AlecTroemel/phalanx-core

FSM undo transition

Closed this issue · 1 comments

The right way to do this is to extend FSM like this implementation https://github.com/davidchin/switchhub
1.a history field that tracks actions taken (along with parameters)
2. undoTransition that pops the last item in history, and goes the other way.
3. onundo_EVENT callbacks

this could then be backported to https://github.com/kyleconroy/lua-state-machine

  • fsm storing history
  • fsm undoTransition function
  • undo add
  • undo move
    • figure out how to store the "army" state
  • undo push
  • undo stone removals as a result of "life/death" rule. Need to find a way to store the "removed stones" as a result of an action on the history stack

this probably depends on #11