I found the coding of a FSM is very simple if you can extract the right states of a problem successfully and draw it out in StateFlow chart or ASM chart.
And the problem is , How to extract the right states of a problem and draw a good chart for the states and its transitions.
Any book have a good solution to this problem, or something help clues please.