Chapter 2. Refactor the code
~~~~~~~~~~~~~~~~~~~~~~~
Before we start to build the whole FSM, we need to do some little code refactor here. Shrink down the generated chess to 2 rows only:
Disable Event#3 & 7. We don't need "loop" fuction anymore. We will build a self looping FSM.
Add return values for "match3" & "matchL" & "dropdown" functions. Return values help us to know if there is any chess being operated or not. Event#19 changed to signaling style structure.