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)
undoTransition that pops the last item in history, and goes the other way.
[x] 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
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)undoTransition
that pops the last item in history, and goes the other way.onundo_EVENT
callbacksthis could then be backported to https://github.com/kyleconroy/lua-state-machine