Create the BGA State Machine boilerplate from a DOT Graphviz diagram.
Composer is used to fetch various dependencies
After creating a state machine with the DOT language, you should also add:
label
to all edges (transitions) which are not the default transition of""
type
,possibleActions
,description
anddescriptionmyturn
to all verticies (states)
After creating a state machine in the DOT Language, run
php generate_state_machine.php statemachine.dot outfolder
This will generate the following in outfolder
The state argument functions
The consts generated for each state number
Minimum boilerplate for the specified actions
Functions which are called upon entering each state
The BGA State Machine, can replace states.inc.php
A demo state machine for Eminent Domain has been included