<?xml version="1.0" encoding="utf-8" ?>
<c2eventsheet>
    <!--All the 'name' attributes are ignored by Construct 2 - they are there for readability only.-->
    <name>main_fsm es</name>
    <events>
        <comment>------ DEBUG ------</comment>
        <event-block sid="682753848179786">
            <conditions>
                <condition id="5" name="On state changed" sid="582914559555835" type="MainFSM" />
                <condition id="-14" name="Compare variable" sid="776799426954274" type="System">
                    <param id="0" name="Variable">previewMode</param>
                    <param id="1" name="Comparison">0</param>
                    <param id="2" name="Value">1</param>
                </condition>
            </conditions>
            <actions>
                <action id="14" name="Log" sid="343271924813616" type="Browser">
                    <param id="0" name="Type">0</param>
                    <param id="1" name="Message">&quot;Main: &quot; &amp; MainFSM.CurState</param>
                </action>
            </actions>
        </event-block>
        <event-block sid="659696938362325">
            <conditions>
                <condition id="0" name="On function" sid="852789645933381" type="Function">
                    <param id="0" name="Name">&quot;main.fsm.init&quot;</param>
                </condition>
            </conditions>
            <actions>
                <action id="0" name="Call function" sid="775033125233431" type="Function">
                    <param id="0" name="Name">&quot;main.fsm.goto&quot;</param>
                    <param id="1" name="Parameter {n}">STATUS_INIT</param>
                </action>
            </actions>
        </event-block>
        <comment>enter state</comment>
        <event-block sid="453406311867795">
            <conditions>
                <condition id="0" name="On enter" sid="696620819711779" type="MainFSM">
                    <param id="0" name="Name">str(gameStatus)</param>
                </condition>
                <condition id="-8" name="Compare two values" sid="363484935422096" type="System">
                    <param id="0" name="First value">MainFSM.PreState</param>
                    <param id="1" name="Comparison">1</param>
                    <param id="2" name="Second value">str(STATUS_PAUSE)</param>
                </condition>
            </conditions>
            <actions>
                <action id="-9" name="Set value" sid="922157162007535" type="System">
                    <param id="0" name="Variable">gameStatusPre</param>
                    <param id="1" name="Value">MainFSM.PreState</param>
                </action>
            </actions>
            <sub-events>
                <comment>After init requst to next state</comment>
                <event-block sid="376655251539990">
                    <conditions>
                        <condition id="-8" name="Compare two values" sid="817129643773479" type="System">
                            <param id="0" name="First value">MainFSM.CurState</param>
                            <param id="1" name="Comparison">0</param>
                            <param id="2" name="Second value">str(STATUS_INIT)</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="0" name="Call function" sid="609495731740823" type="Function">
                            <param id="0" name="Name">&quot;main.game.init&quot;</param>
                            <param id="1" name="Parameter {n}"></param>
                        </action>
                        <action id="2" name="Request" sid="516207249032011" type="MainFSM" />
                    </actions>
                </event-block>
                <event-block sid="198763754469854">
                    <conditions>
                        <condition id="-22" name="Else" sid="224287128350693" type="System" />
                        <condition id="-8" name="Compare two values" sid="196152037017035" type="System">
                            <param id="0" name="First value">MainFSM.CurState</param>
                            <param id="1" name="Comparison">0</param>
                            <param id="2" name="Second value">str(STATUS_QST)</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="0" name="Call function" sid="770219194355738" type="Function">
                            <param id="0" name="Name">&quot;question.show&quot;</param>
                            <param id="1" name="Parameter {n}"></param>
                        </action>
                        <action id="0" name="Call function" sid="871261456763958" type="Function">
                            <param id="0" name="Name">&quot;option.show&quot;</param>
                            <param id="1" name="Parameter {n}"></param>
                        </action>
                        <action id="-16" name="Wait" sid="949316933897472" type="System">
                            <param id="0" name="Seconds">0</param>
                        </action>
                        <action id="2" name="Request" sid="875627912453257" type="MainFSM" />
                    </actions>
                </event-block>
                <event-block sid="241332515047537">
                    <conditions>
                        <condition id="-22" name="Else" sid="813159769306860" type="System" />
                        <condition id="-8" name="Compare two values" sid="580859360296294" type="System">
                            <param id="0" name="First value">MainFSM.CurState</param>
                            <param id="1" name="Comparison">0</param>
                            <param id="2" name="Second value">str(STATUS_PLAYING)</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="0" name="Call function" sid="204791183074314" type="Function">
                            <param id="0" name="Name">&quot;main.game.start&quot;</param>
                            <param id="1" name="Parameter {n}"></param>
                        </action>
                    </actions>
                </event-block>
                <event-block sid="675140972185395">
                    <conditions>
                        <condition id="-22" name="Else" sid="526406865642121" type="System" />
                        <condition id="-8" name="Compare two values" sid="250195848894660" type="System">
                            <param id="0" name="First value">MainFSM.CurState</param>
                            <param id="1" name="Comparison">0</param>
                            <param id="2" name="Second value">str(STATUS_GAMEOVER)</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="0" name="Call function" sid="820561251620975" type="Function">
                            <param id="0" name="Name">&quot;main.gameover&quot;</param>
                            <param id="1" name="Parameter {n}"></param>
                        </action>
                    </actions>
                </event-block>
            </sub-events>
        </event-block>
        <comment> transfer to next state</comment>
        <event-block sid="337686954436220">
            <conditions>
                <condition id="6" name="On transfer logic" sid="992585210777727" type="MainFSM">
                    <param id="0" name="Name">str(gameStatus)</param>
                </condition>
            </conditions>
            <actions />
            <sub-events>
                <event-block sid="330197543753711">
                    <conditions>
                        <condition id="-8" name="Compare two values" sid="809055766892162" type="System">
                            <param id="0" name="First value">MainFSM.CurState</param>
                            <param id="1" name="Comparison">0</param>
                            <param id="2" name="Second value">str(STATUS_INIT)</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="-9" name="Set value" sid="747830744650975" type="System">
                            <param id="0" name="Variable">gameStatus</param>
                            <param id="1" name="Value">STATUS_QST</param>
                        </action>
                        <action id="14" name="Set next state" sid="438549258011377" type="MainFSM">
                            <param id="0" name="Name">str(STATUS_QST)</param>
                        </action>
                    </actions>
                </event-block>
                <event-block sid="597114451808069">
                    <conditions>
                        <condition id="-22" name="Else" sid="654919253611689" type="System" />
                        <condition id="-8" name="Compare two values" sid="936562344230712" type="System">
                            <param id="0" name="First value">MainFSM.CurState</param>
                            <param id="1" name="Comparison">0</param>
                            <param id="2" name="Second value">str(STATUS_QST)</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="-9" name="Set value" sid="922605328987282" type="System">
                            <param id="0" name="Variable">gameStatus</param>
                            <param id="1" name="Value">STATUS_PLAYING</param>
                        </action>
                        <action id="14" name="Set next state" sid="697855679070343" type="MainFSM">
                            <param id="0" name="Name">str(STATUS_PLAYING)</param>
                        </action>
                    </actions>
                </event-block>
                <event-block sid="511701330473529">
                    <conditions>
                        <condition id="-22" name="Else" sid="484590828802635" type="System" />
                        <condition id="-8" name="Compare two values" sid="233698648062320" type="System">
                            <param id="0" name="First value">MainFSM.CurState</param>
                            <param id="1" name="Comparison">0</param>
                            <param id="2" name="Second value">str(STATUS_PLAYING)</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="-9" name="Set value" sid="591778413989401" type="System">
                            <param id="0" name="Variable">gameStatus</param>
                            <param id="1" name="Value">STATUS_GAMEOVER</param>
                        </action>
                        <action id="14" name="Set next state" sid="650081248435182" type="MainFSM">
                            <param id="0" name="Name">str(STATUS_GAMEOVER)</param>
                        </action>
                    </actions>
                </event-block>
                <event-block sid="994449998007457">
                    <conditions />
                    <actions />
                </event-block>
            </sub-events>
        </event-block>
        <event-block sid="940000697569917">
            <conditions>
                <condition id="0" name="On function" sid="512710161852315" type="Function">
                    <param id="0" name="Name">&quot;main.fsm.goto&quot;</param>
                </condition>
            </conditions>
            <actions>
                <action id="-9" name="Set value" sid="647005176343708" type="System">
                    <param id="0" name="Variable">gameStatus</param>
                    <param id="1" name="Value">Function.Param(0)</param>
                </action>
                <action id="11" name="Go to state" sid="907274920843514" type="MainFSM">
                    <param id="0" name="Name">str(gameStatus)</param>
                </action>
            </actions>
        </event-block>
        <event-block sid="461831366815766">
            <conditions>
                <condition id="0" name="On function" sid="718582480378130" type="Function">
                    <param id="0" name="Name">&quot;main.fsm.request&quot;</param>
                </condition>
            </conditions>
            <actions>
                <action id="2" name="Request" sid="442026083493862" type="MainFSM" />
            </actions>
        </event-block>
    </events>
</c2eventsheet>
