AlecTroemel / phalanx-core

a board game that can be played on a computer, or 9x9 go board
1 stars 0 forks source link

FSM undo transition #7

Closed AlecTroemel closed 4 years ago

AlecTroemel commented 4 years ago

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)

  1. undoTransition that pops the last item in history, and goes the other way.
  2. onundo_EVENT callbacks

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

AlecTroemel commented 4 years ago

this probably depends on https://github.com/AlecTroemel/phallanx/issues/11