From f8e81f8b0aa2cb8e65cc22e5536769e790728bf1 Mon Sep 17 00:00:00 2001
From: ft-Demo <fischertechnik-team@fischer.de>
Date: Fri, 22 Oct 2021 12:17:37 +0000
Subject: [PATCH] commit by robo pro coding

---
 lib/display.qml                   |   28 +-
 lib/display.xml                   |    2 +-
 omniwheels_x4_soccer_goal.blockly | 2895 +++++++++++++++--------------
 omniwheels_x4_soccer_goal.py      |  184 +-
 4 files changed, 1677 insertions(+), 1432 deletions(-)

diff --git a/lib/display.qml b/lib/display.qml
index 53ad8d5..8367dce 100644
--- a/lib/display.qml
+++ b/lib/display.qml
@@ -28,7 +28,7 @@ TXTWindow {
     font.pixelSize: 16
     elide: Text.ElideRight
     x: 60
-    y: 40
+    y: 70
     width: 100
     height: 40
   }
@@ -38,7 +38,7 @@ TXTWindow {
     font.pixelSize: 16
     elide: Text.ElideRight
     x: 60
-    y: 100
+    y: 120
     width: 100
     height: 40
   }
@@ -48,7 +48,7 @@ TXTWindow {
     font.pixelSize: 16
     elide: Text.ElideRight
     x: 20
-    y: 40
+    y: 70
     width: 40
     height: 40
   }
@@ -58,8 +58,28 @@ TXTWindow {
     font.pixelSize: 16
     elide: Text.ElideRight
     x: 20
-    y: 100
+    y: 120
     width: 40
     height: 40
   }
+  TXTLabel {
+    id: txt_label_counters_
+    text: "C1...4"
+    font.pixelSize: 16
+    elide: Text.ElideRight
+    x: 20
+    y: 20
+    width: 40
+    height: 40
+  }
+  TXTLabel {
+    id: txt_label_counters
+    text: "-"
+    font.pixelSize: 16
+    elide: Text.ElideRight
+    x: 60
+    y: 20
+    width: 100
+    height: 40
+  }
 }
diff --git a/lib/display.xml b/lib/display.xml
index cf1b420..3a16681 100644
--- a/lib/display.xml
+++ b/lib/display.xml
@@ -1 +1 @@
-<xml type="display" version="2"><item id="4" class="TXTSwitch"><name>txt_switch_active</name><enabled>true</enabled><checked>true</checked><text>active</text><geometry><x>60</x><y>171</y><width>100</width><height>40</height></geometry></item><item id="5" class="TXTLabel"><name>txt_label_ball</name><text>-</text><geometry><x>60</x><y>40</y><width>100</width><height>40</height></geometry></item><item id="6" class="TXTLabel"><name>txt_label_goal</name><text>-</text><geometry><x>60</x><y>100</y><width>100</width><height>40</height></geometry></item><item id="7" class="TXTLabel"><name>txt_label_ball_</name><text>ball</text><geometry><x>20</x><y>40</y><width>40</width><height>40</height></geometry></item><item id="8" class="TXTLabel"><name>txt_label_goal_</name><text>goal</text><geometry><x>20</x><y>100</y><width>40</width><height>40</height></geometry></item></xml>
\ No newline at end of file
+<xml type="display" version="2"><item id="4" class="TXTSwitch"><name>txt_switch_active</name><enabled>true</enabled><checked>true</checked><text>active</text><geometry><x>60</x><y>171</y><width>100</width><height>40</height></geometry></item><item id="5" class="TXTLabel"><name>txt_label_ball</name><text>-</text><geometry><x>60</x><y>70</y><width>100</width><height>40</height></geometry></item><item id="6" class="TXTLabel"><name>txt_label_goal</name><text>-</text><geometry><x>60</x><y>120</y><width>100</width><height>40</height></geometry></item><item id="7" class="TXTLabel"><name>txt_label_ball_</name><text>ball</text><geometry><x>20</x><y>70</y><width>40</width><height>40</height></geometry></item><item id="8" class="TXTLabel"><name>txt_label_goal_</name><text>goal</text><geometry><x>20</x><y>120</y><width>40</width><height>40</height></geometry></item><item id="9" class="TXTLabel"><name>txt_label_counters_</name><text>C1...4</text><geometry><x>20</x><y>20</y><width>40</width><height>40</height></geometry></item><item id="10" class="TXTLabel"><name>txt_label_counters</name><text>-</text><geometry><x>60</x><y>20</y><width>100</width><height>40</height></geometry></item></xml>
\ No newline at end of file
diff --git a/omniwheels_x4_soccer_goal.blockly b/omniwheels_x4_soccer_goal.blockly
index acea44f..e0006f4 100644
--- a/omniwheels_x4_soccer_goal.blockly
+++ b/omniwheels_x4_soccer_goal.blockly
@@ -9,11 +9,13 @@
     <variable id="S~)Q:X5BHfQZe.ZJfdE)">factor_y</variable>
     <variable id="S4.mduNQC(va3iR{oSdB">posx_ball</variable>
     <variable id="AnbD2s`i`niJf7bj:WR.">dist_x</variable>
+    <variable id="5@U(%o_ghQ1;jiB#odH8">counters</variable>
     <variable id="Ym/+Qo0YZe25;%N1d!*f">x_min</variable>
     <variable id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</variable>
-    <variable id=";S3?%3)**s[[l~Aq3*,{">speed_y</variable>
+    <variable id="O=Lc:FQ[]f3iuM/V@.mv">v_var_ball_xpos</variable>
     <variable id="=2ARo+;2DS07SU~j29Fk">posx_goal</variable>
     <variable id="2G]XEQ3Lhl$dG]=:]8Ge">x_max</variable>
+    <variable id=";S3?%3)**s[[l~Aq3*,{">v_var_ball_ypos</variable>
     <variable id="}*jl@)UA_Hjh5rc,Gt)c">y_ball_far</variable>
     <variable id="09n]XF2CKURQs)nHOfam">y_ball_near</variable>
     <variable id="xjf5O*w9;IZf$n55ytVF">y_ball_touch</variable>
@@ -67,7 +69,7 @@
                             <field name="VAR" id="09n]XF2CKURQs)nHOfam">y_ball_near</field>
                             <value name="VALUE">
                               <block type="math_number" id="7S}[)qBEl/AotP|IAi0!">
-                                <field name="NUM">60</field>
+                                <field name="NUM">45</field>
                               </block>
                             </value>
                             <next>
@@ -96,332 +98,324 @@
                                         </value>
                                         <next>
                                           <block type="variables_set" id="${6w(je.)JDx9*IU-]X%">
-                                            <field name="VAR" id=";S3?%3)**s[[l~Aq3*,{">speed_y</field>
+                                            <field name="VAR" id="O=Lc:FQ[]f3iuM/V@.mv">v_var_ball_xpos</field>
                                             <value name="VALUE">
                                               <block type="math_number" id="HE{Fb0.3#.+inUWR}#c]">
                                                 <field name="NUM">512</field>
                                               </block>
                                             </value>
                                             <next>
-                                              <block type="variables_set" id="08j[^aKhj-mzD-up%28Q">
-                                                <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                              <block type="variables_set" id="l@Cd26f3KNes0,vv:;E%">
+                                                <field name="VAR" id=";S3?%3)**s[[l~Aq3*,{">v_var_ball_ypos</field>
                                                 <value name="VALUE">
-                                                  <block type="lists_create_with" id=")t9;_o5:Uk`S#-x6ceH.">
-                                                    <mutation items="2"/>
-                                                    <value name="ADD0">
-                                                      <block type="logic_null" id="x$j.V#h.,j3GQ?l*m7.^"/>
-                                                    </value>
-                                                    <value name="ADD1">
-                                                      <block type="logic_null" id="I%tVa0ny05XAmaVV:F.b"/>
-                                                    </value>
+                                                  <block type="math_number" id="]e+dKXEiZ*#$#fOfq1!8">
+                                                    <field name="NUM">512</field>
                                                   </block>
                                                 </value>
                                                 <next>
-                                                  <block type="variables_set" id="PY^XT?g46JMYP[0)HO!l">
-                                                    <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                  <block type="variables_set" id="08j[^aKhj-mzD-up%28Q">
+                                                    <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
                                                     <value name="VALUE">
-                                                      <block type="logic_null" id="^h(n6DKLT?~XLRAo4CRP"/>
+                                                      <block type="lists_create_with" id=")t9;_o5:Uk`S#-x6ceH.">
+                                                        <mutation items="2"/>
+                                                        <value name="ADD0">
+                                                          <block type="logic_null" id="x$j.V#h.,j3GQ?l*m7.^"/>
+                                                        </value>
+                                                        <value name="ADD1">
+                                                          <block type="logic_null" id="I%tVa0ny05XAmaVV:F.b"/>
+                                                        </value>
+                                                      </block>
                                                     </value>
                                                     <next>
-                                                      <block type="variables_set" id="aF_J-4Iq4Jy=)dS.]:62">
-                                                        <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                      <block type="variables_set" id="PY^XT?g46JMYP[0)HO!l">
+                                                        <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
                                                         <value name="VALUE">
-                                                          <block type="logic_null" id="~`*jJ8l2,?]ICIb*0btf"/>
+                                                          <block type="logic_null" id="^h(n6DKLT?~XLRAo4CRP"/>
                                                         </value>
                                                         <next>
-                                                          <block type="variables_set" id="Vyrr#z=fQDk#C,Ymx5FJ">
-                                                            <field name="VAR" id="v3eHF0atAL+ouaa{W$=m">ts_ball</field>
+                                                          <block type="variables_set" id="aF_J-4Iq4Jy=)dS.]:62">
+                                                            <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
                                                             <value name="VALUE">
-                                                              <block type="util_runtime_measurement" id="O!p9@+{cCQ5ov3?1cB9F">
-                                                                <field name="TIME">MILLISECOND</field>
-                                                              </block>
+                                                              <block type="logic_null" id="~`*jJ8l2,?]ICIb*0btf"/>
                                                             </value>
                                                             <next>
-                                                              <block type="variables_set" id=",#}P8.}lYXpT3LT`P:?w">
-                                                                <field name="VAR" id=";Ki:[qYaZnowqSa`]/aW">ts_goal_left</field>
+                                                              <block type="variables_set" id="Vyrr#z=fQDk#C,Ymx5FJ">
+                                                                <field name="VAR" id="v3eHF0atAL+ouaa{W$=m">ts_ball</field>
                                                                 <value name="VALUE">
-                                                                  <block type="util_runtime_measurement" id="GONAj}Dx[0?0CBm%nsU6">
+                                                                  <block type="util_runtime_measurement" id="O!p9@+{cCQ5ov3?1cB9F">
                                                                     <field name="TIME">MILLISECOND</field>
                                                                   </block>
                                                                 </value>
                                                                 <next>
-                                                                  <block type="variables_set" id="8`mdTp}$]{VWKH.cNxI;">
-                                                                    <field name="VAR" id="z^z{Ev+IMfS6[W1raY;l">ts_goal_right</field>
+                                                                  <block type="variables_set" id=",#}P8.}lYXpT3LT`P:?w">
+                                                                    <field name="VAR" id=";Ki:[qYaZnowqSa`]/aW">ts_goal_left</field>
                                                                     <value name="VALUE">
-                                                                      <block type="util_runtime_measurement" id="iQYX(E[,RbI0z8A#M9o%">
+                                                                      <block type="util_runtime_measurement" id="GONAj}Dx[0?0CBm%nsU6">
                                                                         <field name="TIME">MILLISECOND</field>
                                                                       </block>
                                                                     </value>
                                                                     <next>
-                                                                      <block type="variables_set" id="?^qtAjQUmvZ=U[d1VIhg">
-                                                                        <field name="VAR" id="vH;^OzJY7dOdepMScU1s">state</field>
+                                                                      <block type="variables_set" id="8`mdTp}$]{VWKH.cNxI;">
+                                                                        <field name="VAR" id="z^z{Ev+IMfS6[W1raY;l">ts_goal_right</field>
                                                                         <value name="VALUE">
-                                                                          <block type="text" id="V.-^bs67=#+RFV.YX~P,">
-                                                                            <field name="TEXT">NONE</field>
+                                                                          <block type="util_runtime_measurement" id="iQYX(E[,RbI0z8A#M9o%">
+                                                                            <field name="TIME">MILLISECOND</field>
                                                                           </block>
                                                                         </value>
                                                                         <next>
-                                                                          <block type="util_wait_for" id="psY%VZ5++RBl5.z;}C^B">
-                                                                            <field name="format">s</field>
-                                                                            <value name="value">
-                                                                              <shadow type="math_number" id="((-m~`=x]Jlg;bgN9QH!">
-                                                                                <field name="NUM">2</field>
-                                                                              </shadow>
+                                                                          <block type="variables_set" id="?^qtAjQUmvZ=U[d1VIhg">
+                                                                            <field name="VAR" id="vH;^OzJY7dOdepMScU1s">state</field>
+                                                                            <value name="VALUE">
+                                                                              <block type="text" id="V.-^bs67=#+RFV.YX~P,">
+                                                                                <field name="TEXT">NONE</field>
+                                                                              </block>
                                                                             </value>
                                                                             <next>
-                                                                              <block type="loop_endless" id="V,Gw25li,3_,;92QCQLj">
-                                                                                <statement name="DO">
-                                                                                  <block type="procedures_callnoreturn" id="O6U,(~H4n-^0fP^x)_,{">
-                                                                                    <mutation name="checkTimeouts"/>
-                                                                                    <next>
-                                                                                      <block type="controls_if" id="LIzedxH5dle@WM!lcbM#">
-                                                                                        <value name="IF0">
-                                                                                          <block type="display_get_switch_state" id="/xkM7bR[)*BEY41xd)JA">
-                                                                                            <field name="instance_name">txt_switch_active</field>
-                                                                                            <field name="property_name">checked</field>
-                                                                                          </block>
-                                                                                        </value>
-                                                                                        <statement name="DO0">
-                                                                                          <block type="controls_if" id="MN`F(]itK#DR^wQxXz,.">
-                                                                                            <mutation elseif="5" else="1"/>
+                                                                              <block type="util_wait_for" id="psY%VZ5++RBl5.z;}C^B">
+                                                                                <field name="format">s</field>
+                                                                                <value name="value">
+                                                                                  <shadow type="math_number" id="((-m~`=x]Jlg;bgN9QH!">
+                                                                                    <field name="NUM">2</field>
+                                                                                  </shadow>
+                                                                                </value>
+                                                                                <next>
+                                                                                  <block type="loop_endless" id="V,Gw25li,3_,;92QCQLj">
+                                                                                    <statement name="DO">
+                                                                                      <block type="procedures_callnoreturn" id="O6U,(~H4n-^0fP^x)_,{">
+                                                                                        <mutation name="checkTimeouts"/>
+                                                                                        <next>
+                                                                                          <block type="controls_if" id="LIzedxH5dle@WM!lcbM#">
                                                                                             <value name="IF0">
-                                                                                              <block type="logic_operation" id="4(iam8G0^]{P-vv8rZ~f" inline="false">
-                                                                                                <field name="OP">AND</field>
-                                                                                                <value name="A">
-                                                                                                  <block type="logic_operation" id="~/u3*G]LZK9pvIFTV#^q" inline="false">
+                                                                                              <block type="display_get_switch_state" id="/xkM7bR[)*BEY41xd)JA">
+                                                                                                <field name="instance_name">txt_switch_active</field>
+                                                                                                <field name="property_name">checked</field>
+                                                                                              </block>
+                                                                                            </value>
+                                                                                            <statement name="DO0">
+                                                                                              <block type="controls_if" id="MN`F(]itK#DR^wQxXz,.">
+                                                                                                <mutation elseif="4" else="1"/>
+                                                                                                <value name="IF0">
+                                                                                                  <block type="logic_operation" id="4(iam8G0^]{P-vv8rZ~f" inline="false">
                                                                                                     <field name="OP">AND</field>
                                                                                                     <value name="A">
-                                                                                                      <block type="logic_compare" id="D%l9OSY`vM-xzaB}nY1r">
-                                                                                                        <field name="OP">NEQ</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="variables_get" id="92sOCNRLiogo~;}oI++#">
-                                                                                                            <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="logic_null" id="UJ,gxhveD7#?I9I*:A(r"/>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                    <value name="B">
-                                                                                                      <block type="logic_compare" id="Nd,4OywJ0ocibay-klwh">
-                                                                                                        <field name="OP">NEQ</field>
+                                                                                                      <block type="logic_operation" id="~/u3*G]LZK9pvIFTV#^q" inline="false">
+                                                                                                        <field name="OP">AND</field>
                                                                                                         <value name="A">
-                                                                                                          <block type="variables_get" id="xiIzl/p_!nb4$eUrqxet">
-                                                                                                            <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                          <block type="logic_compare" id="D%l9OSY`vM-xzaB}nY1r">
+                                                                                                            <field name="OP">NEQ</field>
+                                                                                                            <value name="A">
+                                                                                                              <block type="variables_get" id="92sOCNRLiogo~;}oI++#">
+                                                                                                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                              </block>
+                                                                                                            </value>
+                                                                                                            <value name="B">
+                                                                                                              <block type="logic_null" id="UJ,gxhveD7#?I9I*:A(r"/>
+                                                                                                            </value>
                                                                                                           </block>
                                                                                                         </value>
                                                                                                         <value name="B">
-                                                                                                          <block type="logic_null" id="z0gO+`Su.;sXQ(oI,(y^"/>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                  </block>
-                                                                                                </value>
-                                                                                                <value name="B">
-                                                                                                  <block type="logic_operation" id="n+p!xL0Cy:ManlHugN9b" inline="false">
-                                                                                                    <field name="OP">AND</field>
-                                                                                                    <value name="A">
-                                                                                                      <block type="logic_compare" id="Vs3%xCaz|qN@}C*=Tq3$">
-                                                                                                        <field name="OP">EQ</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="lists_getIndex" id="~GuPJ/(BunJIEuttSlw5">
-                                                                                                            <mutation statement="false" at="true"/>
-                                                                                                            <field name="MODE">GET</field>
-                                                                                                            <field name="WHERE">FROM_START</field>
-                                                                                                            <value name="VALUE">
-                                                                                                              <block type="variables_get" id="GddxTJE,O^,fb~pxb3(b">
-                                                                                                                <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                          <block type="logic_compare" id="Nd,4OywJ0ocibay-klwh">
+                                                                                                            <field name="OP">NEQ</field>
+                                                                                                            <value name="A">
+                                                                                                              <block type="variables_get" id="xiIzl/p_!nb4$eUrqxet">
+                                                                                                                <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
                                                                                                               </block>
                                                                                                             </value>
-                                                                                                            <value name="AT">
-                                                                                                              <block type="math_number" id="B~Ic{tkFNcdReHWMqxf6">
-                                                                                                                <field name="NUM">1</field>
-                                                                                                              </block>
+                                                                                                            <value name="B">
+                                                                                                              <block type="logic_null" id="z0gO+`Su.;sXQ(oI,(y^"/>
                                                                                                             </value>
                                                                                                           </block>
                                                                                                         </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="logic_null" id="zdJr-qt**l*{;JppUgmP"/>
-                                                                                                        </value>
                                                                                                       </block>
                                                                                                     </value>
                                                                                                     <value name="B">
-                                                                                                      <block type="logic_compare" id="1IfAVQZEPrL6SRY?6A28">
-                                                                                                        <field name="OP">EQ</field>
+                                                                                                      <block type="logic_operation" id="n+p!xL0Cy:ManlHugN9b" inline="false">
+                                                                                                        <field name="OP">AND</field>
                                                                                                         <value name="A">
-                                                                                                          <block type="lists_getIndex" id="Il7jHRe($kU8GqYG+eR#">
-                                                                                                            <mutation statement="false" at="true"/>
-                                                                                                            <field name="MODE">GET</field>
-                                                                                                            <field name="WHERE">FROM_START</field>
-                                                                                                            <value name="VALUE">
-                                                                                                              <block type="variables_get" id="I@,t{sciNOi(fg$?r)#f">
-                                                                                                                <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                          <block type="logic_compare" id="Vs3%xCaz|qN@}C*=Tq3$">
+                                                                                                            <field name="OP">EQ</field>
+                                                                                                            <value name="A">
+                                                                                                              <block type="lists_getIndex" id="~GuPJ/(BunJIEuttSlw5">
+                                                                                                                <mutation statement="false" at="true"/>
+                                                                                                                <field name="MODE">GET</field>
+                                                                                                                <field name="WHERE">FROM_START</field>
+                                                                                                                <value name="VALUE">
+                                                                                                                  <block type="variables_get" id="GddxTJE,O^,fb~pxb3(b">
+                                                                                                                    <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                                  </block>
+                                                                                                                </value>
+                                                                                                                <value name="AT">
+                                                                                                                  <block type="math_number" id="B~Ic{tkFNcdReHWMqxf6">
+                                                                                                                    <field name="NUM">1</field>
+                                                                                                                  </block>
+                                                                                                                </value>
                                                                                                               </block>
                                                                                                             </value>
-                                                                                                            <value name="AT">
-                                                                                                              <block type="math_number" id=",RX#r,ztOfES#y;BmliI">
-                                                                                                                <field name="NUM">2</field>
-                                                                                                              </block>
+                                                                                                            <value name="B">
+                                                                                                              <block type="logic_null" id="zdJr-qt**l*{;JppUgmP"/>
                                                                                                             </value>
                                                                                                           </block>
                                                                                                         </value>
                                                                                                         <value name="B">
-                                                                                                          <block type="logic_null" id="woPk%eJHq,DN-n%_Z+nD"/>
+                                                                                                          <block type="logic_compare" id="1IfAVQZEPrL6SRY?6A28">
+                                                                                                            <field name="OP">EQ</field>
+                                                                                                            <value name="A">
+                                                                                                              <block type="lists_getIndex" id="Il7jHRe($kU8GqYG+eR#">
+                                                                                                                <mutation statement="false" at="true"/>
+                                                                                                                <field name="MODE">GET</field>
+                                                                                                                <field name="WHERE">FROM_START</field>
+                                                                                                                <value name="VALUE">
+                                                                                                                  <block type="variables_get" id="I@,t{sciNOi(fg$?r)#f">
+                                                                                                                    <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                                  </block>
+                                                                                                                </value>
+                                                                                                                <value name="AT">
+                                                                                                                  <block type="math_number" id=",RX#r,ztOfES#y;BmliI">
+                                                                                                                    <field name="NUM">2</field>
+                                                                                                                  </block>
+                                                                                                                </value>
+                                                                                                              </block>
+                                                                                                            </value>
+                                                                                                            <value name="B">
+                                                                                                              <block type="logic_null" id="woPk%eJHq,DN-n%_Z+nD"/>
+                                                                                                            </value>
+                                                                                                          </block>
                                                                                                         </value>
                                                                                                       </block>
                                                                                                     </value>
                                                                                                   </block>
                                                                                                 </value>
-                                                                                              </block>
-                                                                                            </value>
-                                                                                            <statement name="DO0">
-                                                                                              <block type="variables_set" id="=B4Rj[z{i:0)u!6?C.@u">
-                                                                                                <field name="VAR" id="vH;^OzJY7dOdepMScU1s">state</field>
-                                                                                                <value name="VALUE">
-                                                                                                  <block type="text" id="Vz)~xH3AGhNl8(w~ZeE1">
-                                                                                                    <field name="TEXT">ONLY_BALL</field>
-                                                                                                  </block>
-                                                                                                </value>
-                                                                                                <next>
-                                                                                                  <block type="controls_if" id="+oz+[YfRRkvCLn10-B4d">
-                                                                                                    <mutation elseif="1" else="1"/>
-                                                                                                    <value name="IF0">
-                                                                                                      <block type="logic_compare" id="sFua#TKb}~WWPqj6KeIW">
-                                                                                                        <field name="OP">LT</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="variables_get" id="J{E0oBqm),8kwbHyQ?=.">
-                                                                                                            <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="variables_get" id=".ts{wyW$c]RydnDM,}dN">
-                                                                                                            <field name="VAR" id="Ym/+Qo0YZe25;%N1d!*f">x_min</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                    <statement name="DO0">
-                                                                                                      <block type="procedures_callnoreturn" id="Ox/XsK4e~+Q~K3.6ZN=|" inline="true">
-                                                                                                        <mutation name="left_v">
-                                                                                                          <arg name="v"/>
-                                                                                                        </mutation>
-                                                                                                        <value name="ARG0">
-                                                                                                          <block type="variables_get" id="Ur=9P[d2~h+UuLiecS=0">
-                                                                                                            <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </statement>
-                                                                                                    <value name="IF1">
-                                                                                                      <block type="logic_compare" id="@i?;*nt)I.q@3:as9$CV">
-                                                                                                        <field name="OP">GT</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="variables_get" id="r6YxtH4C]YX0#d={f!-G">
-                                                                                                            <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="variables_get" id="/*nplOY#VKPMyS,KOq3!">
-                                                                                                            <field name="VAR" id="2G]XEQ3Lhl$dG]=:]8Ge">x_max</field>
-                                                                                                          </block>
-                                                                                                        </value>
+                                                                                                <statement name="DO0">
+                                                                                                  <block type="variables_set" id="=B4Rj[z{i:0)u!6?C.@u">
+                                                                                                    <field name="VAR" id="vH;^OzJY7dOdepMScU1s">state</field>
+                                                                                                    <value name="VALUE">
+                                                                                                      <block type="text" id="Vz)~xH3AGhNl8(w~ZeE1">
+                                                                                                        <field name="TEXT">ONLY_BALL</field>
                                                                                                       </block>
                                                                                                     </value>
-                                                                                                    <statement name="DO1">
-                                                                                                      <block type="procedures_callnoreturn" id="a{Dykh`c.ZHp3#QzywaK" inline="true">
-                                                                                                        <mutation name="right_v">
-                                                                                                          <arg name="v"/>
-                                                                                                        </mutation>
-                                                                                                        <value name="ARG0">
-                                                                                                          <block type="variables_get" id=",KoGdtd-~NDCr4a3[S}!">
-                                                                                                            <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </statement>
-                                                                                                    <statement name="ELSE">
-                                                                                                      <block type="controls_if" id="Bp.|BTULdy(,]aAoN,l[">
-                                                                                                        <mutation elseif="2" else="1"/>
+                                                                                                    <next>
+                                                                                                      <block type="controls_if" id="+oz+[YfRRkvCLn10-B4d">
+                                                                                                        <mutation elseif="1" else="1"/>
                                                                                                         <value name="IF0">
-                                                                                                          <block type="logic_compare" id="Y-Fctm`Flpx7MN)@x%-u">
-                                                                                                            <field name="OP">LTE</field>
+                                                                                                          <block type="logic_compare" id="sFua#TKb}~WWPqj6KeIW">
+                                                                                                            <field name="OP">LT</field>
                                                                                                             <value name="A">
-                                                                                                              <block type="variables_get" id="=t4?53|MsS#r1P:M`ZP4">
-                                                                                                                <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                              <block type="variables_get" id="J{E0oBqm),8kwbHyQ?=.">
+                                                                                                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
                                                                                                               </block>
                                                                                                             </value>
                                                                                                             <value name="B">
-                                                                                                              <block type="variables_get" id="nkMArfis6_;l59N|,9yJ">
-                                                                                                                <field name="VAR" id="}*jl@)UA_Hjh5rc,Gt)c">y_ball_far</field>
+                                                                                                              <block type="variables_get" id=".ts{wyW$c]RydnDM,}dN">
+                                                                                                                <field name="VAR" id="Ym/+Qo0YZe25;%N1d!*f">x_min</field>
                                                                                                               </block>
                                                                                                             </value>
                                                                                                           </block>
                                                                                                         </value>
                                                                                                         <statement name="DO0">
-                                                                                                          <block type="procedures_callnoreturn" id="n=@SEs?8o@WHm;Ad7A2k" inline="true">
-                                                                                                            <mutation name="fwd_v">
+                                                                                                          <block type="procedures_callnoreturn" id="Ox/XsK4e~+Q~K3.6ZN=|" inline="true">
+                                                                                                            <mutation name="left_v">
                                                                                                               <arg name="v"/>
                                                                                                             </mutation>
                                                                                                             <value name="ARG0">
-                                                                                                              <block type="variables_get" id="fZlf#E.-0%/`U+X#~UvW">
-                                                                                                                <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                                                                                              <block type="variables_get" id="Ur=9P[d2~h+UuLiecS=0">
+                                                                                                                <field name="VAR" id="O=Lc:FQ[]f3iuM/V@.mv">v_var_ball_xpos</field>
                                                                                                               </block>
                                                                                                             </value>
                                                                                                           </block>
                                                                                                         </statement>
                                                                                                         <value name="IF1">
-                                                                                                          <block type="logic_compare" id="!r4f:gx)bYp.aGG:gEck">
-                                                                                                            <field name="OP">LTE</field>
+                                                                                                          <block type="logic_compare" id="@i?;*nt)I.q@3:as9$CV">
+                                                                                                            <field name="OP">GT</field>
                                                                                                             <value name="A">
-                                                                                                              <block type="variables_get" id="t$DoS#o~XI)VEHk9e7sN">
-                                                                                                                <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                              <block type="variables_get" id="r6YxtH4C]YX0#d={f!-G">
+                                                                                                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
                                                                                                               </block>
                                                                                                             </value>
                                                                                                             <value name="B">
-                                                                                                              <block type="variables_get" id="lEUT-.WcN]l3/82:-voJ">
-                                                                                                                <field name="VAR" id="09n]XF2CKURQs)nHOfam">y_ball_near</field>
+                                                                                                              <block type="variables_get" id="/*nplOY#VKPMyS,KOq3!">
+                                                                                                                <field name="VAR" id="2G]XEQ3Lhl$dG]=:]8Ge">x_max</field>
                                                                                                               </block>
                                                                                                             </value>
                                                                                                           </block>
                                                                                                         </value>
                                                                                                         <statement name="DO1">
-                                                                                                          <block type="text_print" id="Q{ZCYfb|6,V:pY*E_~o:">
-                                                                                                            <value name="TEXT">
-                                                                                                              <shadow type="text" id="t!h(B6qXqJ1~!1X~UsG%">
-                                                                                                                <field name="TEXT">turn</field>
-                                                                                                              </shadow>
-                                                                                                            </value>
-                                                                                                            <next>
-                                                                                                              <block type="procedures_callnoreturn" id="5?xr%Un4{ZZP/*kbTrS4">
-                                                                                                                <mutation name="turnBallLeft"/>
+                                                                                                          <block type="procedures_callnoreturn" id="a{Dykh`c.ZHp3#QzywaK" inline="true">
+                                                                                                            <mutation name="right_v">
+                                                                                                              <arg name="v"/>
+                                                                                                            </mutation>
+                                                                                                            <value name="ARG0">
+                                                                                                              <block type="variables_get" id=",KoGdtd-~NDCr4a3[S}!">
+                                                                                                                <field name="VAR" id="O=Lc:FQ[]f3iuM/V@.mv">v_var_ball_xpos</field>
                                                                                                               </block>
-                                                                                                            </next>
+                                                                                                            </value>
                                                                                                           </block>
                                                                                                         </statement>
-                                                                                                        <value name="IF2">
-                                                                                                          <block type="logic_compare" id="O3!qDGS(I#FcP9l5t9T!">
-                                                                                                            <field name="OP">LTE</field>
-                                                                                                            <value name="A">
-                                                                                                              <block type="variables_get" id="a_^h(hS^A_Nr^XWwIDo9">
-                                                                                                                <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                        <statement name="ELSE">
+                                                                                                          <block type="controls_if" id="Bp.|BTULdy(,]aAoN,l[">
+                                                                                                            <mutation elseif="2" else="1"/>
+                                                                                                            <value name="IF0">
+                                                                                                              <block type="logic_compare" id="Y-Fctm`Flpx7MN)@x%-u">
+                                                                                                                <field name="OP">LTE</field>
+                                                                                                                <value name="A">
+                                                                                                                  <block type="variables_get" id="=t4?53|MsS#r1P:M`ZP4">
+                                                                                                                    <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                                  </block>
+                                                                                                                </value>
+                                                                                                                <value name="B">
+                                                                                                                  <block type="variables_get" id="nkMArfis6_;l59N|,9yJ">
+                                                                                                                    <field name="VAR" id="}*jl@)UA_Hjh5rc,Gt)c">y_ball_far</field>
+                                                                                                                  </block>
+                                                                                                                </value>
                                                                                                               </block>
                                                                                                             </value>
-                                                                                                            <value name="B">
-                                                                                                              <block type="variables_get" id="cgnlj~O=P[`vJ5ggLQ{z">
-                                                                                                                <field name="VAR" id="xjf5O*w9;IZf$n55ytVF">y_ball_touch</field>
+                                                                                                            <statement name="DO0">
+                                                                                                              <block type="procedures_callnoreturn" id="n=@SEs?8o@WHm;Ad7A2k" inline="true">
+                                                                                                                <mutation name="fwd_v">
+                                                                                                                  <arg name="v"/>
+                                                                                                                </mutation>
+                                                                                                                <value name="ARG0">
+                                                                                                                  <block type="variables_get" id="fZlf#E.-0%/`U+X#~UvW">
+                                                                                                                    <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                                                                                                  </block>
+                                                                                                                </value>
+                                                                                                              </block>
+                                                                                                            </statement>
+                                                                                                            <value name="IF1">
+                                                                                                              <block type="logic_compare" id="!r4f:gx)bYp.aGG:gEck">
+                                                                                                                <field name="OP">LTE</field>
+                                                                                                                <value name="A">
+                                                                                                                  <block type="variables_get" id="t$DoS#o~XI)VEHk9e7sN">
+                                                                                                                    <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                                  </block>
+                                                                                                                </value>
+                                                                                                                <value name="B">
+                                                                                                                  <block type="variables_get" id="lEUT-.WcN]l3/82:-voJ">
+                                                                                                                    <field name="VAR" id="09n]XF2CKURQs)nHOfam">y_ball_near</field>
+                                                                                                                  </block>
+                                                                                                                </value>
                                                                                                               </block>
                                                                                                             </value>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                        <statement name="DO2">
-                                                                                                          <block type="text_print" id="-QNu$mGl!qCxqMjTX:`~">
-                                                                                                            <value name="TEXT">
-                                                                                                              <shadow type="text" id="be.9t#Dm^sd1QKvcb~,z">
-                                                                                                                <field name="TEXT">touch</field>
-                                                                                                              </shadow>
+                                                                                                            <statement name="DO1">
+                                                                                                              <block type="procedures_callnoreturn" id="5?xr%Un4{ZZP/*kbTrS4">
+                                                                                                                <mutation name="turnBallLeft"/>
+                                                                                                              </block>
+                                                                                                            </statement>
+                                                                                                            <value name="IF2">
+                                                                                                              <block type="logic_compare" id="O3!qDGS(I#FcP9l5t9T!">
+                                                                                                                <field name="OP">LTE</field>
+                                                                                                                <value name="A">
+                                                                                                                  <block type="variables_get" id="a_^h(hS^A_Nr^XWwIDo9">
+                                                                                                                    <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                                  </block>
+                                                                                                                </value>
+                                                                                                                <value name="B">
+                                                                                                                  <block type="variables_get" id="cgnlj~O=P[`vJ5ggLQ{z">
+                                                                                                                    <field name="VAR" id="xjf5O*w9;IZf$n55ytVF">y_ball_touch</field>
+                                                                                                                  </block>
+                                                                                                                </value>
+                                                                                                              </block>
                                                                                                             </value>
-                                                                                                            <next>
+                                                                                                            <statement name="DO2">
                                                                                                               <block type="procedures_callnoreturn" id=";$*URO!$mNp;(}~rEzSA" inline="true">
                                                                                                                 <mutation name="bwd_v">
                                                                                                                   <arg name="v"/>
@@ -432,1295 +426,1176 @@
                                                                                                                   </block>
                                                                                                                 </value>
                                                                                                               </block>
-                                                                                                            </next>
-                                                                                                          </block>
-                                                                                                        </statement>
-                                                                                                        <statement name="ELSE">
-                                                                                                          <block type="procedures_callnoreturn" id="sx~{uZ4bCDN4vbG6oz~)">
-                                                                                                            <mutation name="stop"/>
+                                                                                                            </statement>
+                                                                                                            <statement name="ELSE">
+                                                                                                              <block type="procedures_callnoreturn" id="sx~{uZ4bCDN4vbG6oz~)">
+                                                                                                                <mutation name="stop"/>
+                                                                                                              </block>
+                                                                                                            </statement>
                                                                                                           </block>
                                                                                                         </statement>
                                                                                                       </block>
-                                                                                                    </statement>
-                                                                                                  </block>
-                                                                                                </next>
-                                                                                              </block>
-                                                                                            </statement>
-                                                                                            <value name="IF1">
-                                                                                              <block type="logic_operation" id="B~L1BuQh-S6uKm^YJSgH" inline="false">
-                                                                                                <field name="OP">AND</field>
-                                                                                                <value name="A">
-                                                                                                  <block type="logic_operation" id="4bB{1Bu{%4*rAe!/uepL" inline="false">
-                                                                                                    <field name="OP">AND</field>
-                                                                                                    <value name="A">
-                                                                                                      <block type="logic_compare" id="*p.1tBx0!3(A,.#v~}gR">
-                                                                                                        <field name="OP">NEQ</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="variables_get" id="JhBQ6%W7fhLicBS4$+~r">
-                                                                                                            <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="logic_null" id="/pF(LOrFaYg`Z;:T=pMq"/>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                    <value name="B">
-                                                                                                      <block type="logic_compare" id="|rcsXSAUj_o}mh1L:hw3">
-                                                                                                        <field name="OP">NEQ</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="variables_get" id="V1Jj,Q+-!7UMu,ag}Y2#">
-                                                                                                            <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="logic_null" id="b7),FwxGz-g+3(2a:iAH"/>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </value>
+                                                                                                    </next>
                                                                                                   </block>
-                                                                                                </value>
-                                                                                                <value name="B">
-                                                                                                  <block type="logic_operation" id="fGq*Z2TDY5Aiyb._(iWw" inline="false">
+                                                                                                </statement>
+                                                                                                <value name="IF1">
+                                                                                                  <block type="logic_operation" id="B~L1BuQh-S6uKm^YJSgH" inline="false">
                                                                                                     <field name="OP">AND</field>
                                                                                                     <value name="A">
-                                                                                                      <block type="logic_compare" id="@zlHHSd5%+h?_A?s;121">
-                                                                                                        <field name="OP">NEQ</field>
+                                                                                                      <block type="logic_operation" id="4bB{1Bu{%4*rAe!/uepL" inline="false">
+                                                                                                        <field name="OP">AND</field>
                                                                                                         <value name="A">
-                                                                                                          <block type="lists_getIndex" id="s5?^~_8K{8Ds{9:#%k6@">
-                                                                                                            <mutation statement="false" at="true"/>
-                                                                                                            <field name="MODE">GET</field>
-                                                                                                            <field name="WHERE">FROM_START</field>
-                                                                                                            <value name="VALUE">
-                                                                                                              <block type="variables_get" id="O/m@rtsP1-]GZu;z!Kd7">
-                                                                                                                <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                          <block type="logic_compare" id="*p.1tBx0!3(A,.#v~}gR">
+                                                                                                            <field name="OP">NEQ</field>
+                                                                                                            <value name="A">
+                                                                                                              <block type="variables_get" id="JhBQ6%W7fhLicBS4$+~r">
+                                                                                                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
                                                                                                               </block>
                                                                                                             </value>
-                                                                                                            <value name="AT">
-                                                                                                              <block type="math_number" id="AHQ$-$-`kl9D]lvFKqEw">
-                                                                                                                <field name="NUM">1</field>
-                                                                                                              </block>
+                                                                                                            <value name="B">
+                                                                                                              <block type="logic_null" id="/pF(LOrFaYg`Z;:T=pMq"/>
                                                                                                             </value>
                                                                                                           </block>
                                                                                                         </value>
                                                                                                         <value name="B">
-                                                                                                          <block type="logic_null" id="c0`hO)W_@*rN3v3J#n/b"/>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                    <value name="B">
-                                                                                                      <block type="logic_compare" id="ppt3KZ(DNQQ?lul~f,#i">
-                                                                                                        <field name="OP">EQ</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="lists_getIndex" id="*LHs;5s*!AaP%zlD5e]o">
-                                                                                                            <mutation statement="false" at="true"/>
-                                                                                                            <field name="MODE">GET</field>
-                                                                                                            <field name="WHERE">FROM_START</field>
-                                                                                                            <value name="VALUE">
-                                                                                                              <block type="variables_get" id="%*W`_VauA#TUT8Bhr(l[">
-                                                                                                                <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                          <block type="logic_compare" id="|rcsXSAUj_o}mh1L:hw3">
+                                                                                                            <field name="OP">NEQ</field>
+                                                                                                            <value name="A">
+                                                                                                              <block type="variables_get" id="V1Jj,Q+-!7UMu,ag}Y2#">
+                                                                                                                <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
                                                                                                               </block>
                                                                                                             </value>
-                                                                                                            <value name="AT">
-                                                                                                              <block type="math_number" id="2~D!AD)saoFre@h_@fqZ">
-                                                                                                                <field name="NUM">2</field>
-                                                                                                              </block>
+                                                                                                            <value name="B">
+                                                                                                              <block type="logic_null" id="b7),FwxGz-g+3(2a:iAH"/>
                                                                                                             </value>
                                                                                                           </block>
                                                                                                         </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="logic_null" id="oSv:/]3N6Gn3|DbI0mHC"/>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                  </block>
-                                                                                                </value>
-                                                                                              </block>
-                                                                                            </value>
-                                                                                            <statement name="DO1">
-                                                                                              <block type="variables_set" id="%Io@znvhX3QvyZ*mPL},">
-                                                                                                <field name="VAR" id="vH;^OzJY7dOdepMScU1s">state</field>
-                                                                                                <value name="VALUE">
-                                                                                                  <block type="text" id="y/+X`X}C3$Nc/TH%3_dv">
-                                                                                                    <field name="TEXT">BALL_AND_GOAL_LEFT</field>
-                                                                                                  </block>
-                                                                                                </value>
-                                                                                                <next>
-                                                                                                  <block type="controls_if" id="*BrJG}XZ76}TB4xGqW~`">
-                                                                                                    <mutation elseif="2" else="1"/>
-                                                                                                    <value name="IF0">
-                                                                                                      <block type="logic_compare" id=";t5FsnVMWwTmT^NniB|e">
-                                                                                                        <field name="OP">LTE</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="variables_get" id="T7qB~%1Qe1a.P*MQs$Ij">
-                                                                                                            <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="variables_get" id="D)b~KYP=}7Q`ujSBZJyh">
-                                                                                                            <field name="VAR" id="}*jl@)UA_Hjh5rc,Gt)c">y_ball_far</field>
-                                                                                                          </block>
-                                                                                                        </value>
                                                                                                       </block>
                                                                                                     </value>
-                                                                                                    <statement name="DO0">
-                                                                                                      <block type="procedures_callnoreturn" id="3TBW}iU2UgA?brmPI5+J" inline="true">
-                                                                                                        <mutation name="fwd_v">
-                                                                                                          <arg name="v"/>
-                                                                                                        </mutation>
-                                                                                                        <value name="ARG0">
-                                                                                                          <block type="variables_get" id="bLDCOqV7YSx,/UkFj)T%">
-                                                                                                            <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </statement>
-                                                                                                    <value name="IF1">
-                                                                                                      <block type="logic_compare" id=".k[+$zFZm_;CFMOBjQ=U">
-                                                                                                        <field name="OP">LTE</field>
+                                                                                                    <value name="B">
+                                                                                                      <block type="logic_operation" id="fGq*Z2TDY5Aiyb._(iWw" inline="false">
+                                                                                                        <field name="OP">AND</field>
                                                                                                         <value name="A">
-                                                                                                          <block type="variables_get" id="iY/UC$Qo23IduI}_6|fy">
-                                                                                                            <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="variables_get" id="NF,/T;m.#62@CZQe#+[`">
-                                                                                                            <field name="VAR" id="09n]XF2CKURQs)nHOfam">y_ball_near</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                    <statement name="DO1">
-                                                                                                      <block type="controls_if" id="KJ#o$M|scI;Nb]boFDzc">
-                                                                                                        <mutation elseif="1" else="1"/>
-                                                                                                        <value name="IF0">
-                                                                                                          <block type="logic_compare" id="Hvw%^q~Hu5/N%}1^$97E">
-                                                                                                            <field name="OP">LT</field>
+                                                                                                          <block type="logic_compare" id="@zlHHSd5%+h?_A?s;121">
+                                                                                                            <field name="OP">NEQ</field>
                                                                                                             <value name="A">
-                                                                                                              <block type="lists_getIndex" id="XiNY`%tpd`~0oRax[?wl">
+                                                                                                              <block type="lists_getIndex" id="s5?^~_8K{8Ds{9:#%k6@">
                                                                                                                 <mutation statement="false" at="true"/>
                                                                                                                 <field name="MODE">GET</field>
                                                                                                                 <field name="WHERE">FROM_START</field>
                                                                                                                 <value name="VALUE">
-                                                                                                                  <block type="variables_get" id="]Pnwg,R0`8-u%~|{ySI)">
+                                                                                                                  <block type="variables_get" id="O/m@rtsP1-]GZu;z!Kd7">
                                                                                                                     <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
                                                                                                                   </block>
                                                                                                                 </value>
                                                                                                                 <value name="AT">
-                                                                                                                  <block type="math_number" id=",`#W`9DPbV_Z3Ay]AI7y">
+                                                                                                                  <block type="math_number" id="AHQ$-$-`kl9D]lvFKqEw">
                                                                                                                     <field name="NUM">1</field>
                                                                                                                   </block>
                                                                                                                 </value>
                                                                                                               </block>
                                                                                                             </value>
                                                                                                             <value name="B">
-                                                                                                              <block type="variables_get" id=")Y^E1(LwkP6u5Zr]E#v/">
-                                                                                                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
-                                                                                                              </block>
+                                                                                                              <block type="logic_null" id="c0`hO)W_@*rN3v3J#n/b"/>
                                                                                                             </value>
                                                                                                           </block>
                                                                                                         </value>
-                                                                                                        <statement name="DO0">
-                                                                                                          <block type="procedures_callnoreturn" id="_q6X5`*YO|;FU%~(RZ2?">
-                                                                                                            <mutation name="turnBallLeft"/>
-                                                                                                          </block>
-                                                                                                        </statement>
-                                                                                                        <value name="IF1">
-                                                                                                          <block type="logic_compare" id="nUbsUlJ45(hnk!)6CNAr">
-                                                                                                            <field name="OP">GT</field>
+                                                                                                        <value name="B">
+                                                                                                          <block type="logic_compare" id="ppt3KZ(DNQQ?lul~f,#i">
+                                                                                                            <field name="OP">EQ</field>
                                                                                                             <value name="A">
-                                                                                                              <block type="lists_getIndex" id="yIp~#Cn:I`9g1gyN4|22">
+                                                                                                              <block type="lists_getIndex" id="*LHs;5s*!AaP%zlD5e]o">
                                                                                                                 <mutation statement="false" at="true"/>
                                                                                                                 <field name="MODE">GET</field>
                                                                                                                 <field name="WHERE">FROM_START</field>
                                                                                                                 <value name="VALUE">
-                                                                                                                  <block type="variables_get" id="tchE8Qc)Kp|9?UE;Fpe%">
+                                                                                                                  <block type="variables_get" id="%*W`_VauA#TUT8Bhr(l[">
                                                                                                                     <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
                                                                                                                   </block>
                                                                                                                 </value>
                                                                                                                 <value name="AT">
-                                                                                                                  <block type="math_number" id="saTD#QpS5Cx+?U!E/:[:">
-                                                                                                                    <field name="NUM">1</field>
+                                                                                                                  <block type="math_number" id="2~D!AD)saoFre@h_@fqZ">
+                                                                                                                    <field name="NUM">2</field>
                                                                                                                   </block>
                                                                                                                 </value>
                                                                                                               </block>
                                                                                                             </value>
                                                                                                             <value name="B">
-                                                                                                              <block type="variables_get" id="M9wjV+z*e*Hh*PspIXEY">
-                                                                                                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
-                                                                                                              </block>
+                                                                                                              <block type="logic_null" id="oSv:/]3N6Gn3|DbI0mHC"/>
                                                                                                             </value>
                                                                                                           </block>
                                                                                                         </value>
-                                                                                                        <statement name="DO1">
-                                                                                                          <block type="procedures_callnoreturn" id="),QhMk?KFwaoqgIh6A~w">
-                                                                                                            <mutation name="turnBallRight"/>
-                                                                                                          </block>
-                                                                                                        </statement>
-                                                                                                        <statement name="ELSE">
-                                                                                                          <block type="procedures_callnoreturn" id="4!};}Pi@kx7+v]x,}fg2">
-                                                                                                            <mutation name="stop"/>
-                                                                                                          </block>
-                                                                                                        </statement>
-                                                                                                      </block>
-                                                                                                    </statement>
-                                                                                                    <value name="IF2">
-                                                                                                      <block type="logic_compare" id="Bl$M.GwPg~+!37[;`0o2">
-                                                                                                        <field name="OP">LTE</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="variables_get" id="hk4|9x7W)79Bt`+.QJ}h">
-                                                                                                            <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="variables_get" id="lFZoL.IQB6RM@%_m9*-3">
-                                                                                                            <field name="VAR" id="xjf5O*w9;IZf$n55ytVF">y_ball_touch</field>
-                                                                                                          </block>
-                                                                                                        </value>
                                                                                                       </block>
                                                                                                     </value>
-                                                                                                    <statement name="DO2">
-                                                                                                      <block type="procedures_callnoreturn" id="QN+5a=dUZe|3;6UVwiue" inline="true">
-                                                                                                        <mutation name="bwd_v">
-                                                                                                          <arg name="v"/>
-                                                                                                        </mutation>
-                                                                                                        <value name="ARG0">
-                                                                                                          <block type="variables_get" id="v5iy]*Vt3nsse;Eg[EjI">
-                                                                                                            <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </statement>
-                                                                                                    <statement name="ELSE">
-                                                                                                      <block type="procedures_callnoreturn" id="`pvAUE*_G,HFP6Y*ra9~">
-                                                                                                        <mutation name="stop"/>
-                                                                                                      </block>
-                                                                                                    </statement>
                                                                                                   </block>
-                                                                                                </next>
-                                                                                              </block>
-                                                                                            </statement>
-                                                                                            <value name="IF2">
-                                                                                              <block type="logic_operation" id="QKmOZD,=Y4S|jqiAJ4.k" inline="false">
-                                                                                                <field name="OP">AND</field>
-                                                                                                <value name="A">
-                                                                                                  <block type="logic_operation" id="Xu[n/TE:SYcd;s+dYubv" inline="false">
-                                                                                                    <field name="OP">AND</field>
-                                                                                                    <value name="A">
-                                                                                                      <block type="logic_compare" id="OeAZ19W_g)]s*LP0=8r,">
-                                                                                                        <field name="OP">NEQ</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="variables_get" id="M/Nu-s2$K?+~7cG|vO,;">
-                                                                                                            <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="logic_null" id="z~Da7_)q,Bo-$yJb73oH"/>
-                                                                                                        </value>
+                                                                                                </value>
+                                                                                                <statement name="DO1">
+                                                                                                  <block type="variables_set" id="%Io@znvhX3QvyZ*mPL},">
+                                                                                                    <field name="VAR" id="vH;^OzJY7dOdepMScU1s">state</field>
+                                                                                                    <value name="VALUE">
+                                                                                                      <block type="text" id="y/+X`X}C3$Nc/TH%3_dv">
+                                                                                                        <field name="TEXT">BALL_AND_GOAL_LEFT</field>
                                                                                                       </block>
                                                                                                     </value>
-                                                                                                    <value name="B">
-                                                                                                      <block type="logic_compare" id="d9U8).!K)LC)*3RzV-$z">
-                                                                                                        <field name="OP">NEQ</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="variables_get" id="^H7sM5ajVqht|@UM.F/m">
-                                                                                                            <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                    <next>
+                                                                                                      <block type="controls_if" id="*BrJG}XZ76}TB4xGqW~`">
+                                                                                                        <mutation elseif="2" else="1"/>
+                                                                                                        <value name="IF0">
+                                                                                                          <block type="logic_compare" id=";t5FsnVMWwTmT^NniB|e">
+                                                                                                            <field name="OP">LTE</field>
+                                                                                                            <value name="A">
+                                                                                                              <block type="variables_get" id="T7qB~%1Qe1a.P*MQs$Ij">
+                                                                                                                <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                              </block>
+                                                                                                            </value>
+                                                                                                            <value name="B">
+                                                                                                              <block type="variables_get" id="D)b~KYP=}7Q`ujSBZJyh">
+                                                                                                                <field name="VAR" id="}*jl@)UA_Hjh5rc,Gt)c">y_ball_far</field>
+                                                                                                              </block>
+                                                                                                            </value>
                                                                                                           </block>
                                                                                                         </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="logic_null" id=":8|/_EWW~8cxsv_2[8XZ"/>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                  </block>
-                                                                                                </value>
-                                                                                                <value name="B">
-                                                                                                  <block type="logic_operation" id="?A+N_1,#}@kRY%dxQMa9" inline="false">
-                                                                                                    <field name="OP">AND</field>
-                                                                                                    <value name="A">
-                                                                                                      <block type="logic_compare" id="`~AJbhHRzn/)DgR4fRI;">
-                                                                                                        <field name="OP">EQ</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="lists_getIndex" id="wBVqviD0-D3E`(V(uiV~">
-                                                                                                            <mutation statement="false" at="true"/>
-                                                                                                            <field name="MODE">GET</field>
-                                                                                                            <field name="WHERE">FROM_START</field>
-                                                                                                            <value name="VALUE">
-                                                                                                              <block type="variables_get" id="?uA|$zvDe+x4kMz%-{d.">
-                                                                                                                <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                        <statement name="DO0">
+                                                                                                          <block type="procedures_callnoreturn" id="3TBW}iU2UgA?brmPI5+J" inline="true">
+                                                                                                            <mutation name="fwd_v">
+                                                                                                              <arg name="v"/>
+                                                                                                            </mutation>
+                                                                                                            <value name="ARG0">
+                                                                                                              <block type="variables_get" id="bLDCOqV7YSx,/UkFj)T%">
+                                                                                                                <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                                                                                              </block>
+                                                                                                            </value>
+                                                                                                          </block>
+                                                                                                        </statement>
+                                                                                                        <value name="IF1">
+                                                                                                          <block type="logic_compare" id=".k[+$zFZm_;CFMOBjQ=U">
+                                                                                                            <field name="OP">LTE</field>
+                                                                                                            <value name="A">
+                                                                                                              <block type="variables_get" id="iY/UC$Qo23IduI}_6|fy">
+                                                                                                                <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
                                                                                                               </block>
                                                                                                             </value>
-                                                                                                            <value name="AT">
-                                                                                                              <block type="math_number" id="3~ZXLDV~ZSV8RX_^%[6]">
-                                                                                                                <field name="NUM">1</field>
+                                                                                                            <value name="B">
+                                                                                                              <block type="variables_get" id="NF,/T;m.#62@CZQe#+[`">
+                                                                                                                <field name="VAR" id="09n]XF2CKURQs)nHOfam">y_ball_near</field>
                                                                                                               </block>
                                                                                                             </value>
                                                                                                           </block>
                                                                                                         </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="logic_null" id="vG[m`V+N^1KjrN:te9QO"/>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                    <value name="B">
-                                                                                                      <block type="logic_compare" id=";P}d!ou6kF,_]Y}2c}oU">
-                                                                                                        <field name="OP">NEQ</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="lists_getIndex" id="9qxZzDB=dlHB#35+H*!N">
-                                                                                                            <mutation statement="false" at="true"/>
-                                                                                                            <field name="MODE">GET</field>
-                                                                                                            <field name="WHERE">FROM_START</field>
-                                                                                                            <value name="VALUE">
-                                                                                                              <block type="variables_get" id="D3C[P^f3vp}xb!,-2#r5">
-                                                                                                                <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                        <statement name="DO1">
+                                                                                                          <block type="controls_if" id="KJ#o$M|scI;Nb]boFDzc">
+                                                                                                            <mutation elseif="1" else="1"/>
+                                                                                                            <value name="IF0">
+                                                                                                              <block type="logic_compare" id="Hvw%^q~Hu5/N%}1^$97E">
+                                                                                                                <field name="OP">LT</field>
+                                                                                                                <value name="A">
+                                                                                                                  <block type="lists_getIndex" id="XiNY`%tpd`~0oRax[?wl">
+                                                                                                                    <mutation statement="false" at="true"/>
+                                                                                                                    <field name="MODE">GET</field>
+                                                                                                                    <field name="WHERE">FROM_START</field>
+                                                                                                                    <value name="VALUE">
+                                                                                                                      <block type="variables_get" id="]Pnwg,R0`8-u%~|{ySI)">
+                                                                                                                        <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                                      </block>
+                                                                                                                    </value>
+                                                                                                                    <value name="AT">
+                                                                                                                      <block type="math_number" id=",`#W`9DPbV_Z3Ay]AI7y">
+                                                                                                                        <field name="NUM">1</field>
+                                                                                                                      </block>
+                                                                                                                    </value>
+                                                                                                                  </block>
+                                                                                                                </value>
+                                                                                                                <value name="B">
+                                                                                                                  <block type="variables_get" id=")Y^E1(LwkP6u5Zr]E#v/">
+                                                                                                                    <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                                  </block>
+                                                                                                                </value>
                                                                                                               </block>
                                                                                                             </value>
-                                                                                                            <value name="AT">
-                                                                                                              <block type="math_number" id="@69b4byUu7@Wfx)U/;Xp">
-                                                                                                                <field name="NUM">2</field>
+                                                                                                            <statement name="DO0">
+                                                                                                              <block type="procedures_callnoreturn" id="),QhMk?KFwaoqgIh6A~w">
+                                                                                                                <mutation name="turnBallRight"/>
+                                                                                                              </block>
+                                                                                                            </statement>
+                                                                                                            <value name="IF1">
+                                                                                                              <block type="logic_compare" id="nUbsUlJ45(hnk!)6CNAr">
+                                                                                                                <field name="OP">GT</field>
+                                                                                                                <value name="A">
+                                                                                                                  <block type="lists_getIndex" id="yIp~#Cn:I`9g1gyN4|22">
+                                                                                                                    <mutation statement="false" at="true"/>
+                                                                                                                    <field name="MODE">GET</field>
+                                                                                                                    <field name="WHERE">FROM_START</field>
+                                                                                                                    <value name="VALUE">
+                                                                                                                      <block type="variables_get" id="tchE8Qc)Kp|9?UE;Fpe%">
+                                                                                                                        <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                                      </block>
+                                                                                                                    </value>
+                                                                                                                    <value name="AT">
+                                                                                                                      <block type="math_number" id="saTD#QpS5Cx+?U!E/:[:">
+                                                                                                                        <field name="NUM">1</field>
+                                                                                                                      </block>
+                                                                                                                    </value>
+                                                                                                                  </block>
+                                                                                                                </value>
+                                                                                                                <value name="B">
+                                                                                                                  <block type="variables_get" id="M9wjV+z*e*Hh*PspIXEY">
+                                                                                                                    <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                                  </block>
+                                                                                                                </value>
                                                                                                               </block>
                                                                                                             </value>
+                                                                                                            <statement name="DO1">
+                                                                                                              <block type="procedures_callnoreturn" id="_q6X5`*YO|;FU%~(RZ2?">
+                                                                                                                <mutation name="turnBallLeft"/>
+                                                                                                              </block>
+                                                                                                            </statement>
+                                                                                                            <statement name="ELSE">
+                                                                                                              <block type="procedures_callnoreturn" id="4!};}Pi@kx7+v]x,}fg2">
+                                                                                                                <mutation name="stop"/>
+                                                                                                              </block>
+                                                                                                            </statement>
                                                                                                           </block>
-                                                                                                        </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="logic_null" id="1@:,7WVUfe~r2),.)v7f"/>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                  </block>
-                                                                                                </value>
-                                                                                              </block>
-                                                                                            </value>
-                                                                                            <statement name="DO2">
-                                                                                              <block type="variables_set" id=",9T_FbUWwGZlugNQ_c#x">
-                                                                                                <field name="VAR" id="vH;^OzJY7dOdepMScU1s">state</field>
-                                                                                                <value name="VALUE">
-                                                                                                  <block type="text" id="5?`m/5fCq/Z(s/u)oR*~">
-                                                                                                    <field name="TEXT">BALL_AND_GOAL_RIGHT</field>
-                                                                                                  </block>
-                                                                                                </value>
-                                                                                                <next>
-                                                                                                  <block type="controls_if" id="oOSLtR1E1%!.Oz+LD*|O">
-                                                                                                    <mutation elseif="2" else="1"/>
-                                                                                                    <value name="IF0">
-                                                                                                      <block type="logic_compare" id="{AkiSJ!:M-e{%|_5,Va{">
-                                                                                                        <field name="OP">LTE</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="variables_get" id="u2W_3eBph941yf[`AO1:">
-                                                                                                            <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                        </statement>
+                                                                                                        <value name="IF2">
+                                                                                                          <block type="logic_compare" id="Bl$M.GwPg~+!37[;`0o2">
+                                                                                                            <field name="OP">LTE</field>
+                                                                                                            <value name="A">
+                                                                                                              <block type="variables_get" id="hk4|9x7W)79Bt`+.QJ}h">
+                                                                                                                <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                              </block>
+                                                                                                            </value>
+                                                                                                            <value name="B">
+                                                                                                              <block type="variables_get" id="lFZoL.IQB6RM@%_m9*-3">
+                                                                                                                <field name="VAR" id="xjf5O*w9;IZf$n55ytVF">y_ball_touch</field>
+                                                                                                              </block>
+                                                                                                            </value>
                                                                                                           </block>
                                                                                                         </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="variables_get" id="m`EhNfvklFtISL#l0*_4">
-                                                                                                            <field name="VAR" id="}*jl@)UA_Hjh5rc,Gt)c">y_ball_far</field>
+                                                                                                        <statement name="DO2">
+                                                                                                          <block type="procedures_callnoreturn" id="QN+5a=dUZe|3;6UVwiue" inline="true">
+                                                                                                            <mutation name="bwd_v">
+                                                                                                              <arg name="v"/>
+                                                                                                            </mutation>
+                                                                                                            <value name="ARG0">
+                                                                                                              <block type="variables_get" id="v5iy]*Vt3nsse;Eg[EjI">
+                                                                                                                <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                                                                                              </block>
+                                                                                                            </value>
                                                                                                           </block>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                    <statement name="DO0">
-                                                                                                      <block type="procedures_callnoreturn" id="]2;?=Iy9hHyC!C}^y~h~" inline="true">
-                                                                                                        <mutation name="fwd_v">
-                                                                                                          <arg name="v"/>
-                                                                                                        </mutation>
-                                                                                                        <value name="ARG0">
-                                                                                                          <block type="variables_get" id="Ytx*_*[sy$_4eoX:jjS#">
-                                                                                                            <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                                                                                        </statement>
+                                                                                                        <statement name="ELSE">
+                                                                                                          <block type="procedures_callnoreturn" id="`pvAUE*_G,HFP6Y*ra9~">
+                                                                                                            <mutation name="stop"/>
                                                                                                           </block>
-                                                                                                        </value>
+                                                                                                        </statement>
                                                                                                       </block>
-                                                                                                    </statement>
-                                                                                                    <value name="IF1">
-                                                                                                      <block type="logic_compare" id="rWZfl+Ze,4+*KK/_Y|f2">
-                                                                                                        <field name="OP">LTE</field>
+                                                                                                    </next>
+                                                                                                  </block>
+                                                                                                </statement>
+                                                                                                <value name="IF2">
+                                                                                                  <block type="logic_operation" id="QKmOZD,=Y4S|jqiAJ4.k" inline="false">
+                                                                                                    <field name="OP">AND</field>
+                                                                                                    <value name="A">
+                                                                                                      <block type="logic_operation" id="Xu[n/TE:SYcd;s+dYubv" inline="false">
+                                                                                                        <field name="OP">AND</field>
                                                                                                         <value name="A">
-                                                                                                          <block type="variables_get" id=".K(H|%8UHLv-,l~)q36:">
-                                                                                                            <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                          <block type="logic_compare" id="OeAZ19W_g)]s*LP0=8r,">
+                                                                                                            <field name="OP">NEQ</field>
+                                                                                                            <value name="A">
+                                                                                                              <block type="variables_get" id="M/Nu-s2$K?+~7cG|vO,;">
+                                                                                                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                              </block>
+                                                                                                            </value>
+                                                                                                            <value name="B">
+                                                                                                              <block type="logic_null" id="z~Da7_)q,Bo-$yJb73oH"/>
+                                                                                                            </value>
                                                                                                           </block>
                                                                                                         </value>
                                                                                                         <value name="B">
-                                                                                                          <block type="variables_get" id="~UptJA?^oJ2DWj=i2Yfh">
-                                                                                                            <field name="VAR" id="09n]XF2CKURQs)nHOfam">y_ball_near</field>
+                                                                                                          <block type="logic_compare" id="d9U8).!K)LC)*3RzV-$z">
+                                                                                                            <field name="OP">NEQ</field>
+                                                                                                            <value name="A">
+                                                                                                              <block type="variables_get" id="^H7sM5ajVqht|@UM.F/m">
+                                                                                                                <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                              </block>
+                                                                                                            </value>
+                                                                                                            <value name="B">
+                                                                                                              <block type="logic_null" id=":8|/_EWW~8cxsv_2[8XZ"/>
+                                                                                                            </value>
                                                                                                           </block>
                                                                                                         </value>
                                                                                                       </block>
                                                                                                     </value>
-                                                                                                    <statement name="DO1">
-                                                                                                      <block type="controls_if" id="s(!f@_5wN)RYM`|~CC8r">
-                                                                                                        <mutation elseif="1" else="1"/>
-                                                                                                        <value name="IF0">
-                                                                                                          <block type="logic_compare" id="!5NG0L6Qc4L9!/ENQ#^6">
-                                                                                                            <field name="OP">LT</field>
+                                                                                                    <value name="B">
+                                                                                                      <block type="logic_operation" id="?A+N_1,#}@kRY%dxQMa9" inline="false">
+                                                                                                        <field name="OP">AND</field>
+                                                                                                        <value name="A">
+                                                                                                          <block type="logic_compare" id="`~AJbhHRzn/)DgR4fRI;">
+                                                                                                            <field name="OP">EQ</field>
                                                                                                             <value name="A">
-                                                                                                              <block type="lists_getIndex" id="hPhr1/4Q89owPRmZ4=A@">
+                                                                                                              <block type="lists_getIndex" id="wBVqviD0-D3E`(V(uiV~">
                                                                                                                 <mutation statement="false" at="true"/>
                                                                                                                 <field name="MODE">GET</field>
                                                                                                                 <field name="WHERE">FROM_START</field>
                                                                                                                 <value name="VALUE">
-                                                                                                                  <block type="variables_get" id="BBBFnF[e5`GyH[7wiUs#">
+                                                                                                                  <block type="variables_get" id="?uA|$zvDe+x4kMz%-{d.">
                                                                                                                     <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
                                                                                                                   </block>
                                                                                                                 </value>
                                                                                                                 <value name="AT">
-                                                                                                                  <block type="math_number" id="vC3tOvv+vwtnqY^-oVd,">
-                                                                                                                    <field name="NUM">2</field>
+                                                                                                                  <block type="math_number" id="3~ZXLDV~ZSV8RX_^%[6]">
+                                                                                                                    <field name="NUM">1</field>
                                                                                                                   </block>
                                                                                                                 </value>
                                                                                                               </block>
                                                                                                             </value>
                                                                                                             <value name="B">
-                                                                                                              <block type="variables_get" id="Pu,Rl$nTFT,nE2be^LM2">
-                                                                                                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
-                                                                                                              </block>
+                                                                                                              <block type="logic_null" id="vG[m`V+N^1KjrN:te9QO"/>
                                                                                                             </value>
                                                                                                           </block>
                                                                                                         </value>
-                                                                                                        <statement name="DO0">
-                                                                                                          <block type="procedures_callnoreturn" id="@$;_yG?U8opM|/]Of75$">
-                                                                                                            <mutation name="turnBallRight"/>
-                                                                                                          </block>
-                                                                                                        </statement>
-                                                                                                        <value name="IF1">
-                                                                                                          <block type="logic_compare" id="Y-@u6Td#HTIS8}mNdpK3">
-                                                                                                            <field name="OP">GT</field>
+                                                                                                        <value name="B">
+                                                                                                          <block type="logic_compare" id=";P}d!ou6kF,_]Y}2c}oU">
+                                                                                                            <field name="OP">NEQ</field>
                                                                                                             <value name="A">
-                                                                                                              <block type="lists_getIndex" id="d]*F5d_Lln-:DXn6cPxb">
+                                                                                                              <block type="lists_getIndex" id="9qxZzDB=dlHB#35+H*!N">
                                                                                                                 <mutation statement="false" at="true"/>
                                                                                                                 <field name="MODE">GET</field>
                                                                                                                 <field name="WHERE">FROM_START</field>
                                                                                                                 <value name="VALUE">
-                                                                                                                  <block type="variables_get" id="%ykvuZ~kV2+~os0o2k{?">
+                                                                                                                  <block type="variables_get" id="D3C[P^f3vp}xb!,-2#r5">
                                                                                                                     <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
                                                                                                                   </block>
                                                                                                                 </value>
                                                                                                                 <value name="AT">
-                                                                                                                  <block type="math_number" id=";]Yk({gn.(Ha3=/nM5`]">
+                                                                                                                  <block type="math_number" id="@69b4byUu7@Wfx)U/;Xp">
                                                                                                                     <field name="NUM">2</field>
                                                                                                                   </block>
                                                                                                                 </value>
                                                                                                               </block>
                                                                                                             </value>
                                                                                                             <value name="B">
-                                                                                                              <block type="variables_get" id="=$ulk!vkDhWA^fYK?b*b">
-                                                                                                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
-                                                                                                              </block>
+                                                                                                              <block type="logic_null" id="1@:,7WVUfe~r2),.)v7f"/>
                                                                                                             </value>
                                                                                                           </block>
                                                                                                         </value>
-                                                                                                        <statement name="DO1">
-                                                                                                          <block type="procedures_callnoreturn" id="0il^Cdoc`7I6eVmi6htz">
-                                                                                                            <mutation name="turnBallLeft"/>
+                                                                                                      </block>
+                                                                                                    </value>
+                                                                                                  </block>
+                                                                                                </value>
+                                                                                                <statement name="DO2">
+                                                                                                  <block type="variables_set" id=",9T_FbUWwGZlugNQ_c#x">
+                                                                                                    <field name="VAR" id="vH;^OzJY7dOdepMScU1s">state</field>
+                                                                                                    <value name="VALUE">
+                                                                                                      <block type="text" id="5?`m/5fCq/Z(s/u)oR*~">
+                                                                                                        <field name="TEXT">BALL_AND_GOAL_RIGHT</field>
+                                                                                                      </block>
+                                                                                                    </value>
+                                                                                                    <next>
+                                                                                                      <block type="controls_if" id="oOSLtR1E1%!.Oz+LD*|O">
+                                                                                                        <mutation elseif="2" else="1"/>
+                                                                                                        <value name="IF0">
+                                                                                                          <block type="logic_compare" id="{AkiSJ!:M-e{%|_5,Va{">
+                                                                                                            <field name="OP">LTE</field>
+                                                                                                            <value name="A">
+                                                                                                              <block type="variables_get" id="u2W_3eBph941yf[`AO1:">
+                                                                                                                <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                              </block>
+                                                                                                            </value>
+                                                                                                            <value name="B">
+                                                                                                              <block type="variables_get" id="m`EhNfvklFtISL#l0*_4">
+                                                                                                                <field name="VAR" id="}*jl@)UA_Hjh5rc,Gt)c">y_ball_far</field>
+                                                                                                              </block>
+                                                                                                            </value>
                                                                                                           </block>
-                                                                                                        </statement>
-                                                                                                        <statement name="ELSE">
-                                                                                                          <block type="procedures_callnoreturn" id="Vc$f(+c;1~P{_)XVhUsj">
-                                                                                                            <mutation name="stop"/>
+                                                                                                        </value>
+                                                                                                        <statement name="DO0">
+                                                                                                          <block type="procedures_callnoreturn" id="]2;?=Iy9hHyC!C}^y~h~" inline="true">
+                                                                                                            <mutation name="fwd_v">
+                                                                                                              <arg name="v"/>
+                                                                                                            </mutation>
+                                                                                                            <value name="ARG0">
+                                                                                                              <block type="variables_get" id="Ytx*_*[sy$_4eoX:jjS#">
+                                                                                                                <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                                                                                              </block>
+                                                                                                            </value>
                                                                                                           </block>
                                                                                                         </statement>
-                                                                                                      </block>
-                                                                                                    </statement>
-                                                                                                    <value name="IF2">
-                                                                                                      <block type="logic_compare" id="faLX{cmn%m5GLE$Qa$jP">
-                                                                                                        <field name="OP">LTE</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="variables_get" id="p/ukr6sWeNnUPhQlK[{B">
-                                                                                                            <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                        <value name="IF1">
+                                                                                                          <block type="logic_compare" id="rWZfl+Ze,4+*KK/_Y|f2">
+                                                                                                            <field name="OP">LTE</field>
+                                                                                                            <value name="A">
+                                                                                                              <block type="variables_get" id=".K(H|%8UHLv-,l~)q36:">
+                                                                                                                <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                              </block>
+                                                                                                            </value>
+                                                                                                            <value name="B">
+                                                                                                              <block type="variables_get" id="~UptJA?^oJ2DWj=i2Yfh">
+                                                                                                                <field name="VAR" id="09n]XF2CKURQs)nHOfam">y_ball_near</field>
+                                                                                                              </block>
+                                                                                                            </value>
                                                                                                           </block>
                                                                                                         </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="variables_get" id="}Tawuqa_TE/qeAVT.RC5">
-                                                                                                            <field name="VAR" id="xjf5O*w9;IZf$n55ytVF">y_ball_touch</field>
+                                                                                                        <statement name="DO1">
+                                                                                                          <block type="controls_if" id="s(!f@_5wN)RYM`|~CC8r">
+                                                                                                            <mutation elseif="1" else="1"/>
+                                                                                                            <value name="IF0">
+                                                                                                              <block type="logic_compare" id="!5NG0L6Qc4L9!/ENQ#^6">
+                                                                                                                <field name="OP">LT</field>
+                                                                                                                <value name="A">
+                                                                                                                  <block type="lists_getIndex" id="hPhr1/4Q89owPRmZ4=A@">
+                                                                                                                    <mutation statement="false" at="true"/>
+                                                                                                                    <field name="MODE">GET</field>
+                                                                                                                    <field name="WHERE">FROM_START</field>
+                                                                                                                    <value name="VALUE">
+                                                                                                                      <block type="variables_get" id="BBBFnF[e5`GyH[7wiUs#">
+                                                                                                                        <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                                      </block>
+                                                                                                                    </value>
+                                                                                                                    <value name="AT">
+                                                                                                                      <block type="math_number" id="vC3tOvv+vwtnqY^-oVd,">
+                                                                                                                        <field name="NUM">2</field>
+                                                                                                                      </block>
+                                                                                                                    </value>
+                                                                                                                  </block>
+                                                                                                                </value>
+                                                                                                                <value name="B">
+                                                                                                                  <block type="variables_get" id="Pu,Rl$nTFT,nE2be^LM2">
+                                                                                                                    <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                                  </block>
+                                                                                                                </value>
+                                                                                                              </block>
+                                                                                                            </value>
+                                                                                                            <statement name="DO0">
+                                                                                                              <block type="procedures_callnoreturn" id="@$;_yG?U8opM|/]Of75$">
+                                                                                                                <mutation name="turnBallRight"/>
+                                                                                                              </block>
+                                                                                                            </statement>
+                                                                                                            <value name="IF1">
+                                                                                                              <block type="logic_compare" id="Y-@u6Td#HTIS8}mNdpK3">
+                                                                                                                <field name="OP">GT</field>
+                                                                                                                <value name="A">
+                                                                                                                  <block type="lists_getIndex" id="d]*F5d_Lln-:DXn6cPxb">
+                                                                                                                    <mutation statement="false" at="true"/>
+                                                                                                                    <field name="MODE">GET</field>
+                                                                                                                    <field name="WHERE">FROM_START</field>
+                                                                                                                    <value name="VALUE">
+                                                                                                                      <block type="variables_get" id="%ykvuZ~kV2+~os0o2k{?">
+                                                                                                                        <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                                      </block>
+                                                                                                                    </value>
+                                                                                                                    <value name="AT">
+                                                                                                                      <block type="math_number" id=";]Yk({gn.(Ha3=/nM5`]">
+                                                                                                                        <field name="NUM">2</field>
+                                                                                                                      </block>
+                                                                                                                    </value>
+                                                                                                                  </block>
+                                                                                                                </value>
+                                                                                                                <value name="B">
+                                                                                                                  <block type="variables_get" id="=$ulk!vkDhWA^fYK?b*b">
+                                                                                                                    <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                                  </block>
+                                                                                                                </value>
+                                                                                                              </block>
+                                                                                                            </value>
+                                                                                                            <statement name="DO1">
+                                                                                                              <block type="procedures_callnoreturn" id="0il^Cdoc`7I6eVmi6htz">
+                                                                                                                <mutation name="turnBallLeft"/>
+                                                                                                              </block>
+                                                                                                            </statement>
+                                                                                                            <statement name="ELSE">
+                                                                                                              <block type="procedures_callnoreturn" id="Vc$f(+c;1~P{_)XVhUsj">
+                                                                                                                <mutation name="stop"/>
+                                                                                                              </block>
+                                                                                                            </statement>
                                                                                                           </block>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                    <statement name="DO2">
-                                                                                                      <block type="procedures_callnoreturn" id="$Z+:;,t[mQ]aaUe_UNhM" inline="true">
-                                                                                                        <mutation name="bwd_v">
-                                                                                                          <arg name="v"/>
-                                                                                                        </mutation>
-                                                                                                        <value name="ARG0">
-                                                                                                          <block type="variables_get" id="|eX:`Adtu3l.8ZaYcgJF">
-                                                                                                            <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                                                                                        </statement>
+                                                                                                        <value name="IF2">
+                                                                                                          <block type="logic_compare" id="faLX{cmn%m5GLE$Qa$jP">
+                                                                                                            <field name="OP">LTE</field>
+                                                                                                            <value name="A">
+                                                                                                              <block type="variables_get" id="p/ukr6sWeNnUPhQlK[{B">
+                                                                                                                <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                              </block>
+                                                                                                            </value>
+                                                                                                            <value name="B">
+                                                                                                              <block type="variables_get" id="}Tawuqa_TE/qeAVT.RC5">
+                                                                                                                <field name="VAR" id="xjf5O*w9;IZf$n55ytVF">y_ball_touch</field>
+                                                                                                              </block>
+                                                                                                            </value>
                                                                                                           </block>
                                                                                                         </value>
-                                                                                                      </block>
-                                                                                                    </statement>
-                                                                                                    <statement name="ELSE">
-                                                                                                      <block type="procedures_callnoreturn" id="bi9hG~0MI@s}v(fCd[tp">
-                                                                                                        <mutation name="stop"/>
-                                                                                                      </block>
-                                                                                                    </statement>
-                                                                                                  </block>
-                                                                                                </next>
-                                                                                              </block>
-                                                                                            </statement>
-                                                                                            <value name="IF3">
-                                                                                              <block type="logic_operation" id="ohFi[Z{Xu0.EXNHvg7!|" inline="false">
-                                                                                                <field name="OP">AND</field>
-                                                                                                <value name="A">
-                                                                                                  <block type="logic_operation" id="JDmD0uu$,6*6XI.*8Y=T" inline="false">
-                                                                                                    <field name="OP">AND</field>
-                                                                                                    <value name="A">
-                                                                                                      <block type="logic_compare" id="JvLUnlLulIk{o},vW~}y">
-                                                                                                        <field name="OP">NEQ</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="variables_get" id="$-jleAiV2GHR%[$RfY4I">
-                                                                                                            <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                        <statement name="DO2">
+                                                                                                          <block type="procedures_callnoreturn" id="$Z+:;,t[mQ]aaUe_UNhM" inline="true">
+                                                                                                            <mutation name="bwd_v">
+                                                                                                              <arg name="v"/>
+                                                                                                            </mutation>
+                                                                                                            <value name="ARG0">
+                                                                                                              <block type="variables_get" id="|eX:`Adtu3l.8ZaYcgJF">
+                                                                                                                <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                                                                                              </block>
+                                                                                                            </value>
                                                                                                           </block>
-                                                                                                        </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="logic_null" id="TvSq3M9?{oeuq~TW*ihg"/>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                    <value name="B">
-                                                                                                      <block type="logic_compare" id="9/b,vDMaH:m,r{gleX7O">
-                                                                                                        <field name="OP">NEQ</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="variables_get" id="F!:=i0jN5fR[{l7EwBYG">
-                                                                                                            <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                        </statement>
+                                                                                                        <statement name="ELSE">
+                                                                                                          <block type="procedures_callnoreturn" id="bi9hG~0MI@s}v(fCd[tp">
+                                                                                                            <mutation name="stop"/>
                                                                                                           </block>
-                                                                                                        </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="logic_null" id="lP$*f:B}Uv4E]8^Ao)y2"/>
-                                                                                                        </value>
+                                                                                                        </statement>
                                                                                                       </block>
-                                                                                                    </value>
+                                                                                                    </next>
                                                                                                   </block>
-                                                                                                </value>
-                                                                                                <value name="B">
-                                                                                                  <block type="logic_operation" id="V+@.6tZ~:.0S4;fVjGa/" inline="false">
+                                                                                                </statement>
+                                                                                                <value name="IF3">
+                                                                                                  <block type="logic_operation" id="ohFi[Z{Xu0.EXNHvg7!|" inline="false">
                                                                                                     <field name="OP">AND</field>
                                                                                                     <value name="A">
-                                                                                                      <block type="logic_compare" id="[y%,{E^TI)LH+?|meGy_">
-                                                                                                        <field name="OP">NEQ</field>
+                                                                                                      <block type="logic_operation" id="JDmD0uu$,6*6XI.*8Y=T" inline="false">
+                                                                                                        <field name="OP">AND</field>
                                                                                                         <value name="A">
-                                                                                                          <block type="lists_getIndex" id="!WgYF}aMS$sC-.xB$JAg">
-                                                                                                            <mutation statement="false" at="true"/>
-                                                                                                            <field name="MODE">GET</field>
-                                                                                                            <field name="WHERE">FROM_START</field>
-                                                                                                            <value name="VALUE">
-                                                                                                              <block type="variables_get" id=",+(z.@/%C`r?(v8{Xk6?">
-                                                                                                                <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                          <block type="logic_compare" id="JvLUnlLulIk{o},vW~}y">
+                                                                                                            <field name="OP">NEQ</field>
+                                                                                                            <value name="A">
+                                                                                                              <block type="variables_get" id="$-jleAiV2GHR%[$RfY4I">
+                                                                                                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
                                                                                                               </block>
                                                                                                             </value>
-                                                                                                            <value name="AT">
-                                                                                                              <block type="math_number" id="l]wQ?}.TM,m@sJl.9c$4">
-                                                                                                                <field name="NUM">1</field>
-                                                                                                              </block>
+                                                                                                            <value name="B">
+                                                                                                              <block type="logic_null" id="TvSq3M9?{oeuq~TW*ihg"/>
                                                                                                             </value>
                                                                                                           </block>
                                                                                                         </value>
                                                                                                         <value name="B">
-                                                                                                          <block type="logic_null" id="%PXc[::|r[K5tThFGgi."/>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                    <value name="B">
-                                                                                                      <block type="logic_compare" id="RoSQV[2xNmOan/JtAO~{">
-                                                                                                        <field name="OP">NEQ</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="lists_getIndex" id="jw),#3VHMem^tEQX|.;1">
-                                                                                                            <mutation statement="false" at="true"/>
-                                                                                                            <field name="MODE">GET</field>
-                                                                                                            <field name="WHERE">FROM_START</field>
-                                                                                                            <value name="VALUE">
-                                                                                                              <block type="variables_get" id="k9g4HbL]=_@lVwgYM*{e">
-                                                                                                                <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                          <block type="logic_compare" id="9/b,vDMaH:m,r{gleX7O">
+                                                                                                            <field name="OP">NEQ</field>
+                                                                                                            <value name="A">
+                                                                                                              <block type="variables_get" id="F!:=i0jN5fR[{l7EwBYG">
+                                                                                                                <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
                                                                                                               </block>
                                                                                                             </value>
-                                                                                                            <value name="AT">
-                                                                                                              <block type="math_number" id="lm,[gP|qh0[95%Rr2M|@">
-                                                                                                                <field name="NUM">2</field>
-                                                                                                              </block>
+                                                                                                            <value name="B">
+                                                                                                              <block type="logic_null" id="lP$*f:B}Uv4E]8^Ao)y2"/>
                                                                                                             </value>
                                                                                                           </block>
                                                                                                         </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="logic_null" id="aboD!(qALukkFe}v6#WN"/>
-                                                                                                        </value>
                                                                                                       </block>
                                                                                                     </value>
-                                                                                                  </block>
-                                                                                                </value>
-                                                                                              </block>
-                                                                                            </value>
-                                                                                            <statement name="DO3">
-                                                                                              <block type="variables_set" id="?=|7j%BS8lgVb|CMk2`B">
-                                                                                                <field name="VAR" id="vH;^OzJY7dOdepMScU1s">state</field>
-                                                                                                <value name="VALUE">
-                                                                                                  <block type="text" id="Y4VWl.KGLr*CB@5lWqMT">
-                                                                                                    <field name="TEXT">BALL_AND_GOAL_BOTH</field>
-                                                                                                  </block>
-                                                                                                </value>
-                                                                                                <next>
-                                                                                                  <block type="controls_if" id="u:~b5-PiU+[pu_1,Xa98">
-                                                                                                    <mutation elseif="2" else="1"/>
-                                                                                                    <value name="IF0">
-                                                                                                      <block type="logic_operation" id="aA(*kb?~twOr6-H-5Y6L" inline="false">
+                                                                                                    <value name="B">
+                                                                                                      <block type="logic_operation" id="V+@.6tZ~:.0S4;fVjGa/" inline="false">
                                                                                                         <field name="OP">AND</field>
                                                                                                         <value name="A">
-                                                                                                          <block type="logic_compare" id="s@[Z^y:V@HE1Rj;{0kMC">
-                                                                                                            <field name="OP">GT</field>
+                                                                                                          <block type="logic_compare" id="[y%,{E^TI)LH+?|meGy_">
+                                                                                                            <field name="OP">NEQ</field>
                                                                                                             <value name="A">
-                                                                                                              <block type="variables_get" id="i5K6*S_7LI]YP*oc?o#(">
-                                                                                                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
-                                                                                                              </block>
-                                                                                                            </value>
-                                                                                                            <value name="B">
-                                                                                                              <block type="lists_getIndex" id="Gk1Ni~yuA0xqGVB)m$,r">
+                                                                                                              <block type="lists_getIndex" id="!WgYF}aMS$sC-.xB$JAg">
                                                                                                                 <mutation statement="false" at="true"/>
                                                                                                                 <field name="MODE">GET</field>
                                                                                                                 <field name="WHERE">FROM_START</field>
                                                                                                                 <value name="VALUE">
-                                                                                                                  <block type="variables_get" id="2.y#4B,;Y:6:KX.dWY!e">
+                                                                                                                  <block type="variables_get" id=",+(z.@/%C`r?(v8{Xk6?">
                                                                                                                     <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
                                                                                                                   </block>
                                                                                                                 </value>
                                                                                                                 <value name="AT">
-                                                                                                                  <block type="math_number" id="Yjz]w]~(6fa5M=#WKCa0">
+                                                                                                                  <block type="math_number" id="l]wQ?}.TM,m@sJl.9c$4">
                                                                                                                     <field name="NUM">1</field>
                                                                                                                   </block>
                                                                                                                 </value>
                                                                                                               </block>
                                                                                                             </value>
+                                                                                                            <value name="B">
+                                                                                                              <block type="logic_null" id="%PXc[::|r[K5tThFGgi."/>
+                                                                                                            </value>
                                                                                                           </block>
                                                                                                         </value>
                                                                                                         <value name="B">
-                                                                                                          <block type="logic_compare" id="pj/D#[B!S_nEJX02j9b`">
-                                                                                                            <field name="OP">LT</field>
+                                                                                                          <block type="logic_compare" id="RoSQV[2xNmOan/JtAO~{">
+                                                                                                            <field name="OP">NEQ</field>
                                                                                                             <value name="A">
-                                                                                                              <block type="variables_get" id="$R,CQ$q_:mge?X159P8L">
-                                                                                                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
-                                                                                                              </block>
-                                                                                                            </value>
-                                                                                                            <value name="B">
-                                                                                                              <block type="lists_getIndex" id="7$6J3IxJ7|`Pjsi)y#ph">
+                                                                                                              <block type="lists_getIndex" id="jw),#3VHMem^tEQX|.;1">
                                                                                                                 <mutation statement="false" at="true"/>
                                                                                                                 <field name="MODE">GET</field>
                                                                                                                 <field name="WHERE">FROM_START</field>
                                                                                                                 <value name="VALUE">
-                                                                                                                  <block type="variables_get" id="-/6oVeveklwv!S}e852|">
+                                                                                                                  <block type="variables_get" id="k9g4HbL]=_@lVwgYM*{e">
                                                                                                                     <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
                                                                                                                   </block>
                                                                                                                 </value>
                                                                                                                 <value name="AT">
-                                                                                                                  <block type="math_number" id="oJ]4?$gJ]C@;,f%ql6dR">
+                                                                                                                  <block type="math_number" id="lm,[gP|qh0[95%Rr2M|@">
                                                                                                                     <field name="NUM">2</field>
                                                                                                                   </block>
                                                                                                                 </value>
                                                                                                               </block>
                                                                                                             </value>
+                                                                                                            <value name="B">
+                                                                                                              <block type="logic_null" id="aboD!(qALukkFe}v6#WN"/>
+                                                                                                            </value>
                                                                                                           </block>
                                                                                                         </value>
                                                                                                       </block>
                                                                                                     </value>
-                                                                                                    <statement name="DO0">
-                                                                                                      <block type="procedures_callnoreturn" id="sZ-Q381UDm_7-@_=u,Nb" inline="true">
-                                                                                                        <mutation name="fwd_v">
-                                                                                                          <arg name="v"/>
-                                                                                                        </mutation>
-                                                                                                        <value name="ARG0">
-                                                                                                          <block type="variables_get" id="EZ7O-Q%B5i4/XcO)EWY*">
-                                                                                                            <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
-                                                                                                          </block>
-                                                                                                        </value>
+                                                                                                  </block>
+                                                                                                </value>
+                                                                                                <statement name="DO3">
+                                                                                                  <block type="variables_set" id="?=|7j%BS8lgVb|CMk2`B">
+                                                                                                    <field name="VAR" id="vH;^OzJY7dOdepMScU1s">state</field>
+                                                                                                    <value name="VALUE">
+                                                                                                      <block type="text" id="Y4VWl.KGLr*CB@5lWqMT">
+                                                                                                        <field name="TEXT">BALL_AND_GOAL_BOTH</field>
                                                                                                       </block>
-                                                                                                    </statement>
-                                                                                                    <value name="IF1">
-                                                                                                      <block type="logic_operation" id="y1toQcQ?JoXNUk]#BWyd" inline="false">
-                                                                                                        <field name="OP">AND</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="logic_compare" id=".p%vg@`T{)!T6f3i$rO9">
-                                                                                                            <field name="OP">LT</field>
+                                                                                                    </value>
+                                                                                                    <next>
+                                                                                                      <block type="controls_if" id="mBr6R|Ld1(7@wFK@LEc%">
+                                                                                                        <mutation elseif="2" else="1"/>
+                                                                                                        <value name="IF0">
+                                                                                                          <block type="logic_compare" id="Ef@EH~LEo9ldV~aTkL)v">
+                                                                                                            <field name="OP">LTE</field>
                                                                                                             <value name="A">
-                                                                                                              <block type="variables_get" id="V2_?}A{Yt7$iai=yCSJ)">
-                                                                                                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                              <block type="variables_get" id="eNn.jAQuZB`.!|a-}8Bm">
+                                                                                                                <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
                                                                                                               </block>
                                                                                                             </value>
                                                                                                             <value name="B">
-                                                                                                              <block type="lists_getIndex" id="m?]jjfWt9tUIy,F_m%}i">
-                                                                                                                <mutation statement="false" at="true"/>
-                                                                                                                <field name="MODE">GET</field>
-                                                                                                                <field name="WHERE">FROM_START</field>
-                                                                                                                <value name="VALUE">
-                                                                                                                  <block type="variables_get" id="awS7kY(J(0{xSv!/NOei">
-                                                                                                                    <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
-                                                                                                                  </block>
-                                                                                                                </value>
-                                                                                                                <value name="AT">
-                                                                                                                  <block type="math_number" id="rMzpQD@SM~G/b$@x(bzw">
-                                                                                                                    <field name="NUM">1</field>
-                                                                                                                  </block>
-                                                                                                                </value>
+                                                                                                              <block type="variables_get" id="Vn}:ap@@leJ;ERn5!ulQ">
+                                                                                                                <field name="VAR" id="}*jl@)UA_Hjh5rc,Gt)c">y_ball_far</field>
                                                                                                               </block>
                                                                                                             </value>
                                                                                                           </block>
                                                                                                         </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="logic_compare" id="-I~|7,G,H7p/(=+cA3L}">
-                                                                                                            <field name="OP">LT</field>
+                                                                                                        <statement name="DO0">
+                                                                                                          <block type="procedures_callnoreturn" id="ug]~pSocMN6aC`I.!9FY" inline="true">
+                                                                                                            <mutation name="fwd_v">
+                                                                                                              <arg name="v"/>
+                                                                                                            </mutation>
+                                                                                                            <value name="ARG0">
+                                                                                                              <block type="variables_get" id="3-Iarkq=#yiSq^]Squ6+">
+                                                                                                                <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                                                                                              </block>
+                                                                                                            </value>
+                                                                                                          </block>
+                                                                                                        </statement>
+                                                                                                        <value name="IF1">
+                                                                                                          <block type="logic_compare" id="Gm+JczBwo$*$lI1hn(bE">
+                                                                                                            <field name="OP">LTE</field>
                                                                                                             <value name="A">
-                                                                                                              <block type="variables_get" id="g-:OONj{*4WfXZ](X!%a">
-                                                                                                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                              <block type="variables_get" id="}m|a8Yo5TtRP74mP_mv`">
+                                                                                                                <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
                                                                                                               </block>
                                                                                                             </value>
                                                                                                             <value name="B">
-                                                                                                              <block type="lists_getIndex" id="H3fd}ZOe,bwQPX(LV4rW">
-                                                                                                                <mutation statement="false" at="true"/>
-                                                                                                                <field name="MODE">GET</field>
-                                                                                                                <field name="WHERE">FROM_START</field>
-                                                                                                                <value name="VALUE">
-                                                                                                                  <block type="variables_get" id="O4%TBS/MO3[pyE`r5us3">
-                                                                                                                    <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                              <block type="variables_get" id="$#D6FdXJ6/Dl!OW3tB3d">
+                                                                                                                <field name="VAR" id="09n]XF2CKURQs)nHOfam">y_ball_near</field>
+                                                                                                              </block>
+                                                                                                            </value>
+                                                                                                          </block>
+                                                                                                        </value>
+                                                                                                        <statement name="DO1">
+                                                                                                          <block type="controls_if" id="u:~b5-PiU+[pu_1,Xa98">
+                                                                                                            <mutation elseif="2" else="1"/>
+                                                                                                            <value name="IF0">
+                                                                                                              <block type="logic_operation" id="aA(*kb?~twOr6-H-5Y6L" inline="false">
+                                                                                                                <field name="OP">AND</field>
+                                                                                                                <value name="A">
+                                                                                                                  <block type="logic_compare" id="s@[Z^y:V@HE1Rj;{0kMC">
+                                                                                                                    <field name="OP">GT</field>
+                                                                                                                    <value name="A">
+                                                                                                                      <block type="variables_get" id="i5K6*S_7LI]YP*oc?o#(">
+                                                                                                                        <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                                      </block>
+                                                                                                                    </value>
+                                                                                                                    <value name="B">
+                                                                                                                      <block type="lists_getIndex" id="Gk1Ni~yuA0xqGVB)m$,r">
+                                                                                                                        <mutation statement="false" at="true"/>
+                                                                                                                        <field name="MODE">GET</field>
+                                                                                                                        <field name="WHERE">FROM_START</field>
+                                                                                                                        <value name="VALUE">
+                                                                                                                          <block type="variables_get" id="2.y#4B,;Y:6:KX.dWY!e">
+                                                                                                                            <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                                          </block>
+                                                                                                                        </value>
+                                                                                                                        <value name="AT">
+                                                                                                                          <block type="math_number" id="Yjz]w]~(6fa5M=#WKCa0">
+                                                                                                                            <field name="NUM">1</field>
+                                                                                                                          </block>
+                                                                                                                        </value>
+                                                                                                                      </block>
+                                                                                                                    </value>
                                                                                                                   </block>
                                                                                                                 </value>
-                                                                                                                <value name="AT">
-                                                                                                                  <block type="math_number" id="m)e`~6DTp@f%oR$^?1@u">
-                                                                                                                    <field name="NUM">2</field>
+                                                                                                                <value name="B">
+                                                                                                                  <block type="logic_compare" id="pj/D#[B!S_nEJX02j9b`">
+                                                                                                                    <field name="OP">LT</field>
+                                                                                                                    <value name="A">
+                                                                                                                      <block type="variables_get" id="$R,CQ$q_:mge?X159P8L">
+                                                                                                                        <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                                      </block>
+                                                                                                                    </value>
+                                                                                                                    <value name="B">
+                                                                                                                      <block type="lists_getIndex" id="7$6J3IxJ7|`Pjsi)y#ph">
+                                                                                                                        <mutation statement="false" at="true"/>
+                                                                                                                        <field name="MODE">GET</field>
+                                                                                                                        <field name="WHERE">FROM_START</field>
+                                                                                                                        <value name="VALUE">
+                                                                                                                          <block type="variables_get" id="-/6oVeveklwv!S}e852|">
+                                                                                                                            <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                                          </block>
+                                                                                                                        </value>
+                                                                                                                        <value name="AT">
+                                                                                                                          <block type="math_number" id="oJ]4?$gJ]C@;,f%ql6dR">
+                                                                                                                            <field name="NUM">2</field>
+                                                                                                                          </block>
+                                                                                                                        </value>
+                                                                                                                      </block>
+                                                                                                                    </value>
                                                                                                                   </block>
                                                                                                                 </value>
                                                                                                               </block>
                                                                                                             </value>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                    <statement name="DO1">
-                                                                                                      <block type="procedures_callnoreturn" id="`g//e~_r%pQ[)DUR;?`F">
-                                                                                                        <mutation name="turnBallRight"/>
-                                                                                                      </block>
-                                                                                                    </statement>
-                                                                                                    <value name="IF2">
-                                                                                                      <block type="logic_operation" id="}V=E{bot4=a@4;{W:Eqi" inline="false">
-                                                                                                        <field name="OP">AND</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="logic_compare" id="Z{tUKy/pPWJWfeWiqZqa">
-                                                                                                            <field name="OP">GT</field>
-                                                                                                            <value name="A">
-                                                                                                              <block type="variables_get" id="1MDI2fR,ALRZOi}FccVJ">
-                                                                                                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                            <statement name="DO0">
+                                                                                                              <block type="procedures_callnoreturn" id="sZ-Q381UDm_7-@_=u,Nb" inline="true">
+                                                                                                                <mutation name="fwd_v">
+                                                                                                                  <arg name="v"/>
+                                                                                                                </mutation>
+                                                                                                                <value name="ARG0">
+                                                                                                                  <block type="variables_get" id="EZ7O-Q%B5i4/XcO)EWY*">
+                                                                                                                    <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                                                                                                  </block>
+                                                                                                                </value>
+                                                                                                              </block>
+                                                                                                            </statement>
+                                                                                                            <value name="IF1">
+                                                                                                              <block type="logic_operation" id="y1toQcQ?JoXNUk]#BWyd" inline="false">
+                                                                                                                <field name="OP">AND</field>
+                                                                                                                <value name="A">
+                                                                                                                  <block type="logic_compare" id=".p%vg@`T{)!T6f3i$rO9">
+                                                                                                                    <field name="OP">LT</field>
+                                                                                                                    <value name="A">
+                                                                                                                      <block type="variables_get" id="V2_?}A{Yt7$iai=yCSJ)">
+                                                                                                                        <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                                      </block>
+                                                                                                                    </value>
+                                                                                                                    <value name="B">
+                                                                                                                      <block type="lists_getIndex" id="m?]jjfWt9tUIy,F_m%}i">
+                                                                                                                        <mutation statement="false" at="true"/>
+                                                                                                                        <field name="MODE">GET</field>
+                                                                                                                        <field name="WHERE">FROM_START</field>
+                                                                                                                        <value name="VALUE">
+                                                                                                                          <block type="variables_get" id="awS7kY(J(0{xSv!/NOei">
+                                                                                                                            <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                                          </block>
+                                                                                                                        </value>
+                                                                                                                        <value name="AT">
+                                                                                                                          <block type="math_number" id="rMzpQD@SM~G/b$@x(bzw">
+                                                                                                                            <field name="NUM">1</field>
+                                                                                                                          </block>
+                                                                                                                        </value>
+                                                                                                                      </block>
+                                                                                                                    </value>
+                                                                                                                  </block>
+                                                                                                                </value>
+                                                                                                                <value name="B">
+                                                                                                                  <block type="logic_compare" id="-I~|7,G,H7p/(=+cA3L}">
+                                                                                                                    <field name="OP">LT</field>
+                                                                                                                    <value name="A">
+                                                                                                                      <block type="variables_get" id="g-:OONj{*4WfXZ](X!%a">
+                                                                                                                        <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                                      </block>
+                                                                                                                    </value>
+                                                                                                                    <value name="B">
+                                                                                                                      <block type="lists_getIndex" id="H3fd}ZOe,bwQPX(LV4rW">
+                                                                                                                        <mutation statement="false" at="true"/>
+                                                                                                                        <field name="MODE">GET</field>
+                                                                                                                        <field name="WHERE">FROM_START</field>
+                                                                                                                        <value name="VALUE">
+                                                                                                                          <block type="variables_get" id="O4%TBS/MO3[pyE`r5us3">
+                                                                                                                            <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                                          </block>
+                                                                                                                        </value>
+                                                                                                                        <value name="AT">
+                                                                                                                          <block type="math_number" id="m)e`~6DTp@f%oR$^?1@u">
+                                                                                                                            <field name="NUM">2</field>
+                                                                                                                          </block>
+                                                                                                                        </value>
+                                                                                                                      </block>
+                                                                                                                    </value>
+                                                                                                                  </block>
+                                                                                                                </value>
                                                                                                               </block>
                                                                                                             </value>
-                                                                                                            <value name="B">
-                                                                                                              <block type="lists_getIndex" id="{/rW*q)WC4YJAc_{6zEv">
-                                                                                                                <mutation statement="false" at="true"/>
-                                                                                                                <field name="MODE">GET</field>
-                                                                                                                <field name="WHERE">FROM_START</field>
-                                                                                                                <value name="VALUE">
-                                                                                                                  <block type="variables_get" id="[=.-l*d|=LkB@kx^g=zQ">
-                                                                                                                    <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                            <statement name="DO1">
+                                                                                                              <block type="procedures_callnoreturn" id="fs3R{xW/!NZ+huwii|WQ">
+                                                                                                                <mutation name="turnBallLeft"/>
+                                                                                                              </block>
+                                                                                                            </statement>
+                                                                                                            <value name="IF2">
+                                                                                                              <block type="logic_operation" id="}V=E{bot4=a@4;{W:Eqi" inline="false">
+                                                                                                                <field name="OP">AND</field>
+                                                                                                                <value name="A">
+                                                                                                                  <block type="logic_compare" id="Z{tUKy/pPWJWfeWiqZqa">
+                                                                                                                    <field name="OP">GT</field>
+                                                                                                                    <value name="A">
+                                                                                                                      <block type="variables_get" id="1MDI2fR,ALRZOi}FccVJ">
+                                                                                                                        <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                                      </block>
+                                                                                                                    </value>
+                                                                                                                    <value name="B">
+                                                                                                                      <block type="lists_getIndex" id="{/rW*q)WC4YJAc_{6zEv">
+                                                                                                                        <mutation statement="false" at="true"/>
+                                                                                                                        <field name="MODE">GET</field>
+                                                                                                                        <field name="WHERE">FROM_START</field>
+                                                                                                                        <value name="VALUE">
+                                                                                                                          <block type="variables_get" id="[=.-l*d|=LkB@kx^g=zQ">
+                                                                                                                            <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                                          </block>
+                                                                                                                        </value>
+                                                                                                                        <value name="AT">
+                                                                                                                          <block type="math_number" id="*X%si/+l#z3E95A1SS{L">
+                                                                                                                            <field name="NUM">1</field>
+                                                                                                                          </block>
+                                                                                                                        </value>
+                                                                                                                      </block>
+                                                                                                                    </value>
                                                                                                                   </block>
                                                                                                                 </value>
-                                                                                                                <value name="AT">
-                                                                                                                  <block type="math_number" id="*X%si/+l#z3E95A1SS{L">
-                                                                                                                    <field name="NUM">1</field>
+                                                                                                                <value name="B">
+                                                                                                                  <block type="logic_compare" id="FkJHQ#CLjJp,s#{H{pha">
+                                                                                                                    <field name="OP">GT</field>
+                                                                                                                    <value name="A">
+                                                                                                                      <block type="variables_get" id="(Dk1+3wh2]HCao.dq?PS">
+                                                                                                                        <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                                      </block>
+                                                                                                                    </value>
+                                                                                                                    <value name="B">
+                                                                                                                      <block type="lists_getIndex" id="b*n2dt}`Z4Ea^z3!_-k#">
+                                                                                                                        <mutation statement="false" at="true"/>
+                                                                                                                        <field name="MODE">GET</field>
+                                                                                                                        <field name="WHERE">FROM_START</field>
+                                                                                                                        <value name="VALUE">
+                                                                                                                          <block type="variables_get" id="ag@C3!BdIHxH`fg9pah1">
+                                                                                                                            <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                                          </block>
+                                                                                                                        </value>
+                                                                                                                        <value name="AT">
+                                                                                                                          <block type="math_number" id="ZI-BpoG=~}GC}.1GY4L?">
+                                                                                                                            <field name="NUM">2</field>
+                                                                                                                          </block>
+                                                                                                                        </value>
+                                                                                                                      </block>
+                                                                                                                    </value>
                                                                                                                   </block>
                                                                                                                 </value>
                                                                                                               </block>
                                                                                                             </value>
+                                                                                                            <statement name="DO2">
+                                                                                                              <block type="procedures_callnoreturn" id="`g//e~_r%pQ[)DUR;?`F">
+                                                                                                                <mutation name="turnBallRight"/>
+                                                                                                              </block>
+                                                                                                            </statement>
+                                                                                                            <statement name="ELSE">
+                                                                                                              <block type="procedures_callnoreturn" id="Xa4Y={.L=QNVSnwr3E|_">
+                                                                                                                <mutation name="stop"/>
+                                                                                                              </block>
+                                                                                                            </statement>
                                                                                                           </block>
-                                                                                                        </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="logic_compare" id="FkJHQ#CLjJp,s#{H{pha">
-                                                                                                            <field name="OP">GT</field>
+                                                                                                        </statement>
+                                                                                                        <value name="IF2">
+                                                                                                          <block type="logic_compare" id="cn5,`k@5*q#XXj0ugN64">
+                                                                                                            <field name="OP">LTE</field>
                                                                                                             <value name="A">
-                                                                                                              <block type="variables_get" id="(Dk1+3wh2]HCao.dq?PS">
-                                                                                                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                              <block type="variables_get" id="%s03s#6dgd9,gsBFI%jB">
+                                                                                                                <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
                                                                                                               </block>
                                                                                                             </value>
                                                                                                             <value name="B">
-                                                                                                              <block type="lists_getIndex" id="b*n2dt}`Z4Ea^z3!_-k#">
-                                                                                                                <mutation statement="false" at="true"/>
-                                                                                                                <field name="MODE">GET</field>
-                                                                                                                <field name="WHERE">FROM_START</field>
-                                                                                                                <value name="VALUE">
-                                                                                                                  <block type="variables_get" id="ag@C3!BdIHxH`fg9pah1">
-                                                                                                                    <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
-                                                                                                                  </block>
-                                                                                                                </value>
-                                                                                                                <value name="AT">
-                                                                                                                  <block type="math_number" id="ZI-BpoG=~}GC}.1GY4L?">
-                                                                                                                    <field name="NUM">2</field>
-                                                                                                                  </block>
-                                                                                                                </value>
+                                                                                                              <block type="variables_get" id="[p/x;`ab/;Bg4Kn8589%">
+                                                                                                                <field name="VAR" id="xjf5O*w9;IZf$n55ytVF">y_ball_touch</field>
                                                                                                               </block>
                                                                                                             </value>
                                                                                                           </block>
                                                                                                         </value>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                    <statement name="DO2">
-                                                                                                      <block type="procedures_callnoreturn" id="fs3R{xW/!NZ+huwii|WQ">
-                                                                                                        <mutation name="turnBallLeft"/>
-                                                                                                      </block>
-                                                                                                    </statement>
-                                                                                                    <statement name="ELSE">
-                                                                                                      <block type="procedures_callnoreturn" id="Xa4Y={.L=QNVSnwr3E|_">
-                                                                                                        <mutation name="stop"/>
-                                                                                                      </block>
-                                                                                                    </statement>
-                                                                                                  </block>
-                                                                                                </next>
-                                                                                              </block>
-                                                                                            </statement>
-                                                                                            <value name="IF4">
-                                                                                              <block type="logic_operation" id="n;fJ-X=w7VQ~lqJ!9izM" inline="false">
-                                                                                                <field name="OP">AND</field>
-                                                                                                <value name="A">
-                                                                                                  <block type="logic_operation" id="NFf.9WuEcFjGpo|he2Lq" inline="false">
-                                                                                                    <field name="OP">OR</field>
-                                                                                                    <value name="A">
-                                                                                                      <block type="logic_compare" id="R$,3LHh`g+6Wa:m#*[Ys">
-                                                                                                        <field name="OP">EQ</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="variables_get" id="rwEBIEg)#f$fNY):g16?">
-                                                                                                            <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                        <statement name="DO2">
+                                                                                                          <block type="procedures_callnoreturn" id="0`3ax3Vh.zGnD9];Yb=W" inline="true">
+                                                                                                            <mutation name="bwd_v">
+                                                                                                              <arg name="v"/>
+                                                                                                            </mutation>
+                                                                                                            <value name="ARG0">
+                                                                                                              <block type="variables_get" id="@%~/x=Q=6h3dYJ8NF`SF">
+                                                                                                                <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                                                                                              </block>
+                                                                                                            </value>
                                                                                                           </block>
-                                                                                                        </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="logic_null" id="9d:a29Y`@{YMRdTLZH|W"/>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                    <value name="B">
-                                                                                                      <block type="logic_compare" id="chjUw+0f?gW,C~KalQZQ">
-                                                                                                        <field name="OP">EQ</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="variables_get" id="J;t`p`a%Tr`zE:+/Lx%x">
-                                                                                                            <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                        </statement>
+                                                                                                        <statement name="ELSE">
+                                                                                                          <block type="procedures_callnoreturn" id="=56A!T,|yxe![pQgmxd5">
+                                                                                                            <mutation name="stop"/>
                                                                                                           </block>
-                                                                                                        </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="logic_null" id="tsl[NONq~[]^~}KRpNQy"/>
-                                                                                                        </value>
+                                                                                                        </statement>
                                                                                                       </block>
-                                                                                                    </value>
+                                                                                                    </next>
                                                                                                   </block>
-                                                                                                </value>
-                                                                                                <value name="B">
-                                                                                                  <block type="logic_operation" id="awUXoJ:Avy=jfaq3Lnw2" inline="false">
-                                                                                                    <field name="OP">OR</field>
+                                                                                                </statement>
+                                                                                                <value name="IF4">
+                                                                                                  <block type="logic_operation" id="n;fJ-X=w7VQ~lqJ!9izM" inline="false">
+                                                                                                    <field name="OP">AND</field>
                                                                                                     <value name="A">
-                                                                                                      <block type="logic_compare" id="yh3|ZUJR1=Q-QK;7j4Vq">
-                                                                                                        <field name="OP">NEQ</field>
+                                                                                                      <block type="logic_operation" id="NFf.9WuEcFjGpo|he2Lq" inline="false">
+                                                                                                        <field name="OP">OR</field>
                                                                                                         <value name="A">
-                                                                                                          <block type="lists_getIndex" id="a2r-4w=%vQYhSHM`~eZ]">
-                                                                                                            <mutation statement="false" at="true"/>
-                                                                                                            <field name="MODE">GET</field>
-                                                                                                            <field name="WHERE">FROM_START</field>
-                                                                                                            <value name="VALUE">
-                                                                                                              <block type="variables_get" id="T$V8$ZEi|{};;VR5guWF">
-                                                                                                                <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                          <block type="logic_compare" id="R$,3LHh`g+6Wa:m#*[Ys">
+                                                                                                            <field name="OP">EQ</field>
+                                                                                                            <value name="A">
+                                                                                                              <block type="variables_get" id="rwEBIEg)#f$fNY):g16?">
+                                                                                                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
                                                                                                               </block>
                                                                                                             </value>
-                                                                                                            <value name="AT">
-                                                                                                              <block type="math_number" id="CkEN:gECzR=^Fe$@:9TJ">
-                                                                                                                <field name="NUM">1</field>
-                                                                                                              </block>
+                                                                                                            <value name="B">
+                                                                                                              <block type="logic_null" id="9d:a29Y`@{YMRdTLZH|W"/>
                                                                                                             </value>
                                                                                                           </block>
                                                                                                         </value>
                                                                                                         <value name="B">
-                                                                                                          <block type="logic_null" id="o5dj.]+Z)07l-FMKaT%{"/>
+                                                                                                          <block type="logic_compare" id="chjUw+0f?gW,C~KalQZQ">
+                                                                                                            <field name="OP">EQ</field>
+                                                                                                            <value name="A">
+                                                                                                              <block type="variables_get" id="J;t`p`a%Tr`zE:+/Lx%x">
+                                                                                                                <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                              </block>
+                                                                                                            </value>
+                                                                                                            <value name="B">
+                                                                                                              <block type="logic_null" id="tsl[NONq~[]^~}KRpNQy"/>
+                                                                                                            </value>
+                                                                                                          </block>
                                                                                                         </value>
                                                                                                       </block>
                                                                                                     </value>
                                                                                                     <value name="B">
-                                                                                                      <block type="logic_compare" id="L1~%)SdSHa$uo6A.8#6f">
-                                                                                                        <field name="OP">NEQ</field>
+                                                                                                      <block type="logic_operation" id="awUXoJ:Avy=jfaq3Lnw2" inline="false">
+                                                                                                        <field name="OP">OR</field>
                                                                                                         <value name="A">
-                                                                                                          <block type="lists_getIndex" id=",]].`)eldGT-g}09Z7B-">
-                                                                                                            <mutation statement="false" at="true"/>
-                                                                                                            <field name="MODE">GET</field>
-                                                                                                            <field name="WHERE">FROM_START</field>
-                                                                                                            <value name="VALUE">
-                                                                                                              <block type="variables_get" id="KhabrJ}B*?4SNA*zG(2v">
-                                                                                                                <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                          <block type="logic_compare" id="yh3|ZUJR1=Q-QK;7j4Vq">
+                                                                                                            <field name="OP">NEQ</field>
+                                                                                                            <value name="A">
+                                                                                                              <block type="lists_getIndex" id="a2r-4w=%vQYhSHM`~eZ]">
+                                                                                                                <mutation statement="false" at="true"/>
+                                                                                                                <field name="MODE">GET</field>
+                                                                                                                <field name="WHERE">FROM_START</field>
+                                                                                                                <value name="VALUE">
+                                                                                                                  <block type="variables_get" id="T$V8$ZEi|{};;VR5guWF">
+                                                                                                                    <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                                  </block>
+                                                                                                                </value>
+                                                                                                                <value name="AT">
+                                                                                                                  <block type="math_number" id="CkEN:gECzR=^Fe$@:9TJ">
+                                                                                                                    <field name="NUM">1</field>
+                                                                                                                  </block>
+                                                                                                                </value>
                                                                                                               </block>
                                                                                                             </value>
-                                                                                                            <value name="AT">
-                                                                                                              <block type="math_number" id="km]HFZtzI)v+!+!)*q`7">
-                                                                                                                <field name="NUM">2</field>
-                                                                                                              </block>
+                                                                                                            <value name="B">
+                                                                                                              <block type="logic_null" id="o5dj.]+Z)07l-FMKaT%{"/>
                                                                                                             </value>
                                                                                                           </block>
                                                                                                         </value>
                                                                                                         <value name="B">
-                                                                                                          <block type="logic_null" id="_D1?^^LL[mra-s}9x67K"/>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                  </block>
-                                                                                                </value>
-                                                                                              </block>
-                                                                                            </value>
-                                                                                            <statement name="DO4">
-                                                                                              <block type="variables_set" id="qjHV]^:Wo)#J|x`[z9Dw">
-                                                                                                <field name="VAR" id="vH;^OzJY7dOdepMScU1s">state</field>
-                                                                                                <value name="VALUE">
-                                                                                                  <block type="text" id="0tLy^$!b-,Fdll2TwLa0">
-                                                                                                    <field name="TEXT">NO_BALL</field>
-                                                                                                  </block>
-                                                                                                </value>
-                                                                                                <next>
-                                                                                                  <block type="procedures_callnoreturn" id="~e,9WDXasUar9~[eQ#bq" inline="true">
-                                                                                                    <mutation name="left_v">
-                                                                                                      <arg name="v"/>
-                                                                                                    </mutation>
-                                                                                                    <value name="ARG0">
-                                                                                                      <block type="variables_get" id="a6~lQO=iKTa%P$.9vwF`">
-                                                                                                        <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                  </block>
-                                                                                                </next>
-                                                                                              </block>
-                                                                                            </statement>
-                                                                                            <value name="IF5">
-                                                                                              <block type="logic_boolean" id="xuIk1@=PZ@V7jq%*R5t%">
-                                                                                                <field name="BOOL">FALSE</field>
-                                                                                              </block>
-                                                                                            </value>
-                                                                                            <statement name="DO5">
-                                                                                              <block type="controls_if" id="KvGY3!$zq%]{SYcSc[7m">
-                                                                                                <mutation elseif="3" else="1"/>
-                                                                                                <value name="IF0">
-                                                                                                  <block type="logic_compare" id="B=vu#kuU;qn.;,!Q)zvZ">
-                                                                                                    <field name="OP">LT</field>
-                                                                                                    <value name="A">
-                                                                                                      <block type="lists_getIndex" id="+P.a$BTLIN[F|%}FN$_F">
-                                                                                                        <mutation statement="false" at="true"/>
-                                                                                                        <field name="MODE">GET</field>
-                                                                                                        <field name="WHERE">FROM_START</field>
-                                                                                                        <value name="VALUE">
-                                                                                                          <block type="variables_get" id="dZ4u4Y]208l5,n^p/=qf">
-                                                                                                            <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                        <value name="AT">
-                                                                                                          <block type="math_number" id="_d5c3vTK-dt?#mV]X%D/">
-                                                                                                            <field name="NUM">1</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                    <value name="B">
-                                                                                                      <block type="variables_get" id="AgRmYvSA6@z6mYB6@fFA">
-                                                                                                        <field name="VAR" id="Ym/+Qo0YZe25;%N1d!*f">x_min</field>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                  </block>
-                                                                                                </value>
-                                                                                                <statement name="DO0">
-                                                                                                  <block type="procedures_callnoreturn" id="+EAOut)hnbN;,CctGcIN" inline="true">
-                                                                                                    <mutation name="sideleft_v">
-                                                                                                      <arg name="v"/>
-                                                                                                    </mutation>
-                                                                                                    <value name="ARG0">
-                                                                                                      <block type="math_number" id="k8E(D2NZYJGR/LxfRAe`">
-                                                                                                        <field name="NUM">180</field>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                  </block>
-                                                                                                </statement>
-                                                                                                <value name="IF1">
-                                                                                                  <block type="logic_compare" id="%Sv9J|%0l}R*#ixcN^Ek">
-                                                                                                    <field name="OP">GT</field>
-                                                                                                    <value name="A">
-                                                                                                      <block type="lists_getIndex" id="fJJ$CZG+EKmA[pAj?`{)">
-                                                                                                        <mutation statement="false" at="true"/>
-                                                                                                        <field name="MODE">GET</field>
-                                                                                                        <field name="WHERE">FROM_START</field>
-                                                                                                        <value name="VALUE">
-                                                                                                          <block type="variables_get" id="dF-xGlJu@cqC3pN_9/V5">
-                                                                                                            <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                        <value name="AT">
-                                                                                                          <block type="math_number" id="br`CrQ/t+;jQG-ikq;i{">
-                                                                                                            <field name="NUM">1</field>
+                                                                                                          <block type="logic_compare" id="L1~%)SdSHa$uo6A.8#6f">
+                                                                                                            <field name="OP">NEQ</field>
+                                                                                                            <value name="A">
+                                                                                                              <block type="lists_getIndex" id=",]].`)eldGT-g}09Z7B-">
+                                                                                                                <mutation statement="false" at="true"/>
+                                                                                                                <field name="MODE">GET</field>
+                                                                                                                <field name="WHERE">FROM_START</field>
+                                                                                                                <value name="VALUE">
+                                                                                                                  <block type="variables_get" id="KhabrJ}B*?4SNA*zG(2v">
+                                                                                                                    <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                                  </block>
+                                                                                                                </value>
+                                                                                                                <value name="AT">
+                                                                                                                  <block type="math_number" id="km]HFZtzI)v+!+!)*q`7">
+                                                                                                                    <field name="NUM">2</field>
+                                                                                                                  </block>
+                                                                                                                </value>
+                                                                                                              </block>
+                                                                                                            </value>
+                                                                                                            <value name="B">
+                                                                                                              <block type="logic_null" id="_D1?^^LL[mra-s}9x67K"/>
+                                                                                                            </value>
                                                                                                           </block>
                                                                                                         </value>
                                                                                                       </block>
                                                                                                     </value>
-                                                                                                    <value name="B">
-                                                                                                      <block type="variables_get" id="6nz_eq9+/Xkxe:eT^[z@">
-                                                                                                        <field name="VAR" id="2G]XEQ3Lhl$dG]=:]8Ge">x_max</field>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                  </block>
-                                                                                                </value>
-                                                                                                <statement name="DO1">
-                                                                                                  <block type="procedures_callnoreturn" id="-JdEwEQT.ATb$i67ISiG" inline="true">
-                                                                                                    <mutation name="sideright_v">
-                                                                                                      <arg name="v"/>
-                                                                                                    </mutation>
-                                                                                                    <value name="ARG0">
-                                                                                                      <block type="math_number" id="Vg6E?/KRoI+:^TRbYc~O">
-                                                                                                        <field name="NUM">180</field>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                  </block>
-                                                                                                </statement>
-                                                                                                <value name="IF2">
-                                                                                                  <block type="logic_compare" id="L_I_ad:9wl}-TbpYbPOj">
-                                                                                                    <field name="OP">LT</field>
-                                                                                                    <value name="A">
-                                                                                                      <block type="variables_get" id="@76pQj66r^uAxD,(F4/f">
-                                                                                                        <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                    <value name="B">
-                                                                                                      <block type="variables_get" id="ol/ail=b}-NHf4K|Fl9J">
-                                                                                                        <field name="VAR" id="Ym/+Qo0YZe25;%N1d!*f">x_min</field>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                  </block>
-                                                                                                </value>
-                                                                                                <statement name="DO2">
-                                                                                                  <block type="procedures_callnoreturn" id="V_|wVa),nGw8gHM,NPMX" inline="true">
-                                                                                                    <mutation name="left">
-                                                                                                      <arg name="v"/>
-                                                                                                      <arg name="ticks"/>
-                                                                                                    </mutation>
-                                                                                                    <value name="ARG0">
-                                                                                                      <block type="variables_get" id="@%Nu(|2.Fg]01{l,W#GY">
-                                                                                                        <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                    <value name="ARG1">
-                                                                                                      <block type="variables_get" id="Y9pX#d1sri_Td5@bhaTb">
-                                                                                                        <field name="VAR" id="AnbD2s`i`niJf7bj:WR.">dist_x</field>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                  </block>
-                                                                                                </statement>
-                                                                                                <value name="IF3">
-                                                                                                  <block type="logic_compare" id="WSZ312,]FI|*3JtYdw:b">
-                                                                                                    <field name="OP">GT</field>
-                                                                                                    <value name="A">
-                                                                                                      <block type="variables_get" id="8R^4V:#9m8rQ=d4Vo30$">
-                                                                                                        <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                    <value name="B">
-                                                                                                      <block type="variables_get" id="wr7|`R0V:O?5n;pG_oV~">
-                                                                                                        <field name="VAR" id="2G]XEQ3Lhl$dG]=:]8Ge">x_max</field>
-                                                                                                      </block>
-                                                                                                    </value>
                                                                                                   </block>
                                                                                                 </value>
-                                                                                                <statement name="DO3">
-                                                                                                  <block type="procedures_callnoreturn" id="UDr4(wRdDParoZEUs:w@" inline="true">
-                                                                                                    <mutation name="right">
-                                                                                                      <arg name="v"/>
-                                                                                                      <arg name="ticks"/>
-                                                                                                    </mutation>
-                                                                                                    <value name="ARG0">
-                                                                                                      <block type="variables_get" id="kx00*p[#V~+nhAVcJWd)">
-                                                                                                        <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                    <value name="ARG1">
-                                                                                                      <block type="variables_get" id="G1i7[~dv_Aff}11SL/~X">
-                                                                                                        <field name="VAR" id="AnbD2s`i`niJf7bj:WR.">dist_x</field>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                  </block>
-                                                                                                </statement>
-                                                                                                <statement name="ELSE">
-                                                                                                  <block type="controls_if" id="1W5U1#HIVC#sFf,=}aPk">
-                                                                                                    <mutation elseif="1" else="1"/>
-                                                                                                    <value name="IF0">
-                                                                                                      <block type="logic_compare" id="UG6JrG`G%RjgLMd^~Ql)">
-                                                                                                        <field name="OP">GTE</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="variables_get" id="plWMHX+zH[B*)Z,!PdFG">
-                                                                                                            <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="variables_get" id="d52]DnV:k]`,vbs2Owx@">
-                                                                                                            <field name="VAR" id="}*jl@)UA_Hjh5rc,Gt)c">y_ball_far</field>
-                                                                                                          </block>
-                                                                                                        </value>
+                                                                                                <statement name="DO4">
+                                                                                                  <block type="variables_set" id="qjHV]^:Wo)#J|x`[z9Dw">
+                                                                                                    <field name="VAR" id="vH;^OzJY7dOdepMScU1s">state</field>
+                                                                                                    <value name="VALUE">
+                                                                                                      <block type="text" id="0tLy^$!b-,Fdll2TwLa0">
+                                                                                                        <field name="TEXT">NO_BALL</field>
                                                                                                       </block>
                                                                                                     </value>
-                                                                                                    <statement name="DO0">
-                                                                                                      <block type="procedures_callnoreturn" id="op;Gb+2E6qWV#_xTw%*f" inline="true">
-                                                                                                        <mutation name="fwd_v">
+                                                                                                    <next>
+                                                                                                      <block type="procedures_callnoreturn" id="D9NXiAUbA9g`^x1OC=Li" inline="true">
+                                                                                                        <mutation name="left_v">
                                                                                                           <arg name="v"/>
                                                                                                         </mutation>
                                                                                                         <value name="ARG0">
-                                                                                                          <block type="variables_get" id="%,dj%LP)z^+F=bAaT2y4">
-                                                                                                            <field name="VAR" id="1idj3sw*{G$j`2:II{^5">v_fast</field>
+                                                                                                          <block type="variables_get" id="[kRD~}Lvl6BXA_+4Ha::">
+                                                                                                            <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
                                                                                                           </block>
                                                                                                         </value>
                                                                                                       </block>
-                                                                                                    </statement>
-                                                                                                    <value name="IF1">
-                                                                                                      <block type="logic_compare" id="Yr?8v,ne7CHC3J@.tG~K">
-                                                                                                        <field name="OP">LT</field>
-                                                                                                        <value name="A">
-                                                                                                          <block type="variables_get" id=".b9fq3}BRfR%4GA[G)OY">
-                                                                                                            <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                        <value name="B">
-                                                                                                          <block type="variables_get" id="C#~[c+~*VLa)Bs#/bb8e">
-                                                                                                            <field name="VAR" id="xjf5O*w9;IZf$n55ytVF">y_ball_touch</field>
-                                                                                                          </block>
-                                                                                                        </value>
+                                                                                                    </next>
+                                                                                                  </block>
+                                                                                                </statement>
+                                                                                                <statement name="ELSE">
+                                                                                                  <block type="variables_set" id="50o[ObTwzWD=aupUSv#W">
+                                                                                                    <field name="VAR" id="vH;^OzJY7dOdepMScU1s">state</field>
+                                                                                                    <value name="VALUE">
+                                                                                                      <block type="text" id="BaG@T;!/Smm@WZeM1+h#">
+                                                                                                        <field name="TEXT">NONE</field>
                                                                                                       </block>
                                                                                                     </value>
-                                                                                                    <statement name="DO1">
-                                                                                                      <block type="procedures_callnoreturn" id="{8;:MqS_MFU5y`-[u:mG" inline="true">
-                                                                                                        <mutation name="fwd_v">
-                                                                                                          <arg name="v"/>
-                                                                                                        </mutation>
-                                                                                                        <value name="ARG0">
-                                                                                                          <block type="variables_get" id="aqXd,2m3/|Vs0Z|8wWEn">
-                                                                                                            <field name="VAR" id=";S3?%3)**s[[l~Aq3*,{">speed_y</field>
-                                                                                                          </block>
-                                                                                                        </value>
+                                                                                                    <next>
+                                                                                                      <block type="procedures_callnoreturn" id="Vt?gYTO)@8t@tP0loYxP">
+                                                                                                        <mutation name="stop"/>
                                                                                                       </block>
-                                                                                                    </statement>
+                                                                                                    </next>
                                                                                                   </block>
                                                                                                 </statement>
                                                                                               </block>
                                                                                             </statement>
-                                                                                          </block>
-                                                                                        </statement>
-                                                                                        <next>
-                                                                                          <block type="display_set_label_text" id="QDZ)v?E3iW-Liq4HKvUn">
-                                                                                            <field name="instance_name">txt_label_ball</field>
-                                                                                            <value name="value">
-                                                                                              <shadow type="text" id="B`M|)AOBioxQGjue#9y^">
-                                                                                                <field name="TEXT">abc</field>
-                                                                                              </shadow>
-                                                                                              <block type="text_format" id="bMzX7EzL+}J^dowK5pv|">
-                                                                                                <mutation items="2"/>
-                                                                                                <value name="value">
-                                                                                                  <shadow type="text" id="(C2/oN~6=q7Bw[A5`Pz)">
-                                                                                                    <field name="TEXT">x:{}, y:{}</field>
-                                                                                                  </shadow>
-                                                                                                </value>
-                                                                                                <value name="ADD0">
-                                                                                                  <block type="variables_get" id="N3bK$!XutDL@t?7tqOnB">
-                                                                                                    <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
-                                                                                                  </block>
-                                                                                                </value>
-                                                                                                <value name="ADD1">
-                                                                                                  <block type="variables_get" id="CIUI@k|{^~}vfJeTSYP2">
-                                                                                                    <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
-                                                                                                  </block>
-                                                                                                </value>
-                                                                                              </block>
-                                                                                            </value>
                                                                                             <next>
-                                                                                              <block type="display_set_label_text" id="2Ac72_SmdOYaC#|w[dk%">
-                                                                                                <field name="instance_name">txt_label_goal</field>
+                                                                                              <block type="display_set_label_text" id="QDZ)v?E3iW-Liq4HKvUn">
+                                                                                                <field name="instance_name">txt_label_ball</field>
                                                                                                 <value name="value">
-                                                                                                  <shadow type="text">
+                                                                                                  <shadow type="text" id="B`M|)AOBioxQGjue#9y^">
                                                                                                     <field name="TEXT">abc</field>
                                                                                                   </shadow>
-                                                                                                  <block type="text_format" id="xXJlH+s%1,D1WcfOkt#6">
-                                                                                                    <mutation items="1"/>
+                                                                                                  <block type="text_format" id="bMzX7EzL+}J^dowK5pv|">
+                                                                                                    <mutation items="2"/>
                                                                                                     <value name="value">
-                                                                                                      <shadow type="text" id=":(AhX7mg_fQeOGz*xR@g">
-                                                                                                        <field name="TEXT">x:{}</field>
+                                                                                                      <shadow type="text" id="(C2/oN~6=q7Bw[A5`Pz)">
+                                                                                                        <field name="TEXT">x:{}, y:{}</field>
                                                                                                       </shadow>
                                                                                                     </value>
                                                                                                     <value name="ADD0">
-                                                                                                      <block type="variables_get" id="ppSdz+]@cvkJ)r-5HdD^">
-                                                                                                        <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                      <block type="variables_get" id="N3bK$!XutDL@t?7tqOnB">
+                                                                                                        <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                      </block>
+                                                                                                    </value>
+                                                                                                    <value name="ADD1">
+                                                                                                      <block type="variables_get" id="CIUI@k|{^~}vfJeTSYP2">
+                                                                                                        <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
                                                                                                       </block>
                                                                                                     </value>
                                                                                                   </block>
                                                                                                 </value>
                                                                                                 <next>
-                                                                                                  <block type="text_print" id="##1hG%c^2!NKjN~e1lyg">
-                                                                                                    <value name="TEXT">
-                                                                                                      <shadow type="text" id="p_E`2=Fj^pN,D}gxPEvW">
-                                                                                                        <field name="TEXT"/>
+                                                                                                  <block type="display_set_label_text" id="2Ac72_SmdOYaC#|w[dk%">
+                                                                                                    <field name="instance_name">txt_label_goal</field>
+                                                                                                    <value name="value">
+                                                                                                      <shadow type="text">
+                                                                                                        <field name="TEXT">abc</field>
                                                                                                       </shadow>
-                                                                                                      <block type="text_format" id="mB*d7.SSna@S_Ds5Y4[o">
-                                                                                                        <mutation items="7"/>
+                                                                                                      <block type="text_format" id="xXJlH+s%1,D1WcfOkt#6">
+                                                                                                        <mutation items="1"/>
                                                                                                         <value name="value">
-                                                                                                          <shadow type="text" id="a{L7ErJR}=Flx|}3~+X4">
-                                                                                                            <field name="TEXT">{}:  GOAL_x: {}, {} BALL_pos:{},{} dist_x:{} speed_y:{}</field>
+                                                                                                          <shadow type="text" id=":(AhX7mg_fQeOGz*xR@g">
+                                                                                                            <field name="TEXT">x:{}</field>
                                                                                                           </shadow>
                                                                                                         </value>
                                                                                                         <value name="ADD0">
-                                                                                                          <block type="variables_get" id="wVt[k#I:X+:T`RVkRf]K">
-                                                                                                            <field name="VAR" id="vH;^OzJY7dOdepMScU1s">state</field>
+                                                                                                          <block type="variables_get" id="ppSdz+]@cvkJ)r-5HdD^">
+                                                                                                            <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
                                                                                                           </block>
                                                                                                         </value>
-                                                                                                        <value name="ADD1">
-                                                                                                          <block type="lists_getIndex" id=";CdZ:9!xf(3gc%Mh;He0">
-                                                                                                            <mutation statement="false" at="true"/>
-                                                                                                            <field name="MODE">GET</field>
-                                                                                                            <field name="WHERE">FROM_START</field>
-                                                                                                            <value name="VALUE">
-                                                                                                              <block type="variables_get" id="+?O{K7(C)vw`Y6!T4L(o">
-                                                                                                                <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                      </block>
+                                                                                                    </value>
+                                                                                                    <next>
+                                                                                                      <block type="text_print" id="##1hG%c^2!NKjN~e1lyg">
+                                                                                                        <value name="TEXT">
+                                                                                                          <shadow type="text" id="p_E`2=Fj^pN,D}gxPEvW">
+                                                                                                            <field name="TEXT"/>
+                                                                                                          </shadow>
+                                                                                                          <block type="text_format" id="mB*d7.SSna@S_Ds5Y4[o">
+                                                                                                            <mutation items="7"/>
+                                                                                                            <value name="value">
+                                                                                                              <shadow type="text" id="a{L7ErJR}=Flx|}3~+X4">
+                                                                                                                <field name="TEXT">{}:  GOAL_x: {}, {} BALL_pos:{},{} dist_x:{} speed_y:{}</field>
+                                                                                                              </shadow>
+                                                                                                            </value>
+                                                                                                            <value name="ADD0">
+                                                                                                              <block type="variables_get" id="wVt[k#I:X+:T`RVkRf]K">
+                                                                                                                <field name="VAR" id="vH;^OzJY7dOdepMScU1s">state</field>
                                                                                                               </block>
                                                                                                             </value>
-                                                                                                            <value name="AT">
-                                                                                                              <block type="math_number" id="Vn9o7R1/1Q!=L_;i9X4o">
-                                                                                                                <field name="NUM">1</field>
+                                                                                                            <value name="ADD1">
+                                                                                                              <block type="lists_getIndex" id=";CdZ:9!xf(3gc%Mh;He0">
+                                                                                                                <mutation statement="false" at="true"/>
+                                                                                                                <field name="MODE">GET</field>
+                                                                                                                <field name="WHERE">FROM_START</field>
+                                                                                                                <value name="VALUE">
+                                                                                                                  <block type="variables_get" id="+?O{K7(C)vw`Y6!T4L(o">
+                                                                                                                    <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                                  </block>
+                                                                                                                </value>
+                                                                                                                <value name="AT">
+                                                                                                                  <block type="math_number" id="Vn9o7R1/1Q!=L_;i9X4o">
+                                                                                                                    <field name="NUM">1</field>
+                                                                                                                  </block>
+                                                                                                                </value>
                                                                                                               </block>
                                                                                                             </value>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                        <value name="ADD2">
-                                                                                                          <block type="lists_getIndex" id="a4ca)9;+OLbvk6YkfibR">
-                                                                                                            <mutation statement="false" at="true"/>
-                                                                                                            <field name="MODE">GET</field>
-                                                                                                            <field name="WHERE">FROM_START</field>
-                                                                                                            <value name="VALUE">
-                                                                                                              <block type="variables_get" id="/(B3zJewppd~EofXj-kV">
-                                                                                                                <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                            <value name="ADD2">
+                                                                                                              <block type="lists_getIndex" id="a4ca)9;+OLbvk6YkfibR">
+                                                                                                                <mutation statement="false" at="true"/>
+                                                                                                                <field name="MODE">GET</field>
+                                                                                                                <field name="WHERE">FROM_START</field>
+                                                                                                                <value name="VALUE">
+                                                                                                                  <block type="variables_get" id="/(B3zJewppd~EofXj-kV">
+                                                                                                                    <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal</field>
+                                                                                                                  </block>
+                                                                                                                </value>
+                                                                                                                <value name="AT">
+                                                                                                                  <block type="math_number" id="EqI.1mGPgXG[7av.gZ71">
+                                                                                                                    <field name="NUM">2</field>
+                                                                                                                  </block>
+                                                                                                                </value>
                                                                                                               </block>
                                                                                                             </value>
-                                                                                                            <value name="AT">
-                                                                                                              <block type="math_number" id="EqI.1mGPgXG[7av.gZ71">
-                                                                                                                <field name="NUM">2</field>
+                                                                                                            <value name="ADD3">
+                                                                                                              <block type="variables_get" id="sPxj5C*ZzYUH*$WCe4|q">
+                                                                                                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                              </block>
+                                                                                                            </value>
+                                                                                                            <value name="ADD4">
+                                                                                                              <block type="variables_get" id="~vY0WPr#jWq#SxvDb1@n">
+                                                                                                                <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                              </block>
+                                                                                                            </value>
+                                                                                                            <value name="ADD5">
+                                                                                                              <block type="variables_get" id="r!O8lsSDk:Xs*=-;)LRu">
+                                                                                                                <field name="VAR" id="AnbD2s`i`niJf7bj:WR.">dist_x</field>
+                                                                                                              </block>
+                                                                                                            </value>
+                                                                                                            <value name="ADD6">
+                                                                                                              <block type="variables_get" id="`fG05b:bzq8[q?bquCg6">
+                                                                                                                <field name="VAR" id=";S3?%3)**s[[l~Aq3*,{">v_var_ball_ypos</field>
                                                                                                               </block>
                                                                                                             </value>
                                                                                                           </block>
                                                                                                         </value>
-                                                                                                        <value name="ADD3">
-                                                                                                          <block type="variables_get" id="sPxj5C*ZzYUH*$WCe4|q">
-                                                                                                            <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                        <value name="ADD4">
-                                                                                                          <block type="variables_get" id="~vY0WPr#jWq#SxvDb1@n">
-                                                                                                            <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                        <value name="ADD5">
-                                                                                                          <block type="variables_get" id="r!O8lsSDk:Xs*=-;)LRu">
-                                                                                                            <field name="VAR" id="AnbD2s`i`niJf7bj:WR.">dist_x</field>
-                                                                                                          </block>
-                                                                                                        </value>
-                                                                                                        <value name="ADD6">
-                                                                                                          <block type="variables_get" id="`fG05b:bzq8[q?bquCg6">
-                                                                                                            <field name="VAR" id=";S3?%3)**s[[l~Aq3*,{">speed_y</field>
+                                                                                                        <next>
+                                                                                                          <block type="util_wait_for" id="U4XL;U0gG@tD~]*kp|L{">
+                                                                                                            <field name="format">ms</field>
+                                                                                                            <value name="value">
+                                                                                                              <shadow type="math_number" id="E9K@*OZ(Ftp5CGt}.9cT">
+                                                                                                                <field name="NUM">100</field>
+                                                                                                              </shadow>
+                                                                                                            </value>
                                                                                                           </block>
-                                                                                                        </value>
-                                                                                                      </block>
-                                                                                                    </value>
-                                                                                                    <next>
-                                                                                                      <block type="util_wait_for" id="U4XL;U0gG@tD~]*kp|L{">
-                                                                                                        <field name="format">ms</field>
-                                                                                                        <value name="value">
-                                                                                                          <shadow type="math_number" id="E9K@*OZ(Ftp5CGt}.9cT">
-                                                                                                            <field name="NUM">100</field>
-                                                                                                          </shadow>
-                                                                                                        </value>
+                                                                                                        </next>
                                                                                                       </block>
                                                                                                     </next>
                                                                                                   </block>
@@ -1730,9 +1605,9 @@
                                                                                           </block>
                                                                                         </next>
                                                                                       </block>
-                                                                                    </next>
+                                                                                    </statement>
                                                                                   </block>
-                                                                                </statement>
+                                                                                </next>
                                                                               </block>
                                                                             </next>
                                                                           </block>
@@ -1772,7 +1647,7 @@
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="N2EC5uK:$~0ERXAdK0!y" x="0" y="4739">
+  <block type="procedures_defnoreturn" id="N2EC5uK:$~0ERXAdK0!y" x="0" y="4373">
     <field name="NAME">checkTimeouts</field>
     <statement name="STACK">
       <block type="controls_if" id="o.;j7*F0}TW}ju0E18(_">
@@ -1918,7 +1793,7 @@
       </block>
     </statement>
   </block>
-  <block type="camera_on_ball_detected" id="dgC*A|KHMC_R5S#ZRk}d" x="0" y="5192">
+  <block type="camera_on_ball_detected" id="dgC*A|KHMC_R5S#ZRk}d" x="0" y="4826">
     <field name="instance_name">ball_detector</field>
     <statement name="statement">
       <block type="variables_set" id="=2/,IQfcLO{_5PNd3UK~">
@@ -1962,7 +1837,7 @@
             </value>
             <next>
               <block type="variables_set" id="u1(g([H2n{u3([v#(86P">
-                <field name="VAR" id=";S3?%3)**s[[l~Aq3*,{">speed_y</field>
+                <field name="VAR" id="O=Lc:FQ[]f3iuM/V@.mv">v_var_ball_xpos</field>
                 <value name="VALUE">
                   <block type="math_round" id="@1a3LGvD7H7!({7|NP|)">
                     <field name="OP">ROUND</field>
@@ -1980,7 +1855,7 @@
                                     <field name="OP">ABS</field>
                                     <value name="NUM">
                                       <block type="camera_ball_get_value" id="a=8eO_}zHB/h7ZLNF3#$">
-                                        <field name="dropdown_event">y</field>
+                                        <field name="dropdown_event">x</field>
                                         <value name="instance_name">
                                           <shadow type="camera_detection_event" id="AdddQ)(I{;8D,r9rlmF!"/>
                                         </value>
@@ -1990,7 +1865,7 @@
                                 </value>
                                 <value name="B">
                                   <block type="variables_get" id="}+x]wBVz9=4;PVzNM_cP">
-                                    <field name="VAR" id="S~)Q:X5BHfQZe.ZJfdE)">factor_y</field>
+                                    <field name="VAR" id="L([~[g+MhSG}}P1bZ{oS">factor_x</field>
                                   </block>
                                 </value>
                               </block>
@@ -2017,77 +1892,135 @@
                   </block>
                 </value>
                 <next>
-                  <block type="variables_set" id="{f=3q|ZsTkk%SY=)7#`P">
-                    <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                  <block type="variables_set" id="lwov=oQ7wu.d]coe-BD4">
+                    <field name="VAR" id=";S3?%3)**s[[l~Aq3*,{">v_var_ball_ypos</field>
                     <value name="VALUE">
-                      <block type="camera_ball_get_value" id="uGhnFUdBttwa9y$-,vt*">
-                        <field name="dropdown_event">x</field>
-                        <value name="instance_name">
-                          <shadow type="camera_detection_event" id="!K|TG3hpF$dFXPSjQE2K"/>
+                      <block type="math_round" id="-8cT`P`)}D=d$1Q,We[R">
+                        <field name="OP">ROUND</field>
+                        <field name="DECIMALS">0</field>
+                        <value name="NUM">
+                          <block type="math_constrain" id="ZHX+L;twd_cE3_s;Iti`" inline="false">
+                            <value name="VALUE">
+                              <block type="math_arithmetic" id="_M7S@i4ich6ph)QSmX[u" inline="false">
+                                <field name="OP">ADD</field>
+                                <value name="A">
+                                  <block type="math_arithmetic" id="WRF4p1[aH,?D.XVtDFZD" inline="false">
+                                    <field name="OP">MULTIPLY</field>
+                                    <value name="A">
+                                      <block type="math_single" id=":[Io$cjQk2:3AeQ!8~d|">
+                                        <field name="OP">ABS</field>
+                                        <value name="NUM">
+                                          <block type="camera_ball_get_value" id="`bXwRxj-x,LjuN[)hmp4">
+                                            <field name="dropdown_event">y</field>
+                                            <value name="instance_name">
+                                              <shadow type="camera_detection_event" id="2c#(7[5PUG_dk=K;*vsT"/>
+                                            </value>
+                                          </block>
+                                        </value>
+                                      </block>
+                                    </value>
+                                    <value name="B">
+                                      <block type="variables_get" id="[rROL,Y2oT9:?lBxl?w}">
+                                        <field name="VAR" id="S~)Q:X5BHfQZe.ZJfdE)">factor_y</field>
+                                      </block>
+                                    </value>
+                                  </block>
+                                </value>
+                                <value name="B">
+                                  <block type="variables_get" id="0omW/!]=`:toS_I@Bt}_">
+                                    <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                  </block>
+                                </value>
+                              </block>
+                            </value>
+                            <value name="LOW">
+                              <block type="math_number" id="CD!leC0?O4!@n5nVffU[">
+                                <field name="NUM">0</field>
+                              </block>
+                            </value>
+                            <value name="HIGH">
+                              <block type="math_number" id="x9_?w3PoofJ#.WAv~:)1">
+                                <field name="NUM">512</field>
+                              </block>
+                            </value>
+                          </block>
                         </value>
                       </block>
                     </value>
                     <next>
-                      <block type="variables_set" id="TyZFp8#7;M#A={?.(j#L">
-                        <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                      <block type="variables_set" id="{f=3q|ZsTkk%SY=)7#`P">
+                        <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
                         <value name="VALUE">
-                          <block type="camera_ball_get_value" id=")(Meq=Br4:3d0zr`iC|g">
-                            <field name="dropdown_event">y</field>
+                          <block type="camera_ball_get_value" id="uGhnFUdBttwa9y$-,vt*">
+                            <field name="dropdown_event">x</field>
                             <value name="instance_name">
-                              <shadow type="camera_detection_event" id="a[37]!VADN~!Crqtm3A."/>
+                              <shadow type="camera_detection_event" id="!K|TG3hpF$dFXPSjQE2K"/>
                             </value>
                           </block>
                         </value>
                         <next>
-                          <block type="controls_if" id="H.~sZNdFqbg-l|x*LtxJ">
-                            <value name="IF0">
-                              <block type="logic_boolean" id=",*H;S(mS^E$SEi|I^akI">
-                                <field name="BOOL">FALSE</field>
+                          <block type="variables_set" id="TyZFp8#7;M#A={?.(j#L">
+                            <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                            <value name="VALUE">
+                              <block type="camera_ball_get_value" id=")(Meq=Br4:3d0zr`iC|g">
+                                <field name="dropdown_event">y</field>
+                                <value name="instance_name">
+                                  <shadow type="camera_detection_event" id="a[37]!VADN~!Crqtm3A."/>
+                                </value>
                               </block>
                             </value>
-                            <statement name="DO0">
-                              <block type="text_print" id="BJX)Y@c~/.?haP/7.z2]">
-                                <value name="TEXT">
-                                  <shadow type="text" id="~J2+aH%uDJT(D8FADKKR">
-                                    <field name="TEXT"/>
-                                  </shadow>
-                                  <block type="text_format" id="fte{F@.%K7ohDj=l1(R3">
-                                    <mutation items="4"/>
-                                    <value name="value">
-                                      <shadow type="text" id="l2A3xrw.^!j6.QD:k]?b">
-                                        <field name="TEXT">ball posx:{} posy:{} dist_x:{} speed_y:{}</field>
+                            <next>
+                              <block type="controls_if" id="H.~sZNdFqbg-l|x*LtxJ">
+                                <value name="IF0">
+                                  <block type="logic_boolean" id=",*H;S(mS^E$SEi|I^akI">
+                                    <field name="BOOL">FALSE</field>
+                                  </block>
+                                </value>
+                                <statement name="DO0">
+                                  <block type="text_print" id="BJX)Y@c~/.?haP/7.z2]">
+                                    <value name="TEXT">
+                                      <shadow type="text" id="~J2+aH%uDJT(D8FADKKR">
+                                        <field name="TEXT"/>
                                       </shadow>
-                                    </value>
-                                    <value name="ADD0">
-                                      <block type="camera_ball_get_value" id="3FY5_MtPbRbYe*vw-Z;:">
-                                        <field name="dropdown_event">x</field>
-                                        <value name="instance_name">
-                                          <shadow type="camera_detection_event" id="RT_#~Jk|2e/8P--T7hO}"/>
+                                      <block type="text_format" id="fte{F@.%K7ohDj=l1(R3">
+                                        <mutation items="4"/>
+                                        <value name="value">
+                                          <shadow type="text" id="l2A3xrw.^!j6.QD:k]?b">
+                                            <field name="TEXT">ball posx:{} posy:{} dist_x:{} speed_y:{}</field>
+                                          </shadow>
                                         </value>
-                                      </block>
-                                    </value>
-                                    <value name="ADD1">
-                                      <block type="camera_ball_get_value" id="GD)}7I6X3@2).B0XA(Cp">
-                                        <field name="dropdown_event">y</field>
-                                        <value name="instance_name">
-                                          <shadow type="camera_detection_event" id="g}rfN`jqBda2sqH}dwl}"/>
+                                        <value name="ADD0">
+                                          <block type="camera_ball_get_value" id="3FY5_MtPbRbYe*vw-Z;:">
+                                            <field name="dropdown_event">x</field>
+                                            <value name="instance_name">
+                                              <shadow type="camera_detection_event" id="RT_#~Jk|2e/8P--T7hO}"/>
+                                            </value>
+                                          </block>
+                                        </value>
+                                        <value name="ADD1">
+                                          <block type="camera_ball_get_value" id="GD)}7I6X3@2).B0XA(Cp">
+                                            <field name="dropdown_event">y</field>
+                                            <value name="instance_name">
+                                              <shadow type="camera_detection_event" id="g}rfN`jqBda2sqH}dwl}"/>
+                                            </value>
+                                          </block>
+                                        </value>
+                                        <value name="ADD2">
+                                          <block type="variables_get" id="yhW7j_H)=SS)hjSg~G|d">
+                                            <field name="VAR" id="AnbD2s`i`niJf7bj:WR.">dist_x</field>
+                                          </block>
+                                        </value>
+                                        <value name="ADD3">
+                                          <block type="variables_get" id="lD6;*mn|mX!,^4V=D13M">
+                                            <field name="VAR" id=";S3?%3)**s[[l~Aq3*,{">v_var_ball_ypos</field>
+                                          </block>
                                         </value>
-                                      </block>
-                                    </value>
-                                    <value name="ADD2">
-                                      <block type="variables_get" id="yhW7j_H)=SS)hjSg~G|d">
-                                        <field name="VAR" id="AnbD2s`i`niJf7bj:WR.">dist_x</field>
-                                      </block>
-                                    </value>
-                                    <value name="ADD3">
-                                      <block type="variables_get" id="lD6;*mn|mX!,^4V=D13M">
-                                        <field name="VAR" id=";S3?%3)**s[[l~Aq3*,{">speed_y</field>
                                       </block>
                                     </value>
                                   </block>
-                                </value>
+                                </statement>
                               </block>
-                            </statement>
+                            </next>
                           </block>
                         </next>
                       </block>
@@ -2101,7 +2034,7 @@
       </block>
     </statement>
   </block>
-  <block type="camera_on_ball_detected" id="Rg2Gt(0WT:J2|Us~[j.3" x="0" y="5795">
+  <block type="camera_on_ball_detected" id="Rg2Gt(0WT:J2|Us~[j.3" x="0" y="5579">
     <field name="instance_name">ball_detector_goal_left</field>
     <statement name="statement">
       <block type="variables_set" id="kvK,D4e%04[?+!jq*Lch">
@@ -2181,7 +2114,7 @@
       </block>
     </statement>
   </block>
-  <block type="camera_on_ball_detected" id="(?slhGsN^:d1`vP{j9#|" x="0" y="6098">
+  <block type="camera_on_ball_detected" id="(?slhGsN^:d1`vP{j9#|" x="0" y="5882">
     <field name="instance_name">ball_detector_goal_right</field>
     <statement name="statement">
       <block type="variables_set" id="0!1?#@4|tcM8+U6E[$Tl">
@@ -2261,7 +2194,199 @@
       </block>
     </statement>
   </block>
-  <block type="input_event" id="j(TuhJ0G}{^qGSq:26FY" x="0" y="6401">
+  <block type="counter_event" id="T^aHOKaV|bU#ZeZfn[GJ" x="0" y="6185">
+    <value name="condition">
+      <shadow type="counter_if_value" id="9`P*eh,|:Wnytp?G[|;{">
+        <field name="instance_name">TXT_M_C1_motor_step_counter</field>
+        <field name="compare_operation">&gt;=</field>
+        <value name="value">
+          <shadow type="math_number" id="5Xl(_Jtmh*kkjV@06sU4">
+            <field name="NUM">0</field>
+          </shadow>
+        </value>
+      </shadow>
+    </value>
+    <statement name="statement">
+      <block type="lists_setIndex" id="+*/p)biB@:ZE)7i/D*eN">
+        <mutation at="true"/>
+        <field name="MODE">SET</field>
+        <field name="WHERE">FROM_START</field>
+        <value name="LIST">
+          <block type="variables_get" id="tm1$ukIcJ0D!/GLak4Ut">
+            <field name="VAR" id="5@U(%o_ghQ1;jiB#odH8">counters</field>
+          </block>
+        </value>
+        <value name="AT">
+          <block type="math_number" id="HUZdEA9c!MBYE/=;9c4,">
+            <field name="NUM">1</field>
+          </block>
+        </value>
+        <value name="TO">
+          <block type="counter_get_value" id="HJ8AeDsgADK_]_Zx:(rx">
+            <field name="instance_name">TXT_M_C1_motor_step_counter</field>
+          </block>
+        </value>
+        <next>
+          <block type="display_set_label_text" id="U]A5v^]#*i_{o(=_~m#9">
+            <field name="instance_name">txt_label_counters</field>
+            <value name="value">
+              <shadow type="text" id=":[wX!6o2X57KB5_uW$?g">
+                <field name="TEXT">abc</field>
+              </shadow>
+              <block type="variables_get" id="jk2Cakj:3K*LVEx9fO#9">
+                <field name="VAR" id="5@U(%o_ghQ1;jiB#odH8">counters</field>
+              </block>
+            </value>
+          </block>
+        </next>
+      </block>
+    </statement>
+  </block>
+  <block type="counter_event" id="7wA~J+BkZ5~nV6aI|fLZ" x="0" y="6332">
+    <value name="condition">
+      <shadow type="counter_if_value" id="RDF|2PoXWvG^_k{FB37U">
+        <field name="instance_name">TXT_M_C2_motor_step_counter</field>
+        <field name="compare_operation">&gt;=</field>
+        <value name="value">
+          <shadow type="math_number" id="}v;NEU2I-b+XB;eJb_8^">
+            <field name="NUM">0</field>
+          </shadow>
+        </value>
+      </shadow>
+    </value>
+    <statement name="statement">
+      <block type="lists_setIndex" id="F3O6H[o7DeuMc4EYIlK7">
+        <mutation at="true"/>
+        <field name="MODE">SET</field>
+        <field name="WHERE">FROM_START</field>
+        <value name="LIST">
+          <block type="variables_get" id="SrzEHb)xO0~tZ_L;;:*6">
+            <field name="VAR" id="5@U(%o_ghQ1;jiB#odH8">counters</field>
+          </block>
+        </value>
+        <value name="AT">
+          <block type="math_number" id="t/d4)oJyn4/xDN_H+Gc$">
+            <field name="NUM">2</field>
+          </block>
+        </value>
+        <value name="TO">
+          <block type="counter_get_value" id="TyyeB9r=L2Axv9:)!99P">
+            <field name="instance_name">TXT_M_C2_motor_step_counter</field>
+          </block>
+        </value>
+        <next>
+          <block type="display_set_label_text" id="^$c%DR+x0]1{?8B+._e[">
+            <field name="instance_name">txt_label_counters</field>
+            <value name="value">
+              <shadow type="text">
+                <field name="TEXT">abc</field>
+              </shadow>
+              <block type="variables_get" id="yxoB?]I`o1i,GZZxsT99">
+                <field name="VAR" id="5@U(%o_ghQ1;jiB#odH8">counters</field>
+              </block>
+            </value>
+          </block>
+        </next>
+      </block>
+    </statement>
+  </block>
+  <block type="counter_event" id="Nv;e.HwUkTK/=(qEs~82" x="0" y="6479">
+    <value name="condition">
+      <shadow type="counter_if_value" id="05ihu;VYh*tmqA78pJQL">
+        <field name="instance_name">TXT_M_C3_motor_step_counter</field>
+        <field name="compare_operation">&gt;=</field>
+        <value name="value">
+          <shadow type="math_number" id="wad2)m_Xkx5}`^R4pZJf">
+            <field name="NUM">0</field>
+          </shadow>
+        </value>
+      </shadow>
+    </value>
+    <statement name="statement">
+      <block type="lists_setIndex" id="SbWu+L,iw0_ij(;+FMEt">
+        <mutation at="true"/>
+        <field name="MODE">SET</field>
+        <field name="WHERE">FROM_START</field>
+        <value name="LIST">
+          <block type="variables_get" id="r*vZ!`+v(7UQG]?uJ`H~">
+            <field name="VAR" id="5@U(%o_ghQ1;jiB#odH8">counters</field>
+          </block>
+        </value>
+        <value name="AT">
+          <block type="math_number" id="iU9Ld7bh=+wGqLS.r-WO">
+            <field name="NUM">3</field>
+          </block>
+        </value>
+        <value name="TO">
+          <block type="counter_get_value" id="gT;9PeIm8kcUEZ@,M]y#">
+            <field name="instance_name">TXT_M_C3_motor_step_counter</field>
+          </block>
+        </value>
+        <next>
+          <block type="display_set_label_text" id="39cs2hab8c0]XI,eCzQT">
+            <field name="instance_name">txt_label_counters</field>
+            <value name="value">
+              <shadow type="text">
+                <field name="TEXT">abc</field>
+              </shadow>
+              <block type="variables_get" id="e8uqOpay*)3CoYXGpAcZ">
+                <field name="VAR" id="5@U(%o_ghQ1;jiB#odH8">counters</field>
+              </block>
+            </value>
+          </block>
+        </next>
+      </block>
+    </statement>
+  </block>
+  <block type="counter_event" id="j|Pz^uHewb7]si9}3az3" x="0" y="6626">
+    <value name="condition">
+      <shadow type="counter_if_value" id="N9]b*Kn_Nxk}[I9e!^Z.">
+        <field name="instance_name">TXT_M_C4_motor_step_counter</field>
+        <field name="compare_operation">&gt;=</field>
+        <value name="value">
+          <shadow type="math_number" id="tuFr25CcTXx3l$!b){%{">
+            <field name="NUM">0</field>
+          </shadow>
+        </value>
+      </shadow>
+    </value>
+    <statement name="statement">
+      <block type="lists_setIndex" id="eb6^}]rpfB@?MRu8-g}K">
+        <mutation at="true"/>
+        <field name="MODE">SET</field>
+        <field name="WHERE">FROM_START</field>
+        <value name="LIST">
+          <block type="variables_get" id="rl=7;!=vM{2]GEWoJ~ws">
+            <field name="VAR" id="5@U(%o_ghQ1;jiB#odH8">counters</field>
+          </block>
+        </value>
+        <value name="AT">
+          <block type="math_number" id="2)wsT9dj3mq=ai?m!eD5">
+            <field name="NUM">4</field>
+          </block>
+        </value>
+        <value name="TO">
+          <block type="counter_get_value" id="*sHixWWo*TJ-^N9/}Hh#">
+            <field name="instance_name">TXT_M_C4_motor_step_counter</field>
+          </block>
+        </value>
+        <next>
+          <block type="display_set_label_text" id="{=2n9bd|c|$3;uM@}m~B">
+            <field name="instance_name">txt_label_counters</field>
+            <value name="value">
+              <shadow type="text">
+                <field name="TEXT">abc</field>
+              </shadow>
+              <block type="variables_get" id="}~Ru`N3Z!CY/K,tcV{N$">
+                <field name="VAR" id="5@U(%o_ghQ1;jiB#odH8">counters</field>
+              </block>
+            </value>
+          </block>
+        </next>
+      </block>
+    </statement>
+  </block>
+  <block type="input_event" id="j(TuhJ0G}{^qGSq:26FY" x="0" y="6773">
     <value name="condition">
       <block type="input_photo_transistor_if_state" id="dX]-jf`=2/tNnEnHfKvx">
         <field name="instance_name">TXT_M_I8_photo_transistor</field>
@@ -2284,7 +2409,7 @@
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="RyK*td9aN5aR;@gw4f)+" collapsed="true" x="0" y="6538">
+  <block type="procedures_defnoreturn" id="RyK*td9aN5aR;@gw4f)+" collapsed="true" x="0" y="6910">
     <field name="NAME">shotBall</field>
     <statement name="STACK">
       <block type="servomotor_set_position" id="9C*rGH2+bsy8H4Xzz#gk">
@@ -2398,7 +2523,7 @@
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="+FKt%DE[[q%Zp0T.Fn}d" collapsed="true" x="0" y="6605">
+  <block type="procedures_defnoreturn" id="+FKt%DE[[q%Zp0T.Fn}d" collapsed="true" x="0" y="6977">
     <field name="NAME">stop</field>
     <statement name="STACK">
       <block type="encodermotor_stop" id="}]1#.xeDc*.k9aGX5P?4">
@@ -2410,7 +2535,7 @@
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="/pGK)WReTLfX`L_7oAMD" collapsed="true" x="0" y="6672">
+  <block type="procedures_defnoreturn" id="/pGK)WReTLfX`L_7oAMD" x="0" y="7044">
     <mutation>
       <arg name="v" varid="DfDz@$]?^P=(6r:%^xC*" argid="{M*n_!I)eN0.4..0Bzo#"/>
     </mutation>
@@ -2435,10 +2560,19 @@
             <field name="VAR" id="DfDz@$]?^P=(6r:%^xC*">v</field>
           </block>
         </value>
+        <next>
+          <block type="text_print" id="Jqo/.TFo--ru@,tx{!Q.">
+            <value name="TEXT">
+              <shadow type="text" id="rAokm(cf}=y_BMu%W5k=">
+                <field name="TEXT">fwd</field>
+              </shadow>
+            </value>
+          </block>
+        </next>
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="qX~e_RBh^tj];fOb=cq6" collapsed="true" x="0" y="6739">
+  <block type="procedures_defnoreturn" id="qX~e_RBh^tj];fOb=cq6" x="0" y="7293">
     <mutation>
       <arg name="v" varid="DfDz@$]?^P=(6r:%^xC*" argid="{M*n_!I)eN0.4..0Bzo#"/>
     </mutation>
@@ -2463,10 +2597,19 @@
             <field name="VAR" id="DfDz@$]?^P=(6r:%^xC*">v</field>
           </block>
         </value>
+        <next>
+          <block type="text_print" id="D2d~Hp;Jlb7#MaresYw0">
+            <value name="TEXT">
+              <shadow type="text" id="=W}FcdDcT6{+Y3$kjQ=?">
+                <field name="TEXT">bwd</field>
+              </shadow>
+            </value>
+          </block>
+        </next>
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="!zD7YDZ.5n?En8cYle4R" collapsed="true" x="0" y="6806">
+  <block type="procedures_defnoreturn" id="!zD7YDZ.5n?En8cYle4R" x="0" y="7542">
     <mutation>
       <arg name="v" varid="DfDz@$]?^P=(6r:%^xC*" argid=",q%qjDTJ~Z@[BoMwORuq"/>
     </mutation>
@@ -2491,10 +2634,19 @@
             <field name="VAR" id="DfDz@$]?^P=(6r:%^xC*">v</field>
           </block>
         </value>
+        <next>
+          <block type="text_print" id="RrSmtF]e9ree4{^+fY!I">
+            <value name="TEXT">
+              <shadow type="text" id="[SUX^1hN]oaBQw8IAmoL">
+                <field name="TEXT">left</field>
+              </shadow>
+            </value>
+          </block>
+        </next>
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="}KXL0=RKLgCT~yQ];aw:" collapsed="true" x="0" y="6873">
+  <block type="procedures_defnoreturn" id="}KXL0=RKLgCT~yQ];aw:" x="0" y="7791">
     <mutation>
       <arg name="v" varid="DfDz@$]?^P=(6r:%^xC*" argid=",q%qjDTJ~Z@[BoMwORuq"/>
     </mutation>
@@ -2519,10 +2671,105 @@
             <field name="VAR" id="DfDz@$]?^P=(6r:%^xC*">v</field>
           </block>
         </value>
+        <next>
+          <block type="text_print" id="e[d[4KXka]Md=`?_uuLL">
+            <value name="TEXT">
+              <shadow type="text" id="T4bM;!0fS+0pCd{a-O[g">
+                <field name="TEXT">right</field>
+              </shadow>
+            </value>
+          </block>
+        </next>
+      </block>
+    </statement>
+  </block>
+  <block type="procedures_defnoreturn" id="UFM0X7|X:*ja#f+^7kz;" x="0" y="8040">
+    <field name="NAME">turnBallLeft</field>
+    <statement name="STACK">
+      <block type="encodermotor_set_speed" id="I[S{vjf1EdjHVhk32Irr">
+        <mutation syncBlocks="1"/>
+        <field name="instance_name_0">TXT_M_M1_encodermotor</field>
+        <field name="direction_0">Motor.CW</field>
+        <field name="instance_name_1">TXT_M_M2_encodermotor</field>
+        <field name="direction_1">Motor.CCW</field>
+        <value name="speed">
+          <shadow type="motor_number" id="KbM1XwSZ`0p4OfObK%2d">
+            <field name="MOTOR_NUM">0</field>
+          </shadow>
+        </value>
+        <next>
+          <block type="encodermotor_set_speed" id="?-}PDl2[=K?(SrBgJg-U">
+            <mutation syncBlocks="1"/>
+            <field name="instance_name_0">TXT_M_M3_encodermotor</field>
+            <field name="direction_0">Motor.CW</field>
+            <field name="instance_name_1">TXT_M_M4_encodermotor</field>
+            <field name="direction_1">Motor.CCW</field>
+            <value name="speed">
+              <shadow type="motor_number" id="=efoF`lj-~A7g]Ka]qr.">
+                <field name="MOTOR_NUM">512</field>
+              </shadow>
+              <block type="variables_get" id="Oj^O^)OdFOvbsTw`%^dM">
+                <field name="VAR" id="O=Lc:FQ[]f3iuM/V@.mv">v_var_ball_xpos</field>
+              </block>
+            </value>
+            <next>
+              <block type="text_print" id="5IBCFbH]V/gIWh:B3!5Y">
+                <value name="TEXT">
+                  <shadow type="text" id="GaS,I)E|S%roIN*FN4L%">
+                    <field name="TEXT">turnBallLeft</field>
+                  </shadow>
+                </value>
+              </block>
+            </next>
+          </block>
+        </next>
+      </block>
+    </statement>
+  </block>
+  <block type="procedures_defnoreturn" id="*i[s2YTWD*g9HS4dxkPq" x="0" y="8261">
+    <field name="NAME">turnBallRight</field>
+    <statement name="STACK">
+      <block type="encodermotor_set_speed" id="c8~SXys:o35ETKj;GX?m">
+        <mutation syncBlocks="1"/>
+        <field name="instance_name_0">TXT_M_M1_encodermotor</field>
+        <field name="direction_0">Motor.CCW</field>
+        <field name="instance_name_1">TXT_M_M2_encodermotor</field>
+        <field name="direction_1">Motor.CW</field>
+        <value name="speed">
+          <shadow type="motor_number" id="dD.1u9Pwx-^rnKZyWQx/">
+            <field name="MOTOR_NUM">0</field>
+          </shadow>
+        </value>
+        <next>
+          <block type="encodermotor_set_speed" id="b:w42I;ulm2~l(S-#ER(">
+            <mutation syncBlocks="1"/>
+            <field name="instance_name_0">TXT_M_M3_encodermotor</field>
+            <field name="direction_0">Motor.CCW</field>
+            <field name="instance_name_1">TXT_M_M4_encodermotor</field>
+            <field name="direction_1">Motor.CW</field>
+            <value name="speed">
+              <shadow type="motor_number" id=";zG8,Fnh@=jNAT#Br68/">
+                <field name="MOTOR_NUM">512</field>
+              </shadow>
+              <block type="variables_get" id="pyJ,6!X~/k?JFRr+Yg{E">
+                <field name="VAR" id="O=Lc:FQ[]f3iuM/V@.mv">v_var_ball_xpos</field>
+              </block>
+            </value>
+            <next>
+              <block type="text_print" id="MhojqF%*dZtJ^Xgaks}J">
+                <value name="TEXT">
+                  <shadow type="text" id="Dk#/M-2Ba^~JbxtI-@FD">
+                    <field name="TEXT">turnBallRight</field>
+                  </shadow>
+                </value>
+              </block>
+            </next>
+          </block>
+        </next>
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="dhS+rZWE[`RZz:fU3A)e" collapsed="true" x="0" y="6940">
+  <block type="procedures_defnoreturn" id="dhS+rZWE[`RZz:fU3A)e" collapsed="true" x="0" y="8482">
     <mutation>
       <arg name="v" varid="DfDz@$]?^P=(6r:%^xC*" argid=",q%qjDTJ~Z@[BoMwORuq"/>
     </mutation>
@@ -2550,7 +2797,7 @@
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id=")G33?J{l2sdl+nL3hpBp" collapsed="true" x="0" y="7007">
+  <block type="procedures_defnoreturn" id=")G33?J{l2sdl+nL3hpBp" collapsed="true" x="0" y="8549">
     <mutation>
       <arg name="v" varid="DfDz@$]?^P=(6r:%^xC*" argid=",q%qjDTJ~Z@[BoMwORuq"/>
     </mutation>
@@ -2578,7 +2825,7 @@
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="oSa9Ly*^-c^M{$gkMZt1" collapsed="true" x="0" y="7074">
+  <block type="procedures_defnoreturn" id="oSa9Ly*^-c^M{$gkMZt1" collapsed="true" x="0" y="8616">
     <mutation>
       <arg name="v" varid="DfDz@$]?^P=(6r:%^xC*" argid="K)Z,8|d5@gck+Q]pnW01"/>
       <arg name="ticks" varid="l9lR0!)Laya}3RYVW(ZQ" argid="(Id`t]O(jxfZJay}20X{"/>
@@ -2644,7 +2891,7 @@
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="G@]xamrhDPW$7uQ6oPo#" collapsed="true" x="0" y="7141">
+  <block type="procedures_defnoreturn" id="G@]xamrhDPW$7uQ6oPo#" collapsed="true" x="0" y="8683">
     <mutation>
       <arg name="v" varid="DfDz@$]?^P=(6r:%^xC*" argid="_mFFsmoZwL{(llRvf-eW"/>
       <arg name="ticks" varid="l9lR0!)Laya}3RYVW(ZQ" argid="aNHXtqe[T`=Y[mqp`ZDN"/>
@@ -2710,7 +2957,7 @@
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="5Hv=PFtVvPQA=IZrkJfU" collapsed="true" x="0" y="7208">
+  <block type="procedures_defnoreturn" id="5Hv=PFtVvPQA=IZrkJfU" collapsed="true" x="0" y="8750">
     <mutation>
       <arg name="v" varid="DfDz@$]?^P=(6r:%^xC*" argid="~d8Z+AHZ!wz|G]JHW0lQ"/>
       <arg name="ticks" varid="l9lR0!)Laya}3RYVW(ZQ" argid="jRMx@L,Ya|zd@/bBb#1T"/>
@@ -2776,7 +3023,7 @@
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="[S@[MO!Z/cNt:Jsg4dd}" collapsed="true" x="0" y="7275">
+  <block type="procedures_defnoreturn" id="[S@[MO!Z/cNt:Jsg4dd}" collapsed="true" x="0" y="8817">
     <mutation>
       <arg name="v" varid="DfDz@$]?^P=(6r:%^xC*" argid="8Z2n_ZVA.)85]V7j%3;7"/>
       <arg name="ticks" varid="l9lR0!)Laya}3RYVW(ZQ" argid="J(gJ~*9ZJJa,[V1)[xn#"/>
@@ -2842,66 +3089,4 @@
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="UFM0X7|X:*ja#f+^7kz;" x="0" y="7342">
-    <field name="NAME">turnBallLeft</field>
-    <statement name="STACK">
-      <block type="encodermotor_set_speed" id="I[S{vjf1EdjHVhk32Irr">
-        <mutation syncBlocks="1"/>
-        <field name="instance_name_0">TXT_M_M1_encodermotor</field>
-        <field name="direction_0">Motor.CW</field>
-        <field name="instance_name_1">TXT_M_M2_encodermotor</field>
-        <field name="direction_1">Motor.CCW</field>
-        <value name="speed">
-          <shadow type="motor_number" id="KbM1XwSZ`0p4OfObK%2d">
-            <field name="MOTOR_NUM">200</field>
-          </shadow>
-        </value>
-        <next>
-          <block type="encodermotor_set_speed" id="?-}PDl2[=K?(SrBgJg-U">
-            <mutation syncBlocks="1"/>
-            <field name="instance_name_0">TXT_M_M3_encodermotor</field>
-            <field name="direction_0">Motor.CW</field>
-            <field name="instance_name_1">TXT_M_M4_encodermotor</field>
-            <field name="direction_1">Motor.CCW</field>
-            <value name="speed">
-              <shadow type="motor_number" id="=efoF`lj-~A7g]Ka]qr.">
-                <field name="MOTOR_NUM">512</field>
-              </shadow>
-            </value>
-          </block>
-        </next>
-      </block>
-    </statement>
-  </block>
-  <block type="procedures_defnoreturn" id="*i[s2YTWD*g9HS4dxkPq" x="0" y="7535">
-    <field name="NAME">turnBallRight</field>
-    <statement name="STACK">
-      <block type="encodermotor_set_speed" id="c8~SXys:o35ETKj;GX?m">
-        <mutation syncBlocks="1"/>
-        <field name="instance_name_0">TXT_M_M1_encodermotor</field>
-        <field name="direction_0">Motor.CCW</field>
-        <field name="instance_name_1">TXT_M_M2_encodermotor</field>
-        <field name="direction_1">Motor.CW</field>
-        <value name="speed">
-          <shadow type="motor_number" id="dD.1u9Pwx-^rnKZyWQx/">
-            <field name="MOTOR_NUM">200</field>
-          </shadow>
-        </value>
-        <next>
-          <block type="encodermotor_set_speed" id="b:w42I;ulm2~l(S-#ER(">
-            <mutation syncBlocks="1"/>
-            <field name="instance_name_0">TXT_M_M3_encodermotor</field>
-            <field name="direction_0">Motor.CCW</field>
-            <field name="instance_name_1">TXT_M_M4_encodermotor</field>
-            <field name="direction_1">Motor.CW</field>
-            <value name="speed">
-              <shadow type="motor_number" id=";zG8,Fnh@=jNAT#Br68/">
-                <field name="MOTOR_NUM">512</field>
-              </shadow>
-            </value>
-          </block>
-        </next>
-      </block>
-    </statement>
-  </block>
 </xml>
\ No newline at end of file
diff --git a/omniwheels_x4_soccer_goal.py b/omniwheels_x4_soccer_goal.py
index a8ac996..75bf23f 100644
--- a/omniwheels_x4_soccer_goal.py
+++ b/omniwheels_x4_soccer_goal.py
@@ -16,11 +16,13 @@ ts_goal_right = None
 factor_y = None
 posx_ball = None
 dist_x = None
+counters = None
 x_min = None
 posy_ball = None
-speed_y = None
+v_var_ball_xpos = None
 posx_goal = None
 x_max = None
+v_var_ball_ypos = None
 y_ball_far = None
 y_ball_near = None
 y_ball_touch = None
@@ -28,7 +30,7 @@ v_slow = None
 v_fast = None
 state = None
 def checkTimeouts():
-    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, x_min, posy_ball, speed_y, posx_goal, x_max, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
     if (time.time() * 1000) - ts_ball > 500:
         posx_ball = None
         posy_ball = None
@@ -40,20 +42,21 @@ def checkTimeouts():
 
 
 def ball_callback(event):
-    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, x_min, posy_ball, speed_y, posx_goal, x_max, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
     ts_ball = (time.time() * 1000)
     dist_x = round(math.fabs(event.value.x) * factor_x)
-    speed_y = round(min(max(math.fabs(event.value.y) * factor_y + v_slow, 0), 512))
+    v_var_ball_xpos = round(min(max(math.fabs(event.value.x) * factor_x + v_slow, 0), 512))
+    v_var_ball_ypos = round(min(max(math.fabs(event.value.y) * factor_y + v_slow, 0), 512))
     posx_ball = event.value.x
     posy_ball = event.value.y
     if False:
-        print('ball posx:{} posy:{} dist_x:{} speed_y:{}'.format(event.value.x, event.value.y, dist_x, speed_y))
+        print('ball posx:{} posy:{} dist_x:{} speed_y:{}'.format(event.value.x, event.value.y, dist_x, v_var_ball_ypos))
 
 ball_detector.add_detection_listener(ball_callback)
 
 
 def ball_callback2(event):
-    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, x_min, posy_ball, speed_y, posx_goal, x_max, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
     ts_goal_left = (time.time() * 1000)
     posx_goal[0] = event.value.x
     if False:
@@ -63,7 +66,7 @@ ball_detector_goal_left.add_detection_listener(ball_callback2)
 
 
 def ball_callback23(event):
-    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, x_min, posy_ball, speed_y, posx_goal, x_max, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
     ts_goal_right = (time.time() * 1000)
     posx_goal[1] = event.value.x
     if False:
@@ -73,17 +76,57 @@ ball_detector_goal_right.add_detection_listener(ball_callback23)
 
 
 def callback(event):
-    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, x_min, posy_ball, speed_y, posx_goal, x_max, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    if TXT_M_C1_motor_step_counter.get_count() >= 0:
+        counters[0] = TXT_M_C1_motor_step_counter.get_count()
+        display.set_attr("txt_label_counters.text", str(counters))
+
+
+TXT_M_C1_motor_step_counter.add_change_listener("count", callback)
+
+
+def callback2(event):
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    if TXT_M_C2_motor_step_counter.get_count() >= 0:
+        counters[1] = TXT_M_C2_motor_step_counter.get_count()
+        display.set_attr("txt_label_counters.text", str(counters))
+
+
+TXT_M_C2_motor_step_counter.add_change_listener("count", callback2)
+
+
+def callback3(event):
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    if TXT_M_C3_motor_step_counter.get_count() >= 0:
+        counters[2] = TXT_M_C3_motor_step_counter.get_count()
+        display.set_attr("txt_label_counters.text", str(counters))
+
+
+TXT_M_C3_motor_step_counter.add_change_listener("count", callback3)
+
+
+def callback4(event):
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    if TXT_M_C4_motor_step_counter.get_count() >= 0:
+        counters[3] = TXT_M_C4_motor_step_counter.get_count()
+        display.set_attr("txt_label_counters.text", str(counters))
+
+
+TXT_M_C4_motor_step_counter.add_change_listener("count", callback4)
+
+
+def callback5(event):
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
     if TXT_M_I8_photo_transistor.is_dark():
         shotBall()
         time.sleep(5)
 
 
-TXT_M_I8_photo_transistor.add_change_listener("dark", callback)
+TXT_M_I8_photo_transistor.add_change_listener("dark", callback5)
 
 
 def shotBall():
-    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, x_min, posy_ball, speed_y, posx_goal, x_max, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
     TXT_M_S1_servomotor.set_position(int(400))
     TXT_M_M1_encodermotor.set_speed(int(512), Motor.CCW)
     TXT_M_M2_encodermotor.set_speed(int(512), Motor.CCW)
@@ -113,48 +156,74 @@ def shotBall():
 
 
 def stop():
-    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, x_min, posy_ball, speed_y, posx_goal, x_max, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
     TXT_M_M1_encodermotor.stop_sync(TXT_M_M2_encodermotor, TXT_M_M3_encodermotor, TXT_M_M4_encodermotor)
 
 
 def fwd_v(v):
-    global ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, x_min, posy_ball, speed_y, posx_goal, x_max, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    global ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
     TXT_M_M1_encodermotor.set_speed(int(v), Motor.CCW)
     TXT_M_M2_encodermotor.set_speed(int(v), Motor.CCW)
     TXT_M_M3_encodermotor.set_speed(int(v), Motor.CCW)
     TXT_M_M4_encodermotor.set_speed(int(v), Motor.CCW)
     TXT_M_M1_encodermotor.start_sync(TXT_M_M2_encodermotor, TXT_M_M3_encodermotor, TXT_M_M4_encodermotor)
+    print('fwd')
 
 
 def bwd_v(v):
-    global ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, x_min, posy_ball, speed_y, posx_goal, x_max, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    global ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
     TXT_M_M1_encodermotor.set_speed(int(v), Motor.CW)
     TXT_M_M2_encodermotor.set_speed(int(v), Motor.CW)
     TXT_M_M3_encodermotor.set_speed(int(v), Motor.CW)
     TXT_M_M4_encodermotor.set_speed(int(v), Motor.CW)
     TXT_M_M1_encodermotor.start_sync(TXT_M_M2_encodermotor, TXT_M_M3_encodermotor, TXT_M_M4_encodermotor)
+    print('bwd')
 
 
 def left_v(v):
-    global ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, x_min, posy_ball, speed_y, posx_goal, x_max, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    global ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
     TXT_M_M1_encodermotor.set_speed(int(v), Motor.CCW)
     TXT_M_M2_encodermotor.set_speed(int(v), Motor.CW)
     TXT_M_M3_encodermotor.set_speed(int(v), Motor.CCW)
     TXT_M_M4_encodermotor.set_speed(int(v), Motor.CW)
     TXT_M_M1_encodermotor.start_sync(TXT_M_M2_encodermotor, TXT_M_M3_encodermotor, TXT_M_M4_encodermotor)
+    print('left')
 
 
 def right_v(v):
-    global ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, x_min, posy_ball, speed_y, posx_goal, x_max, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    global ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
     TXT_M_M1_encodermotor.set_speed(int(v), Motor.CW)
     TXT_M_M2_encodermotor.set_speed(int(v), Motor.CCW)
     TXT_M_M3_encodermotor.set_speed(int(v), Motor.CW)
     TXT_M_M4_encodermotor.set_speed(int(v), Motor.CCW)
     TXT_M_M1_encodermotor.start_sync(TXT_M_M2_encodermotor, TXT_M_M3_encodermotor, TXT_M_M4_encodermotor)
+    print('right')
+
+
+def turnBallLeft():
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    TXT_M_M1_encodermotor.set_speed(int(0), Motor.CW)
+    TXT_M_M2_encodermotor.set_speed(int(0), Motor.CCW)
+    TXT_M_M1_encodermotor.start_sync(TXT_M_M2_encodermotor)
+    TXT_M_M3_encodermotor.set_speed(int(v_var_ball_xpos), Motor.CW)
+    TXT_M_M4_encodermotor.set_speed(int(v_var_ball_xpos), Motor.CCW)
+    TXT_M_M3_encodermotor.start_sync(TXT_M_M4_encodermotor)
+    print('turnBallLeft')
+
+
+def turnBallRight():
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    TXT_M_M1_encodermotor.set_speed(int(0), Motor.CCW)
+    TXT_M_M2_encodermotor.set_speed(int(0), Motor.CW)
+    TXT_M_M1_encodermotor.start_sync(TXT_M_M2_encodermotor)
+    TXT_M_M3_encodermotor.set_speed(int(v_var_ball_xpos), Motor.CCW)
+    TXT_M_M4_encodermotor.set_speed(int(v_var_ball_xpos), Motor.CW)
+    TXT_M_M3_encodermotor.start_sync(TXT_M_M4_encodermotor)
+    print('turnBallRight')
 
 
 def sideleft_v(v):
-    global ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, x_min, posy_ball, speed_y, posx_goal, x_max, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    global ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
     TXT_M_M1_encodermotor.set_speed(int(v), Motor.CCW)
     TXT_M_M2_encodermotor.set_speed(int(v), Motor.CW)
     TXT_M_M3_encodermotor.set_speed(int(v), Motor.CW)
@@ -163,7 +232,7 @@ def sideleft_v(v):
 
 
 def sideright_v(v):
-    global ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, x_min, posy_ball, speed_y, posx_goal, x_max, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    global ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
     TXT_M_M1_encodermotor.set_speed(int(v), Motor.CW)
     TXT_M_M2_encodermotor.set_speed(int(v), Motor.CCW)
     TXT_M_M3_encodermotor.set_speed(int(v), Motor.CCW)
@@ -172,7 +241,7 @@ def sideright_v(v):
 
 
 def fwd(v, ticks):
-    global factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, x_min, posy_ball, speed_y, posx_goal, x_max, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    global factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
     if ticks > 0:
         TXT_M_M1_encodermotor.set_speed(int(v), Motor.CCW)
         TXT_M_M2_encodermotor.set_speed(int(v), Motor.CCW)
@@ -186,7 +255,7 @@ def fwd(v, ticks):
 
 
 def bwd(v, ticks):
-    global factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, x_min, posy_ball, speed_y, posx_goal, x_max, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    global factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
     if ticks > 0:
         TXT_M_M1_encodermotor.set_speed(int(v), Motor.CW)
         TXT_M_M2_encodermotor.set_speed(int(v), Motor.CW)
@@ -200,7 +269,7 @@ def bwd(v, ticks):
 
 
 def left(v, ticks):
-    global factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, x_min, posy_ball, speed_y, posx_goal, x_max, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    global factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
     if ticks > 0:
         TXT_M_M1_encodermotor.set_speed(int(v), Motor.CCW)
         TXT_M_M2_encodermotor.set_speed(int(v), Motor.CW)
@@ -214,7 +283,7 @@ def left(v, ticks):
 
 
 def right(v, ticks):
-    global factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, x_min, posy_ball, speed_y, posx_goal, x_max, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
+    global factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, counters, x_min, posy_ball, v_var_ball_xpos, posx_goal, x_max, v_var_ball_ypos, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
     if ticks > 0:
         TXT_M_M1_encodermotor.set_speed(int(v), Motor.CW)
         TXT_M_M2_encodermotor.set_speed(int(v), Motor.CCW)
@@ -227,36 +296,17 @@ def right(v, ticks):
             time.sleep(0.010)
 
 
-def turnBallLeft():
-    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, x_min, posy_ball, speed_y, posx_goal, x_max, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
-    TXT_M_M1_encodermotor.set_speed(int(200), Motor.CW)
-    TXT_M_M2_encodermotor.set_speed(int(200), Motor.CCW)
-    TXT_M_M1_encodermotor.start_sync(TXT_M_M2_encodermotor)
-    TXT_M_M3_encodermotor.set_speed(int(512), Motor.CW)
-    TXT_M_M4_encodermotor.set_speed(int(512), Motor.CCW)
-    TXT_M_M3_encodermotor.start_sync(TXT_M_M4_encodermotor)
-
-
-def turnBallRight():
-    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, factor_y, posx_ball, dist_x, x_min, posy_ball, speed_y, posx_goal, x_max, y_ball_far, y_ball_near, y_ball_touch, v_slow, v_fast, state
-    TXT_M_M1_encodermotor.set_speed(int(200), Motor.CCW)
-    TXT_M_M2_encodermotor.set_speed(int(200), Motor.CW)
-    TXT_M_M1_encodermotor.start_sync(TXT_M_M2_encodermotor)
-    TXT_M_M3_encodermotor.set_speed(int(512), Motor.CCW)
-    TXT_M_M4_encodermotor.set_speed(int(512), Motor.CW)
-    TXT_M_M3_encodermotor.start_sync(TXT_M_M4_encodermotor)
-
-
 factor_x = 0.2
 factor_y = 3.5
 x_min = -20
 x_max = 20
 y_ball_far = -5
-y_ball_near = 60
+y_ball_near = 45
 y_ball_touch = 74
 v_slow = 200
 v_fast = 512
-speed_y = 512
+v_var_ball_xpos = 512
+v_var_ball_ypos = 512
 posx_goal = [None, None]
 posx_ball = None
 posy_ball = None
@@ -271,17 +321,15 @@ while True:
         if posx_ball != None and posy_ball != None and posx_goal[0] == None and posx_goal[1] == None:
             state = 'ONLY_BALL'
             if posx_ball < x_min:
-                left_v(v_slow)
+                left_v(v_var_ball_xpos)
             elif posx_ball > x_max:
-                right_v(v_slow)
+                right_v(v_var_ball_xpos)
             else:
                 if posy_ball <= y_ball_far:
                     fwd_v(v_slow)
                 elif posy_ball <= y_ball_near:
-                    print('turn')
                     turnBallLeft()
                 elif posy_ball <= y_ball_touch:
-                    print('touch')
                     bwd_v(v_slow)
                 else:
                     stop()
@@ -291,9 +339,9 @@ while True:
                 fwd_v(v_slow)
             elif posy_ball <= y_ball_near:
                 if posx_goal[0] < posx_ball:
-                    turnBallLeft()
-                elif posx_goal[0] > posx_ball:
                     turnBallRight()
+                elif posx_goal[0] > posx_ball:
+                    turnBallLeft()
                 else:
                     stop()
             elif posy_ball <= y_ball_touch:
@@ -317,38 +365,30 @@ while True:
                 stop()
         elif posx_ball != None and posy_ball != None and posx_goal[0] != None and posx_goal[1] != None:
             state = 'BALL_AND_GOAL_BOTH'
-            if posx_ball > posx_goal[0] and posx_ball < posx_goal[1]:
+            if posy_ball <= y_ball_far:
                 fwd_v(v_slow)
-            elif posx_ball < posx_goal[0] and posx_ball < posx_goal[1]:
-                turnBallRight()
-            elif posx_ball > posx_goal[0] and posx_ball > posx_goal[1]:
-                turnBallLeft()
+            elif posy_ball <= y_ball_near:
+                if posx_ball > posx_goal[0] and posx_ball < posx_goal[1]:
+                    fwd_v(v_slow)
+                elif posx_ball < posx_goal[0] and posx_ball < posx_goal[1]:
+                    turnBallLeft()
+                elif posx_ball > posx_goal[0] and posx_ball > posx_goal[1]:
+                    turnBallRight()
+                else:
+                    stop()
+            elif posy_ball <= y_ball_touch:
+                bwd_v(v_slow)
             else:
                 stop()
         elif (posx_ball == None or posy_ball == None) and (posx_goal[0] != None or posx_goal[1] != None):
             state = 'NO_BALL'
             left_v(v_slow)
-        elif False:
-            if posx_goal[0] < x_min:
-                sideleft_v(180)
-            elif posx_goal[0] > x_max:
-                sideright_v(180)
-            elif posx_ball < x_min:
-                left(v_slow, dist_x)
-            elif posx_ball > x_max:
-                right(v_slow, dist_x)
-            else:
-                if posy_ball >= y_ball_far:
-                    fwd_v(v_fast)
-                elif posy_ball < y_ball_touch:
-                    fwd_v(speed_y)
-                else:
-                    pass
         else:
-            pass
+            state = 'NONE'
+            stop()
     display.set_attr("txt_label_ball.text", str('x:{}, y:{}'.format(posx_ball, posy_ball)))
     display.set_attr("txt_label_goal.text", str('x:{}'.format(posx_goal)))
-    print('{}:  GOAL_x: {}, {} BALL_pos:{},{} dist_x:{} speed_y:{}'.format(state, posx_goal[0], posx_goal[1], posx_ball, posy_ball, dist_x, speed_y))
+    print('{}:  GOAL_x: {}, {} BALL_pos:{},{} dist_x:{} speed_y:{}'.format(state, posx_goal[0], posx_goal[1], posx_ball, posy_ball, dist_x, v_var_ball_ypos))
     time.sleep(0.1)
 
 
-- 
GitLab