<?xml version="1.0" encoding="UTF-8"?>
<net name="pong" type="iopt-flow">
  <operation id="o001" x="840" y="35" constant="1" rot="0" shape="rect" size="20" locked="true">
    <name off_x="-15" off_y="-5" text="1"/>
    <output off_x="20" off_y="0" name="K" id="o001.K" type="range" min="1" max="1" dynamic="none" microstep="0" nano-step="1">
      <expression>
        <text>1</text>
        <operand type="literal" value="1"/>
      </expression>
    </output>
  </operation>
  <signal id="X" x="200" y="305" mode="internal" type="range" min="-1" max="801" frac="0" value="0" dynamic="none" microstep="1" nano-step="2"/>
  <signal id="XS" x="170" y="505" mode="internal" type="range" min="-5" max="5" frac="0" value="0" dynamic="none" microstep="0" nano-step="1"/>
  <operation id="o005" x="95" y="505" rot="0" shape="arrow" size="24">
    <name off_x="-19" off_y="-24" text="XDirection"/>
    <input off_x="-24" off_y="-8" name="X" id="o005.X" type="range" min="-1" max="801" dynamic="all" frac="0"/>
    <input off_x="-24" off_y="8" name="XS" id="o005.XS" type="range" min="-5" max="5" dynamic="all" frac="0"/>
    <output off_x="24" off_y="0" name="out" id="o005.out" type="range" min="-5" max="801" dynamic="type" frac="0" microstep="0" nano-step="1">
      <expression>
        <operand type="literal" value="1"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="X" delay="1"/>
          <operator type="less"/>
          <operand type="literal" value="1"/>
          <operator type="or"/>
          <operand type="signal" idRef="XS" delay="1"/>
          <operator type="equal"/>
          <operand type="literal" value="0"/>
        </operand>
        <text>1 WHEN (X[-1] &lt; 1 OR XS[-1] = 0)</text>
      </expression>
      <expression>
        <operand type="literal" value="-1"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="X" delay="1"/>
          <operator type="more"/>
          <operand type="literal" value="799"/>
        </operand>
        <text>-1 WHEN (X[-1] &gt; 799)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="XS" delay="1"/>
        <text>XS[-1] OTHERWISE</text>
      </expression>
    </output>
  </operation>
  <arc id="a006" type="read" source="XS" target="o005.XS" view="symbolic"/>
  <arc id="a007" type="read" source="X" target="o005.X" view="symbolic"/>
  <arc id="a009" type="read" source="o005.out" target="XS"/>
  <signal id="Y" x="230" y="325" mode="internal" type="range" min="-1" max="801" frac="0" value="0" dynamic="none" microstep="1" nano-step="5"/>
  <signal id="YS" x="340" y="590" mode="internal" type="range" min="-5" max="5" frac="0" value="0" dynamic="none" microstep="1" nano-step="4"/>
  <operation id="o016" x="255" y="590" rot="0" shape="arrow" size="34">
    <name off_x="-27" off_y="-34" text="YDirection"/>
    <input off_x="-35" off_y="-19" name="Y" id="o016.Y" type="range" min="-1" max="801" dynamic="type" frac="0"/>
    <input off_x="-35" off_y="0" name="YS" id="o016.YS" type="range" min="-5" max="5" dynamic="type" frac="0"/>
    <input name="Defend" id="o016.Defend" type="boolean" min="0" max="1" frac="0" dynamic="all" off_x="-35" off_y="19"/>
    <output off_x="34" off_y="0" name="out" id="o016.out" type="range" min="-5" max="801" dynamic="type" frac="0" microstep="1" nano-step="4">
      <expression>
        <operand type="literal" value="1"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="Y" delay="1"/>
          <operator type="less"/>
          <operand type="literal" value="1"/>
          <operator type="or"/>
          <operand type="signal" idRef="YS" delay="1"/>
          <operator type="equal"/>
          <operand type="literal" value="0"/>
        </operand>
        <text>1 WHEN (Y[-1] &lt; 1 OR YS[-1] = 0)</text>
      </expression>
      <expression>
        <operand type="literal" value="-1"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="Defend"/>
          <operator type="and"/>
          <operand type="signal" idRef="Y" delay="1"/>
          <operator type="more-or-equal"/>
          <operand type="literal" value="500"/>
        </operand>
        <text>-1 WHEN (Defend AND Y[-1] &gt;= 500)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="YS" delay="1"/>
        <text>YS[-1] OTHERWISE</text>
      </expression>
    </output>
  </operation>
  <arc id="a018" type="read" source="YS" target="o016.YS" view="symbolic"/>
  <arc id="a019" type="read" source="Y" target="o016.Y" view="symbolic"/>
  <arc id="a020" type="read" source="o016.out" target="YS"/>
  <signal id="Pause" x="1205" y="65" mode="internal" type="boolean" min="0" max="1" microstep="0" nano-step="2" frac="0" value="0" dynamic="none"/>
  <component id="c1" class="ui/label_icon.xml" x="355" y="335" width="150" height="140" rot="0" implementation="iopt-flow" target="external" res_location="ball.png">
    <name off_x="-75" off_y="-75" text="ui_label_icon_ball"/>
    <source_model file="files/ui_label.xml"/>
    <input id="c1.Visible" name="Visible" off_x="-75" off_y="-50" type="boolean" microstep="0" nano-step="0"/>
    <input id="c1.X" name="X" off_x="-75" off_y="-30" type="range" min="0" max="1023" microstep="1" nano-step="2"/>
    <input id="c1.Y" name="Y" off_x="-75" off_y="-10" type="range" min="0" max="1023" microstep="1" nano-step="5"/>
    <input id="c1.Width" name="Width" off_x="-75" off_y="10" type="range" min="0" max="1023" microstep="0" nano-step="0"/>
    <input id="c1.Height" name="Height" off_x="-75" off_y="30" type="range" min="0" max="1023" microstep="0" nano-step="0"/>
    <input id="c1.PageNr" name="PageNr" off_x="-75" off_y="50" type="range" min="0" max="31" microstep="0" nano-step="0"/>
    <output id="c1.Show" name="Show" off_x="75" off_y="-50" type="boolean" microstep="1" nano-step="6"/>
    <comment text="Ball" off_x="0" off_y="20"/>
  </component>
  <arc id="a001" type="read" source="X" target="c1.X"/>
  <arc id="a011" type="read" source="Y" target="c1.Y"/>
  <component id="c013" class="ui/checkbox.xml" x="1025" y="125" width="180" height="200" rot="0" implementation="iopt-flow" target="external">
    <name off_x="-90" off_y="-105" text="ui_checkbox_pause"/>
    <source_model file="files/ui_checkbox.xml"/>
    <input id="c013.Set" name="Set" type="event" off_x="-90" off_y="-80" microstep="0" nano-step="0"/>
    <input id="c013.Reset" name="Reset" type="event" off_x="-90" off_y="-60" microstep="0" nano-step="0"/>
    <input id="c013.Visible" name="Visible" off_x="-90" off_y="-40" type="boolean" microstep="0" nano-step="1"/>
    <input id="c013.Sensitive" name="Sensitive" off_x="-90" off_y="-20" type="boolean" microstep="0" nano-step="1"/>
    <input id="c013.X" name="X" off_x="-90" off_y="0" type="range" min="0" max="1023" microstep="0" nano-step="1"/>
    <input id="c013.Y" name="Y" off_x="-90" off_y="20" type="range" min="0" max="1023" microstep="0" nano-step="1"/>
    <input id="c013.Width" name="Width" off_x="-90" off_y="40" type="range" min="0" max="1023" microstep="0" nano-step="0"/>
    <input id="c013.Height" name="Height" off_x="-90" off_y="60" type="range" min="0" max="1023" microstep="0" nano-step="0"/>
    <input id="c013.PageNr" name="PageNr" off_x="-90" off_y="80" type="range" min="0" max="31" microstep="0" nano-step="0"/>
    <output id="c013.Changed" name="Changed" type="event" off_x="90" off_y="-80" microstep="0" nano-step="2"/>
    <output id="c013.Checked" name="Checked" off_x="90" off_y="-60" type="boolean" microstep="0" nano-step="2"/>
    <comment text="Pause" off_x="0" off_y="20"/>
  </component>
  <arc id="a016" type="read" source="c013.Checked" target="Pause"/>
  <operation id="o017" x="860" y="125" constant="50" rot="0" shape="rect" size="20" locked="true">
    <name off_x="-15" off_y="-5" text="50"/>
    <output off_x="20" off_y="0" name="K" id="o017.K" type="range" min="50" max="50" dynamic="none" microstep="0" nano-step="1">
      <expression>
        <text>50</text>
        <operand type="literal" value="50"/>
      </expression>
    </output>
  </operation>
  <arc id="a021" type="read" source="o017.K" target="c013.X"/>
  <operation id="o022" x="815" y="145" constant="640" rot="0" shape="rect" size="20" locked="true">
    <name off_x="-15" off_y="-5" text="640"/>
    <output off_x="20" off_y="0" name="K" id="o022.K" type="range" min="640" max="640" dynamic="none" microstep="0" nano-step="1">
      <expression>
        <text>640</text>
        <operand type="literal" value="640"/>
      </expression>
    </output>
  </operation>
  <arc id="a023" type="read" source="o022.K" target="c013.Y"/>
  <arc id="a024" type="read" source="o001.K" target="c013.Visible" view="symbolic"/>
  <arc id="a025" type="read" source="o001.K" target="c013.Sensitive" view="symbolic"/>
  <component id="c026" class="ui/number.xml" x="710" y="550" width="200" height="240" rot="0" implementation="iopt-flow" target="external">
    <name off_x="-100" off_y="-125" text="ui_number_score"/>
    <source_model file="files/ui_number.xml"/>
    <input id="c026.Set" name="Set" type="event" off_x="-100" off_y="-100" microstep="1" nano-step="8"/>
    <input id="c026.NewVal" name="NewVal" off_x="-100" off_y="-80" type="range" min="0" max="65535" microstep="1" nano-step="7"/>
    <input id="c026.Visible" name="Visible" off_x="-100" off_y="-60" type="boolean" microstep="0" nano-step="1"/>
    <input id="c026.Sensitive" name="Sensitive" off_x="-100" off_y="-40" type="boolean" microstep="0" nano-step="0"/>
    <input id="c026.X" name="X" off_x="-100" off_y="-20" type="range" min="0" max="1023" microstep="0" nano-step="1"/>
    <input id="c026.Y" name="Y" off_x="-100" off_y="0" type="range" min="0" max="1023" microstep="0" nano-step="1"/>
    <input id="c026.Width" name="Width" off_x="-100" off_y="20" type="range" min="0" max="1023" microstep="0" nano-step="0"/>
    <input id="c026.Height" name="Height" off_x="-100" off_y="40" type="range" min="0" max="1023" microstep="0" nano-step="0"/>
    <input id="c026.PageNr" name="PageNr" off_x="-100" off_y="60" type="range" min="0" max="31" microstep="0" nano-step="0"/>
    <input id="c026.Min" name="Min" off_x="-100" off_y="80" type="range" min="0" max="65535" microstep="0" nano-step="0"/>
    <input id="c026.Max" name="Max" off_x="-100" off_y="100" type="range" min="0" max="65535" microstep="0" nano-step="0"/>
    <output id="c026.Changed" name="Changed" type="event" off_x="100" off_y="-100" microstep="1" nano-step="9"/>
    <output id="c026.Value" name="Value" off_x="100" off_y="-80" type="range" min="0" max="65535" microstep="1" nano-step="9"/>
    <comment text="Score" off_x="0" off_y="20"/>
  </component>
  <arc id="a027" type="read" source="o001.K" target="c026.Visible" view="symbolic"/>
  <operation id="o030" x="565" y="415" rot="0" shape="arrow" size="16">
    <name off_x="-11" off_y="-16" text="changed"/>
    <input off_x="-16" off_y="0" name="Score" id="o030.Score" type="range" min="0" max="10000" dynamic="all" frac="0"/>
    <output off_x="16" off_y="0" name="out" id="o030.out" type="event" min="0" max="1" dynamic="none" frac="0" microstep="1" nano-step="8">
      <expression>
        <operand type="signal" idRef="Score"/>
        <operator type="diff"/>
        <operand type="signal" idRef="Score" delay="1"/>
        <text>Score &lt;&gt; Score[-1]</text>
      </expression>
    </output>
  </operation>
  <arc id="a032" type="read" source="o022.K" target="c026.Y" view="symbolic"/>
  <operation id="o033" x="525" y="530" constant="600" rot="0" shape="rect" size="20" locked="true">
    <name off_x="-15" off_y="-5" text="650"/>
    <output off_x="20" off_y="0" name="K" id="o033.K" type="range" min="600" max="600" dynamic="none" microstep="0" nano-step="1" frac="0">
      <expression>
        <text>600</text>
        <operand type="literal" value="600"/>
      </expression>
    </output>
  </operation>
  <arc id="a034" type="read" source="o033.K" target="c026.X"/>
  <arc id="a035" type="read" source="o030.out" target="c026.Set"/>
  <component id="c003" class="rnd/rnd_gen.xml" x="455" y="60" width="100" height="40" rot="0" implementation="iopt-flow" target="external">
    <name off_x="-50" off_y="-25" text="rnd_gen"/>
    <source_model file="files/rnd_gen.xml"/>
    <input id="c003.Gen" name="Gen" type="event" off_x="-50" off_y="0" microstep="1" nano-step="0"/>
    <output id="c003.Rnd" name="Rnd" off_x="50" off_y="0" type="range" min="0" max="32767" microstep="1" nano-step="1"/>
  </component>
  <component id="c001" class="ui/button.xml" x="1015" y="330" width="160" height="160" rot="0" implementation="iopt-flow" target="external" res_location="left.png" param_string="@a@">
    <name off_x="-80" off_y="-85" text="ui_button_left"/>
    <source_model file="files/ui_button.xml"/>
    <input id="c001.Visible" name="Visible" off_x="-80" off_y="-60" type="boolean" microstep="0" nano-step="1"/>
    <input id="c001.Sensitive" name="Sensitive" off_x="-80" off_y="-40" type="boolean" microstep="0" nano-step="1"/>
    <input id="c001.X" name="X" off_x="-80" off_y="-20" type="range" min="0" max="1023" microstep="0" nano-step="1"/>
    <input id="c001.Y" name="Y" off_x="-80" off_y="0" type="range" min="0" max="1023" microstep="0" nano-step="1"/>
    <input id="c001.Width" name="Width" off_x="-80" off_y="20" type="range" min="0" max="1023" microstep="0" nano-step="0"/>
    <input id="c001.Height" name="Height" off_x="-80" off_y="40" type="range" min="0" max="1023" microstep="0" nano-step="0"/>
    <input id="c001.PageNr" name="PageNr" off_x="-80" off_y="60" type="range" min="0" max="31" microstep="0" nano-step="0"/>
    <output id="c001.Click" name="Click" type="event" off_x="80" off_y="-60" microstep="0" nano-step="2"/>
    <output id="c001.Pressed" name="Pressed" off_x="80" off_y="-40" type="boolean" microstep="0" nano-step="2"/>
    <comment text="" off_x="0" off_y="20"/>
  </component>
  <component id="c002" class="ui/button.xml" x="1015" y="510" width="160" height="160" rot="0" implementation="iopt-flow" target="external" res_location="right.png" param_string="@s@">
    <name off_x="-80" off_y="-85" text="ui_button_right"/>
    <source_model file="files/ui_button.xml"/>
    <input id="c002.Visible" name="Visible" off_x="-80" off_y="-60" type="boolean" microstep="0" nano-step="1"/>
    <input id="c002.Sensitive" name="Sensitive" off_x="-80" off_y="-40" type="boolean" microstep="0" nano-step="1"/>
    <input id="c002.X" name="X" off_x="-80" off_y="-20" type="range" min="0" max="1023" microstep="0" nano-step="1"/>
    <input id="c002.Y" name="Y" off_x="-80" off_y="0" type="range" min="0" max="1023" microstep="0" nano-step="1"/>
    <input id="c002.Width" name="Width" off_x="-80" off_y="20" type="range" min="0" max="1023" microstep="0" nano-step="0"/>
    <input id="c002.Height" name="Height" off_x="-80" off_y="40" type="range" min="0" max="1023" microstep="0" nano-step="0"/>
    <input id="c002.PageNr" name="PageNr" off_x="-80" off_y="60" type="range" min="0" max="31" microstep="0" nano-step="0"/>
    <output id="c002.Click" name="Click" type="event" off_x="80" off_y="-60" microstep="0" nano-step="2"/>
    <output id="c002.Pressed" name="Pressed" off_x="80" off_y="-40" type="boolean" microstep="0" nano-step="2"/>
    <comment text="" off_x="0" off_y="20"/>
  </component>
  <component id="c004" class="ui/label_icon.xml" x="465" y="735" width="150" height="140" rot="0" implementation="iopt-flow" target="external" res_location="base.png">
    <name off_x="-75" off_y="-75" text="ui_label_icon_base"/>
    <source_model file="files/ui_label.xml"/>
    <input id="c004.Visible" name="Visible" off_x="-75" off_y="-50" type="boolean" microstep="0" nano-step="0"/>
    <input id="c004.X" name="X" off_x="-75" off_y="-30" type="range" min="0" max="1023" microstep="0" nano-step="3"/>
    <input id="c004.Y" name="Y" off_x="-75" off_y="-10" type="range" min="0" max="1023" microstep="0" nano-step="1"/>
    <input id="c004.Width" name="Width" off_x="-75" off_y="10" type="range" min="0" max="1023" microstep="0" nano-step="0"/>
    <input id="c004.Height" name="Height" off_x="-75" off_y="30" type="range" min="0" max="1023" microstep="0" nano-step="0"/>
    <input id="c004.PageNr" name="PageNr" off_x="-75" off_y="50" type="range" min="0" max="31" microstep="0" nano-step="0"/>
    <output id="c004.Show" name="Show" off_x="75" off_y="-50" type="boolean" microstep="0" nano-step="4"/>
  </component>
  <arc id="a022" type="read" source="o022.K" target="c001.Y" view="symbolic"/>
  <arc id="a026" type="read" source="o022.K" target="c002.Y" view="symbolic"/>
  <operation id="o027" x="325" y="750" constant="560" rot="0" shape="rect" size="20" locked="true">
    <name off_x="-15" off_y="-5" text="560"/>
    <output off_x="20" off_y="0" name="K" id="o027.K" type="range" min="560" max="560" dynamic="none" microstep="0" nano-step="1">
      <expression>
        <text>560</text>
        <operand type="literal" value="560"/>
      </expression>
    </output>
  </operation>
  <arc id="a028" type="read" source="o027.K" target="c004.Y"/>
  <operation id="o029" x="845" y="310" constant="350" rot="0" shape="rect" size="20" locked="true">
    <name off_x="-15" off_y="-5" text="350"/>
    <output off_x="20" off_y="0" name="K" id="o029.K" type="range" min="350" max="350" dynamic="none" microstep="0" nano-step="1">
      <expression>
        <text>350</text>
        <operand type="literal" value="350"/>
      </expression>
    </output>
  </operation>
  <arc id="a030" type="read" source="o029.K" target="c001.X"/>
  <operation id="o031" x="850" y="490" constant="450" rot="0" shape="rect" size="20" locked="true">
    <name off_x="-15" off_y="-5" text="450"/>
    <output off_x="20" off_y="0" name="K" id="o031.K" type="range" min="450" max="450" dynamic="none" microstep="0" nano-step="1">
      <expression>
        <text>450</text>
        <operand type="literal" value="450"/>
      </expression>
    </output>
  </operation>
  <arc id="a033" type="read" source="o031.K" target="c002.X"/>
  <arc id="a036" type="read" source="o001.K" target="c001.Visible" view="symbolic"/>
  <arc id="a037" type="read" source="o001.K" target="c001.Sensitive" view="symbolic"/>
  <arc id="a038" type="read" source="o001.K" target="c002.Visible" view="symbolic"/>
  <arc id="a043" type="read" source="o001.K" target="c002.Sensitive" view="symbolic"/>
  <signal id="BaseX" x="290" y="705" mode="internal" type="range" min="0" max="800" frac="0" value="400" dynamic="none" microstep="0" nano-step="3"/>
  <operation id="o048" x="185" y="705" rot="0" shape="arrow" size="40">
    <name off_x="-35" off_y="-40" text="BaseMove"/>
    <input off_x="-40" off_y="-24" name="Starting" id="o048.Starting" type="range" min="0" max="255" dynamic="type" frac="0"/>
    <input off_x="-40" off_y="-8" name="Left" id="o048.Left" type="boolean" min="0" max="1" frac="0"/>
    <input off_x="-40" off_y="8" name="Right" id="o048.Right" type="boolean" min="0" max="1" frac="0"/>
    <input off_x="-40" off_y="24" name="BaseX" id="o048.BaseX" type="range" min="0" max="800" dynamic="all" frac="0"/>
    <output off_x="40" off_y="0" name="out" id="o048.out" type="range" min="0" max="800" dynamic="type" frac="0" microstep="0" nano-step="3">
      <expression>
        <operand type="literal" value="400"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="Starting"/>
        </operand>
        <text>400 WHEN (Starting)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="BaseX" delay="1"/>
        <operator type="sub"/>
        <operand type="literal" value="4"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="Left"/>
          <operator type="and"/>
          <operand type="signal" idRef="BaseX" delay="1"/>
          <operator type="more"/>
          <operand type="literal" value="4"/>
        </operand>
        <text>BaseX[-1] - 4 WHEN (Left AND BaseX[-1] &gt; 4)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="BaseX" delay="1"/>
        <operator type="add"/>
        <operand type="literal" value="4"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="Right"/>
          <operator type="and"/>
          <operand type="signal" idRef="BaseX" delay="1"/>
          <operator type="less"/>
          <operand type="literal" value="740"/>
        </operand>
        <text>BaseX[-1] + 4 WHEN (Right AND BaseX[-1] &lt; 740)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="BaseX" delay="1"/>
        <text>BaseX[-1] OTHERWISE</text>
      </expression>
    </output>
  </operation>
  <arc id="a049" type="read" source="BaseX" target="o048.BaseX" view="symbolic"/>
  <arc id="a050" type="read" source="o048.out" target="BaseX"/>
  <arc id="a051" type="read" source="c001.Pressed" target="o048.Left" view="symbolic"/>
  <arc id="a052" type="read" source="c002.Pressed" target="o048.Right" view="symbolic"/>
  <arc id="a054" type="read" source="BaseX" target="c004.X"/>
  <operation id="o003" x="125" y="610" rot="0" shape="arrow" size="24">
    <name off_x="-19" off_y="-24" text="Defend"/>
    <input off_x="-24" off_y="-8" name="X" id="o003.X" type="range" min="-1" max="801" dynamic="all" frac="0"/>
    <input off_x="-24" off_y="8" name="BaseX" id="o003.BaseX" type="range" min="0" max="800" dynamic="all" frac="0"/>
    <output off_x="24" off_y="0" name="out" id="o003.out" type="boolean" min="0" max="1" dynamic="type" frac="0" microstep="1" nano-step="3">
      <expression>
        <operand type="signal" idRef="X"/>
        <operator type="more-or-equal"/>
        <operand type="signal" idRef="BaseX"/>
        <operator type="sub"/>
        <operand type="literal" value="36"/>
        <operator type="and"/>
        <operand type="signal" idRef="X"/>
        <operator type="less-or-equal"/>
        <operand type="signal" idRef="BaseX"/>
        <operator type="add"/>
        <operand type="literal" value="124"/>
        <text>X &gt;= BaseX - 36 AND X &lt;= BaseX + 124</text>
      </expression>
    </output>
  </operation>
  <arc id="a047" type="read" source="X" target="o003.X" view="symbolic"/>
  <arc id="a048" type="read" source="BaseX" target="o003.BaseX" view="symbolic"/>
  <arc id="a055" type="read" source="o003.out" target="o016.Defend"/>
  <operation id="o057" x="190" y="215" rot="0" shape="arrow" size="16">
    <name off_x="-11" off_y="-16" text="DefendFail"/>
    <input off_x="-16" off_y="0" name="Y" id="o057.Y" type="range" min="-1" max="801" dynamic="all" frac="0"/>
    <output off_x="16" off_y="0" name="out" id="o057.out" type="boolean" min="0" max="1" dynamic="type" frac="0" microstep="1" nano-step="6">
      <expression>
        <operand type="signal" idRef="Y"/>
        <operator type="more-or-equal"/>
        <operand type="literal" value="520"/>
        <text>Y &gt;= 520</text>
      </expression>
    </output>
  </operation>
  <operation id="o059" x="495" y="270" constant="300" rot="0" shape="rect" size="20" locked="true">
    <name off_x="-15" off_y="-5" text="300"/>
    <output off_x="20" off_y="0" name="K" id="o059.K" type="range" min="300" max="300" dynamic="none" microstep="0" nano-step="1">
      <expression>
        <text>300</text>
        <operand type="literal" value="300"/>
      </expression>
    </output>
  </operation>
  <operation id="o061" x="550" y="290" constant="280" rot="0" shape="rect" size="20" locked="true">
    <name off_x="-15" off_y="-5" text="280"/>
    <output off_x="20" off_y="0" name="K" id="o061.K" type="range" min="280" max="280" dynamic="none" microstep="0" nano-step="1">
      <expression>
        <text>280</text>
        <operand type="literal" value="280"/>
      </expression>
    </output>
  </operation>
  <arc id="a063" type="read" source="Y" target="o057.Y" view="symbolic"/>
  <place id="p001" x="250" y="60" init_marking="1">
    <name off_x="-10" off_y="-10" text="Ready"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <place id="p002" x="340" y="160" init_marking="0">
    <name off_x="-10" off_y="-10" text="Run"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <place id="p003" x="160" y="160" init_marking="0">
    <name off_x="-10" off_y="-10" text="GameOver"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <transition id="t004" x="340" y="60" priority="0" microstep="0">
    <name off_x="-10" off_y="-10" text="Start"/>
    <comment off_x="0" off_y="20" text="-"/>
  </transition>
  <arc id="a039" type="normal" source="p001" target="t004"/>
  <arc id="a040" type="normal" source="t004" target="p002"/>
  <transition id="t041" x="250" y="160" priority="0" microstep="1">
    <name off_x="-10" off_y="-10" text="EndGame"/>
    <comment off_x="0" off_y="20" text="-"/>
  </transition>
  <arc id="a042" type="normal" source="p002" target="t041"/>
  <arc id="a044" type="normal" source="t041" target="p003"/>
  <transition id="t045" x="160" y="60" priority="0" microstep="0">
    <name off_x="-10" off_y="-10" text="Restart"/>
    <comment off_x="0" off_y="20" text="-"/>
  </transition>
  <arc id="a057" type="normal" source="p003" target="t045"/>
  <arc id="a059" type="normal" source="t045" target="p001"/>
  <arc id="a002" type="read" source="p002" target="c1.Visible" view="symbolic"/>
  <arc id="a041" type="read" source="p002" target="c004.Visible" view="symbolic"/>
  <component id="c042" class="ui/button.xml" x="695" y="100" width="160" height="160" rot="0" implementation="iopt-flow" target="external" res_location="ball.png" param_string="@ @">
    <name off_x="-80" off_y="-85" text="ui_start_button"/>
    <source_model file="files/ui_button.xml"/>
    <input id="c042.Visible" name="Visible" off_x="-80" off_y="-60" type="boolean" microstep="0" nano-step="0"/>
    <input id="c042.Sensitive" name="Sensitive" off_x="-80" off_y="-40" type="boolean" microstep="0" nano-step="1"/>
    <input id="c042.X" name="X" off_x="-80" off_y="-20" type="range" min="0" max="1023" microstep="0" nano-step="1"/>
    <input id="c042.Y" name="Y" off_x="-80" off_y="0" type="range" min="0" max="1023" microstep="0" nano-step="1"/>
    <input id="c042.Width" name="Width" off_x="-80" off_y="20" type="range" min="0" max="1023" microstep="0" nano-step="0"/>
    <input id="c042.Height" name="Height" off_x="-80" off_y="40" type="range" min="0" max="1023" microstep="0" nano-step="0"/>
    <input id="c042.PageNr" name="PageNr" off_x="-80" off_y="60" type="range" min="0" max="31" microstep="0" nano-step="0"/>
    <output id="c042.Click" name="Click" type="event" off_x="80" off_y="-60" microstep="0" nano-step="2"/>
    <output id="c042.Pressed" name="Pressed" off_x="80" off_y="-40" type="boolean" microstep="0" nano-step="2"/>
    <comment text="Start New Game" off_x="0" off_y="20"/>
  </component>
  <component id="c043" class="ui/button.xml" x="695" y="290" width="160" height="160" rot="0" implementation="iopt-flow" target="external" res_location="end.jpg" param_string="@C[@">
    <name off_x="-80" off_y="-85" text="ui_game_over_button"/>
    <source_model file="files/ui_button.xml"/>
    <input id="c043.Visible" name="Visible" off_x="-80" off_y="-60" type="boolean" microstep="0" nano-step="0"/>
    <input id="c043.Sensitive" name="Sensitive" off_x="-80" off_y="-40" type="boolean" microstep="0" nano-step="1"/>
    <input id="c043.X" name="X" off_x="-80" off_y="-20" type="range" min="0" max="1023" microstep="0" nano-step="1"/>
    <input id="c043.Y" name="Y" off_x="-80" off_y="0" type="range" min="0" max="1023" microstep="0" nano-step="1"/>
    <input id="c043.Width" name="Width" off_x="-80" off_y="20" type="range" min="0" max="1023" microstep="0" nano-step="0"/>
    <input id="c043.Height" name="Height" off_x="-80" off_y="40" type="range" min="0" max="1023" microstep="0" nano-step="0"/>
    <input id="c043.PageNr" name="PageNr" off_x="-80" off_y="60" type="range" min="0" max="31" microstep="0" nano-step="0"/>
    <output id="c043.Click" name="Click" type="event" off_x="80" off_y="-60" microstep="0" nano-step="2"/>
    <output id="c043.Pressed" name="Pressed" off_x="80" off_y="-40" type="boolean" microstep="0" nano-step="2"/>
    <comment text=" GAME OVER " off_x="0" off_y="20"/>
  </component>
  <arc id="a045" type="read" source="o061.K" target="c043.Y"/>
  <arc id="a046" type="read" source="o059.K" target="c043.X"/>
  <arc id="a056" type="read" source="o061.K" target="c042.Y" view="symbolic"/>
  <arc id="a058" type="read" source="o059.K" target="c042.X" view="symbolic"/>
  <arc id="a060" type="read" source="o001.K" target="c043.Sensitive" view="symbolic"/>
  <arc id="a061" type="read" source="o001.K" target="c042.Sensitive" view="symbolic"/>
  <arc id="a065" type="read" source="p003" target="c043.Visible" view="symbolic"/>
  <arc id="a066" type="read" source="p001" target="c042.Visible" view="symbolic"/>
  <arc id="a067" type="read" source="c042.Click" target="t004" view="symbolic"/>
  <arc id="a068" type="read" source="c043.Click" target="t045" view="symbolic"/>
  <arc id="a069" type="read" source="o057.out" target="t041"/>
  <signal id="Score" x="500" y="470" mode="internal" type="range" min="0" max="10000" frac="0" value="0" dynamic="none" microstep="1" nano-step="7"/>
  <operation id="o071" x="420" y="470" rot="0" shape="arrow" size="32">
    <name off_x="-27" off_y="-32" text="CalcScore"/>
    <input off_x="-32" off_y="-16" name="StartGame" id="o071.StartGame" type="event" min="0" max="1" frac="0"/>
    <input off_x="-32" off_y="0" name="Bounce" id="o071.Bounce" type="event" min="0" max="1" dynamic="all" frac="0"/>
    <input off_x="-32" off_y="16" name="Score" id="o071.Score" type="range" min="0" max="10000" dynamic="all" frac="0"/>
    <output off_x="32" off_y="0" name="out" id="o071.out" type="range" min="0" max="10000" dynamic="type" frac="0" microstep="1" nano-step="7">
      <expression>
        <operand type="literal" value="0"/>
        <operator type="when"/>
        <operand type="signal" idRef="StartGame"/>
        <text>0 WHEN (StartGame)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="Score" delay="1"/>
        <operator type="add"/>
        <operand type="literal" value="1"/>
        <operator type="when"/>
        <operand type="signal" idRef="Bounce"/>
        <text>Score[-1] + 1 WHEN (Bounce)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="Score" delay="1"/>
        <text>Score[-1] OTHERWISE</text>
      </expression>
    </output>
  </operation>
  <arc id="a072" type="read" source="t004" target="o071.StartGame" view="symbolic"/>
  <arc id="a073" type="read" source="Score" target="o071.Score" view="symbolic"/>
  <arc id="a074" type="read" source="o071.out" target="Score"/>
  <operation id="o075" x="295" y="470" rot="0" shape="arrow" size="24">
    <name off_x="-19" off_y="-24" text="Bounce"/>
    <input off_x="-24" off_y="-8" name="YS" id="o075.YS" type="range" min="-5" max="5" dynamic="all" frac="0"/>
    <input off_x="-24" off_y="8" name="Defend" id="o075.Defend" type="boolean" min="0" max="1" dynamic="all" frac="0"/>
    <output off_x="24" off_y="0" name="out" id="o075.out" type="event" min="0" max="1" dynamic="none" frac="0" microstep="1" nano-step="6">
      <expression>
        <operand type="signal" idRef="Defend"/>
        <operator type="and"/>
        <operand type="signal" idRef="YS" delay="1"/>
        <operator type="more"/>
        <operand type="literal" value="0"/>
        <operator type="and"/>
        <operand type="signal" idRef="YS"/>
        <operator type="less"/>
        <operand type="literal" value="0"/>
        <text>Defend AND YS[-1] &gt; 0 AND YS &lt; 0</text>
      </expression>
    </output>
  </operation>
  <arc id="a076" type="read" source="t004" target="c003.Gen"/>
  <arc id="a077" type="read" source="o003.out" target="o075.Defend" view="symbolic"/>
  <arc id="a079" type="read" source="o075.out" target="o071.Bounce"/>
  <arc id="a080" type="read" source="Score" target="c026.NewVal"/>
  <arc id="a081" type="read" source="Score" target="o030.Score"/>
  <operation id="o004" x="110" y="265" rot="0" shape="arrow" size="48">
    <name off_x="-43" off_y="-48" text="CalcX"/>
    <input off_x="-48" off_y="-32" name="Rnd" id="o004.Rnd" type="range" min="0" max="32767" dynamic="all"/>
    <input off_x="-48" off_y="-16" name="Run" id="o004.Run" type="range" min="0" max="255" dynamic="type" frac="0"/>
    <input off_x="-48" off_y="0" name="Pause" id="o004.Pause" type="boolean" min="0" max="1" dynamic="all" frac="0"/>
    <input off_x="-48" off_y="16" name="XS" id="o004.XS" type="range" min="-5" max="5" dynamic="all" frac="0"/>
    <input off_x="-48" off_y="32" name="X" id="o004.X" type="range" min="-1" max="801" dynamic="all" frac="0"/>
    <output off_x="48" off_y="0" name="out" id="o004.out" type="range" min="-5" max="800" dynamic="none" frac="0" microstep="1" nano-step="2">
      <expression>
        <operand type="signal" idRef="Rnd"/>
        <operator type="mod"/>
        <operand type="literal" value="800"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="sub-expression" neg="true">
            <operand type="signal" idRef="Run"/>
          </operand>
        </operand>
        <text>Rnd MOD 800 WHEN (NOT(Run))</text>
      </expression>
      <expression>
        <operand type="signal" idRef="X" delay="1"/>
        <operator type="add"/>
        <operand type="signal" idRef="XS"/>
        <operator type="when"/>
        <operand type="signal" idRef="Run"/>
        <operator type="and"/>
        <operand type="signal" idRef="Pause" neg="true"/>
        <text>X[-1] + XS WHEN (Run AND NOT(Pause))</text>
      </expression>
      <expression>
        <operand type="signal" idRef="X" delay="1"/>
        <text>X[-1] OTHERWISE</text>
      </expression>
    </output>
  </operation>
  <arc id="a008" type="read" source="c003.Rnd" target="o004.Rnd" view="symbolic"/>
  <arc id="a017" type="read" source="p002" target="o004.Run" view="symbolic"/>
  <arc id="a029" type="read" source="Pause" target="o004.Pause" view="symbolic"/>
  <arc id="a062" type="read" source="XS" target="o004.XS" view="symbolic"/>
  <arc id="a064" type="read" source="X" target="o004.X" view="symbolic"/>
  <arc id="a070" type="read" source="o004.out" target="X"/>
  <operation id="o072" x="100" y="400" rot="0" shape="arrow" size="40">
    <name off_x="-35" off_y="-40" text="CalcY"/>
    <input off_x="-40" off_y="-24" name="Run" id="o072.Run" type="range" min="0" max="255" frac="0" dynamic="type"/>
    <input off_x="-40" off_y="-8" name="Pause" id="o072.Pause" type="boolean" min="0" max="1" dynamic="all" frac="0"/>
    <input off_x="-40" off_y="8" name="YS" id="o072.YS" type="range" min="-5" max="5" dynamic="all" frac="0"/>
    <input off_x="-40" off_y="24" name="Y" id="o072.Y" type="range" min="-1" max="801" dynamic="all" frac="0"/>
    <output off_x="40" off_y="0" name="out" id="o072.out" type="range" min="-5" max="801" dynamic="type" frac="0" microstep="1" nano-step="5">
      <expression>
        <operand type="literal" value="0"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="Run" neg="true"/>
        </operand>
        <text>0 WHEN (NOT(Run))</text>
      </expression>
      <expression>
        <operand type="signal" idRef="Y" delay="1"/>
        <operator type="add"/>
        <operand type="signal" idRef="YS"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="sub-expression" neg="true">
            <operand type="signal" idRef="Pause"/>
          </operand>
        </operand>
        <text>Y[-1] + YS WHEN (NOT(Pause))</text>
      </expression>
      <expression>
        <operand type="signal" idRef="Y" delay="1"/>
        <text>Y[-1] OTHERWISE</text>
      </expression>
    </output>
  </operation>
  <arc id="a082" type="read" source="Pause" target="o072.Pause" view="symbolic"/>
  <arc id="a083" type="read" source="YS" target="o072.YS" view="symbolic"/>
  <arc id="a084" type="read" source="Y" target="o072.Y" view="symbolic"/>
  <arc id="a085" type="read" source="o072.out" target="Y"/>
  <arc id="a086" type="read" source="p001" target="o048.Starting" view="symbolic"/>
  <arc id="a087" type="read" source="p002" target="o072.Run" view="symbolic"/>
  <component id="c005" class="ui/sound_sample.xml" x="1000" y="740" width="100" height="40" rot="0" implementation="iopt-flow" target="external" res_location="boing.wav">
    <name off_x="-50" off_y="-25" text="sound_sample_boing"/>
    <source_model file="files/sound_sample.xml"/>
    <input id="c005.Play" name="Play" type="event" off_x="-50" off_y="0"/>
    <output id="c005.Playing" name="Playing" type="event" off_x="50" off_y="0"/>
  </component>
  <component id="c006" class="ui/sound_sample.xml" x="1000" y="655" width="100" height="40" rot="0" implementation="iopt-flow" target="external" res_location="crash.wav">
    <name off_x="-50" off_y="-25" text="sound_sample_crash"/>
    <source_model file="files/sound_sample.xml"/>
    <input id="c006.Play" name="Play" type="event" off_x="-50" off_y="0"/>
    <output id="c006.Playing" name="Playing" type="event" off_x="50" off_y="0"/>
  </component>
  <arc id="a010" type="read" source="o075.out" target="c005.Play" view="symbolic"/>
  <arc id="a012" type="read" source="t041" target="c006.Play" view="symbolic"/>
  <arc id="a003" type="read" source="YS" target="o075.YS" view="symbolic"/>
</net>
