From 13fdd3c3e382fd0d5d253be0bd6143bcd3df750d Mon Sep 17 00:00:00 2001
From: ft-Demo <fischertechnik-team@fischer.de>
Date: Mon, 25 Oct 2021 14:45:26 +0000
Subject: [PATCH] commit by robo pro coding

---
 lib/camera.py                     |    2 +-
 lib/camera.xml                    |    2 +-
 omniwheels_x4_soccer_goal.blockly | 3602 +++++++++++------------------
 omniwheels_x4_soccer_goal.py      |  296 +--
 4 files changed, 1484 insertions(+), 2418 deletions(-)

diff --git a/lib/camera.py b/lib/camera.py
index 3cae971..cfb1329 100644
--- a/lib/camera.py
+++ b/lib/camera.py
@@ -20,6 +20,6 @@ TXT_M_USB_1_camera.add_blocked_area(blocked_area_left)
 ball_detector_goal_right = txt_factory.camera_factory.create_ball_detector(0, 70, 320, 120, 10, 120, -100, 100, [183,137,26], 20)
 TXT_M_USB_1_camera.add_detector(ball_detector_goal_right)
 
-ball_detector_goal_left = txt_factory.camera_factory.create_ball_detector(0, 70, 320, 120, 10, 120, -100, 100, [90,156,81], 20)
+ball_detector_goal_left = txt_factory.camera_factory.create_ball_detector(0, 70, 320, 120, 10, 120, -100, 100, [65,138,31], 20)
 TXT_M_USB_1_camera.add_detector(ball_detector_goal_left)
 
diff --git a/lib/camera.xml b/lib/camera.xml
index ea3a1b0..df11a08 100644
--- a/lib/camera.xml
+++ b/lib/camera.xml
@@ -1 +1 @@
-<xml type="camera" verion="1" version="2" rotate="0" height="240" width="320" fps="15"><item id="2" class="BallDetector"><name>ball_detector</name><color>#ff863e</color><tolerance>20</tolerance><min_ball_diameter>5</min_ball_diameter><max_ball_diameter>80</max_ball_diameter><start_range_value>-100</start_range_value><end_range_value>100</end_range_value><geometry><x>0</x><y>0</y><width>320</width><height>240</height></geometry></item><item id="4" class="BlockedArea"><name>blocked_area_right</name><geometry><x>240</x><y>190</y><width>80</width><height>50</height></geometry></item><item id="5" class="BlockedArea"><name>blocked_area_left</name><geometry><x>0</x><y>190</y><width>80</width><height>50</height></geometry></item><item id="12" class="BallDetector"><name>ball_detector_goal_right</name><color>#b7891a</color><tolerance>20</tolerance><min_ball_diameter>10</min_ball_diameter><max_ball_diameter>120</max_ball_diameter><start_range_value>-100</start_range_value><end_range_value>100</end_range_value><geometry><x>0</x><y>70</y><width>320</width><height>120</height></geometry></item><item id="11" class="BallDetector"><name>ball_detector_goal_left</name><color>#5a9c51</color><tolerance>20</tolerance><min_ball_diameter>10</min_ball_diameter><max_ball_diameter>120</max_ball_diameter><start_range_value>-100</start_range_value><end_range_value>100</end_range_value><geometry><x>0</x><y>70</y><width>320</width><height>120</height></geometry></item></xml>
\ No newline at end of file
+<xml type="camera" verion="1" version="2" rotate="0" height="240" width="320" fps="15"><item id="2" class="BallDetector"><name>ball_detector</name><color>#ff863e</color><tolerance>20</tolerance><min_ball_diameter>5</min_ball_diameter><max_ball_diameter>80</max_ball_diameter><start_range_value>-100</start_range_value><end_range_value>100</end_range_value><geometry><x>0</x><y>0</y><width>320</width><height>240</height></geometry></item><item id="4" class="BlockedArea"><name>blocked_area_right</name><geometry><x>240</x><y>190</y><width>80</width><height>50</height></geometry></item><item id="5" class="BlockedArea"><name>blocked_area_left</name><geometry><x>0</x><y>190</y><width>80</width><height>50</height></geometry></item><item id="12" class="BallDetector"><name>ball_detector_goal_right</name><color>#b7891a</color><tolerance>20</tolerance><min_ball_diameter>10</min_ball_diameter><max_ball_diameter>120</max_ball_diameter><start_range_value>-100</start_range_value><end_range_value>100</end_range_value><geometry><x>0</x><y>70</y><width>320</width><height>120</height></geometry></item><item id="11" class="BallDetector"><name>ball_detector_goal_left</name><color>#418a1f</color><tolerance>20</tolerance><min_ball_diameter>10</min_ball_diameter><max_ball_diameter>120</max_ball_diameter><start_range_value>-100</start_range_value><end_range_value>100</end_range_value><geometry><x>0</x><y>70</y><width>320</width><height>120</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 e90ced3..e8624ed 100644
--- a/omniwheels_x4_soccer_goal.blockly
+++ b/omniwheels_x4_soccer_goal.blockly
@@ -7,6 +7,7 @@
     <variable id=";Ki:[qYaZnowqSa`]/aW">ts_goal_left</variable>
     <variable id="z^z{Ev+IMfS6[W1raY;l">ts_goal_right</variable>
     <variable id="fPH`.@]riH+=v{,A)bP5">cmd</variable>
+    <variable id="vH;^OzJY7dOdepMScU1s">state</variable>
     <variable id="S~)Q:X5BHfQZe.ZJfdE)">factor_y</variable>
     <variable id="S4.mduNQC(va3iR{oSdB">posx_ball</variable>
     <variable id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</variable>
@@ -14,18 +15,19 @@
     <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="2Lkg^#Z.uZy(%Nr[26)6">search_dir_left</variable>
+    <variable id="a8;eFhj+gj?)7exUyU;p">posy_goal_left</variable>
+    <variable id="+j/X+RCIMajR28(u#7DG">posy_goal_right</variable>
     <variable id="2G]XEQ3Lhl$dG]=:]8Ge">x_max</variable>
     <variable id="O=Lc:FQ[]f3iuM/V@.mv">v_var_ball_xpos</variable>
     <variable id=")rK_fR,m=]b(j[{.CtBj">v_slow</variable>
     <variable id="}*jl@)UA_Hjh5rc,Gt)c">y_ball_far</variable>
     <variable id=";S3?%3)**s[[l~Aq3*,{">v_var_ball_ypos</variable>
-    <variable id="09n]XF2CKURQs)nHOfam">y_ball_near</variable>
-    <variable id="xjf5O*w9;IZf$n55ytVF">y_ball_touch</variable>
     <variable id="1idj3sw*{G$j`2:II{^5">v_fast</variable>
+    <variable id="xjf5O*w9;IZf$n55ytVF">y_ball_touch</variable>
+    <variable id="09n]XF2CKURQs)nHOfam">y_ball_near</variable>
     <variable id="v0BvP7[91TGaMpQG$r0f">goal_width</variable>
-    <variable id="{]]L-TSC^#XtGnVinxf[">pos_goal_both</variable>
-    <variable id="vH;^OzJY7dOdepMScU1s">state</variable>
+    <variable id="{]]L-TSC^#XtGnVinxf[">posx_goal_both</variable>
+    <variable id="2Lkg^#Z.uZy(%Nr[26)6">search_dir_left</variable>
   </variables>
   <block type="start_block" id="1n38UCidqR*}g6g]e[!h" deletable="false" x="0" y="0">
     <statement name="statement">
@@ -49,7 +51,7 @@
                 <field name="VAR" id="Ym/+Qo0YZe25;%N1d!*f">x_min</field>
                 <value name="VALUE">
                   <block type="math_number" id="@Esp)^vGnSXO=QsK)N9~">
-                    <field name="NUM">-5</field>
+                    <field name="NUM">-10</field>
                   </block>
                 </value>
                 <next>
@@ -57,7 +59,7 @@
                     <field name="VAR" id="2G]XEQ3Lhl$dG]=:]8Ge">x_max</field>
                     <value name="VALUE">
                       <block type="math_number" id="[r2m=DpI#8/tg+.FmdbN">
-                        <field name="NUM">5</field>
+                        <field name="NUM">10</field>
                       </block>
                     </value>
                     <next>
@@ -73,7 +75,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">50</field>
+                                <field name="NUM">45</field>
                               </block>
                             </value>
                             <next>
@@ -123,1546 +125,887 @@
                                                       <block type="logic_null" id="I%tVa0ny05XAmaVV:F.b"/>
                                                     </value>
                                                     <next>
-                                                      <block type="variables_set" id="n)6l%*YnRKjZP=Vg]ZPE">
-                                                        <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
+                                                      <block type="variables_set" id="-M-d.T-X:2g;isApzuD+">
+                                                        <field name="VAR" id="a8;eFhj+gj?)7exUyU;p">posy_goal_left</field>
                                                         <value name="VALUE">
-                                                          <block type="logic_null" id="tTUjF[IPbEc/z,usjG(@"/>
+                                                          <block type="logic_null" id="c}3O#:Um-PLXZL^v#w%y"/>
                                                         </value>
                                                         <next>
-                                                          <block type="variables_set" id="siEn)/PP4ow+$+;v/3DX">
-                                                            <field name="VAR" id="v0BvP7[91TGaMpQG$r0f">goal_width</field>
+                                                          <block type="variables_set" id="n)6l%*YnRKjZP=Vg]ZPE">
+                                                            <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
                                                             <value name="VALUE">
-                                                              <block type="math_number" id="NQ:~;QX9f2Xsrr91{7//">
-                                                                <field name="NUM">0</field>
-                                                              </block>
+                                                              <block type="logic_null" id="tTUjF[IPbEc/z,usjG(@"/>
                                                             </value>
                                                             <next>
-                                                              <block type="variables_set" id="hc)5l^82a8Q6o[fFnE0c">
-                                                                <field name="VAR" id="{]]L-TSC^#XtGnVinxf[">pos_goal_both</field>
+                                                              <block type="variables_set" id="(Tu-{WB-8!?(o%J4NDU3">
+                                                                <field name="VAR" id="+j/X+RCIMajR28(u#7DG">posy_goal_right</field>
                                                                 <value name="VALUE">
-                                                                  <block type="math_number" id="~Ueydi[Pm-G]oO2Y*H_~">
-                                                                    <field name="NUM">0</field>
-                                                                  </block>
+                                                                  <block type="logic_null" id="bt0pLp@kbR:4E:mBRjkJ"/>
                                                                 </value>
                                                                 <next>
-                                                                  <block type="variables_set" id="^^;w:J4Fa?h,#*%To;{+">
-                                                                    <field name="VAR" id="5@U(%o_ghQ1;jiB#odH8">counters</field>
+                                                                  <block type="variables_set" id="siEn)/PP4ow+$+;v/3DX">
+                                                                    <field name="VAR" id="v0BvP7[91TGaMpQG$r0f">goal_width</field>
                                                                     <value name="VALUE">
-                                                                      <block type="lists_create_with" id="1k[v{tojVArtdZ^%5v;1">
-                                                                        <mutation items="4"/>
-                                                                        <value name="ADD0">
-                                                                          <block type="counter_get_value" id="GohWJgM]B+R*n;%2J2t[">
-                                                                            <field name="instance_name">TXT_M_C1_motor_step_counter</field>
-                                                                          </block>
-                                                                        </value>
-                                                                        <value name="ADD1">
-                                                                          <block type="counter_get_value" id="Bb1N_HOP|)`|I9^$Ctm?">
-                                                                            <field name="instance_name">TXT_M_C2_motor_step_counter</field>
-                                                                          </block>
-                                                                        </value>
-                                                                        <value name="ADD2">
-                                                                          <block type="counter_get_value" id="ugC,Ex(62_HcLx`w;(}s">
-                                                                            <field name="instance_name">TXT_M_C3_motor_step_counter</field>
-                                                                          </block>
-                                                                        </value>
-                                                                        <value name="ADD3">
-                                                                          <block type="counter_get_value" id="0({ry;ZO6]g*8c(EP^h$">
-                                                                            <field name="instance_name">TXT_M_C4_motor_step_counter</field>
-                                                                          </block>
-                                                                        </value>
+                                                                      <block type="math_number" id="NQ:~;QX9f2Xsrr91{7//">
+                                                                        <field name="NUM">0</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="hc)5l^82a8Q6o[fFnE0c">
+                                                                        <field name="VAR" id="{]]L-TSC^#XtGnVinxf[">posx_goal_both</field>
                                                                         <value name="VALUE">
-                                                                          <block type="logic_null" id="^h(n6DKLT?~XLRAo4CRP"/>
+                                                                          <block type="math_number" id="~Ueydi[Pm-G]oO2Y*H_~">
+                                                                            <field name="NUM">0</field>
+                                                                          </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="^^;w:J4Fa?h,#*%To;{+">
+                                                                            <field name="VAR" id="5@U(%o_ghQ1;jiB#odH8">counters</field>
                                                                             <value name="VALUE">
-                                                                              <block type="logic_null" id="~`*jJ8l2,?]ICIb*0btf"/>
+                                                                              <block type="lists_create_with" id="1k[v{tojVArtdZ^%5v;1">
+                                                                                <mutation items="4"/>
+                                                                                <value name="ADD0">
+                                                                                  <block type="counter_get_value" id="GohWJgM]B+R*n;%2J2t[">
+                                                                                    <field name="instance_name">TXT_M_C1_motor_step_counter</field>
+                                                                                  </block>
+                                                                                </value>
+                                                                                <value name="ADD1">
+                                                                                  <block type="counter_get_value" id="Bb1N_HOP|)`|I9^$Ctm?">
+                                                                                    <field name="instance_name">TXT_M_C2_motor_step_counter</field>
+                                                                                  </block>
+                                                                                </value>
+                                                                                <value name="ADD2">
+                                                                                  <block type="counter_get_value" id="ugC,Ex(62_HcLx`w;(}s">
+                                                                                    <field name="instance_name">TXT_M_C3_motor_step_counter</field>
+                                                                                  </block>
+                                                                                </value>
+                                                                                <value name="ADD3">
+                                                                                  <block type="counter_get_value" id="0({ry;ZO6]g*8c(EP^h$">
+                                                                                    <field name="instance_name">TXT_M_C4_motor_step_counter</field>
+                                                                                  </block>
+                                                                                </value>
+                                                                              </block>
                                                                             </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="PY^XT?g46JMYP[0)HO!l">
+                                                                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_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="^h(n6DKLT?~XLRAo4CRP"/>
                                                                                 </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="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="GONAj}Dx[0?0CBm%nsU6">
-                                                                                        <field name="TIME">MILLISECOND</field>
-                                                                                      </block>
+                                                                                      <block type="logic_null" id="~`*jJ8l2,?]ICIb*0btf"/>
                                                                                     </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="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="iQYX(E[,RbI0z8A#M9o%">
+                                                                                          <block type="util_runtime_measurement" id="O!p9@+{cCQ5ov3?1cB9F">
                                                                                             <field name="TIME">MILLISECOND</field>
                                                                                           </block>
                                                                                         </value>
                                                                                         <next>
-                                                                                          <block type="variables_set" id="KM.MX+]F}x6_^($zaJ42">
-                                                                                            <field name="VAR" id="2Lkg^#Z.uZy(%Nr[26)6">search_dir_left</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="logic_boolean" id="G[2Hre!^[YHSfA#^`k;H">
-                                                                                                <field name="BOOL">TRUE</field>
+                                                                                              <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="variables_set" id="!eP!#y!o25=Kc{0p7GDs">
-                                                                                                    <field name="VAR" id="fPH`.@]riH+=v{,A)bP5">cmd</field>
+                                                                                                  <block type="variables_set" id="KM.MX+]F}x6_^($zaJ42">
+                                                                                                    <field name="VAR" id="2Lkg^#Z.uZy(%Nr[26)6">search_dir_left</field>
                                                                                                     <value name="VALUE">
-                                                                                                      <block type="text" id="vc4C]$ok!Yk@_eIUD8L)">
-                                                                                                        <field name="TEXT">NONE</field>
+                                                                                                      <block type="logic_boolean" id="G[2Hre!^[YHSfA#^`k;H">
+                                                                                                        <field name="BOOL">TRUE</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="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>
+                                                                                                          <block type="variables_set" id="!eP!#y!o25=Kc{0p7GDs">
+                                                                                                            <field name="VAR" id="fPH`.@]riH+=v{,A)bP5">cmd</field>
+                                                                                                            <value name="VALUE">
+                                                                                                              <block type="text" id="vc4C]$ok!Yk@_eIUD8L)">
+                                                                                                                <field name="TEXT">NONE</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>
                                                                                                                 </value>
-                                                                                                                <statement name="DO0">
-                                                                                                                  <block type="controls_if" id="MN`F(]itK#DR^wQxXz,.">
-                                                                                                                    <mutation elseif="6" 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_operation" id="~/u3*G]LZK9pvIFTV#^q" 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>
-                                                                                                                                <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="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="variables_get" id="GddxTJE,O^,fb~pxb3(b">
-                                                                                                                                    <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
-                                                                                                                                  </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>
-                                                                                                                                <value name="A">
-                                                                                                                                  <block type="variables_get" id="I@,t{sciNOi(fg$?r)#f">
-                                                                                                                                    <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
-                                                                                                                                  </block>
-                                                                                                                                </value>
-                                                                                                                                <value name="B">
-                                                                                                                                  <block type="logic_null" id="woPk%eJHq,DN-n%_Z+nD"/>
-                                                                                                                                </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">BALL_NO_GOAL</field>
+                                                                                                                <next>
+                                                                                                                  <block type="loop_endless" id="V,Gw25li,3_,;92QCQLj">
+                                                                                                                    <statement name="DO">
+                                                                                                                      <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>
-                                                                                                                        <next>
-                                                                                                                          <block type="controls_if" id="+oz+[YfRRkvCLn10-B4d">
-                                                                                                                            <mutation elseif="2" else="1"/>
+                                                                                                                        <statement name="DO0">
+                                                                                                                          <block type="controls_if" id="aHn#xa9*3UPMZUu37%KD">
+                                                                                                                            <mutation elseif="0" else="1"/>
                                                                                                                             <value name="IF0">
-                                                                                                                              <block type="logic_operation" id="^asrJKsemc}^7|@CcyFs" inline="false">
+                                                                                                                              <block type="logic_operation" id="~/u3*G]LZK9pvIFTV#^q" inline="false">
                                                                                                                                 <field name="OP">AND</field>
                                                                                                                                 <value name="A">
-                                                                                                                                  <block type="logic_compare" id="TwsU8jOZc$*pZ+:EbKo8">
-                                                                                                                                    <field name="OP">GTE</field>
+                                                                                                                                  <block type="logic_compare" id="D%l9OSY`vM-xzaB}nY1r">
+                                                                                                                                    <field name="OP">NEQ</field>
                                                                                                                                     <value name="A">
-                                                                                                                                      <block type="variables_get" id="0Ipt`Bjn]B09@rni:!Bt">
+                                                                                                                                      <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="variables_get" id="Y{MczN`(?*Y74i0iF|bh">
-                                                                                                                                        <field name="VAR" id="Ym/+Qo0YZe25;%N1d!*f">x_min</field>
-                                                                                                                                      </block>
+                                                                                                                                      <block type="logic_null" id="UJ,gxhveD7#?I9I*:A(r"/>
                                                                                                                                     </value>
                                                                                                                                   </block>
                                                                                                                                 </value>
                                                                                                                                 <value name="B">
-                                                                                                                                  <block type="logic_compare" id="s:+dT(r%}]H#_Y~wHeTE">
-                                                                                                                                    <field name="OP">LTE</field>
+                                                                                                                                  <block type="logic_compare" id="Nd,4OywJ0ocibay-klwh">
+                                                                                                                                    <field name="OP">NEQ</field>
                                                                                                                                     <value name="A">
-                                                                                                                                      <block type="variables_get" id="mW,P#kP}6gH1+ZmkJ/L8">
-                                                                                                                                        <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                                                      <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="B">
-                                                                                                                                      <block type="variables_get" id="8:8~qf8*mh3[Jhzmk^A%">
-                                                                                                                                        <field name="VAR" id="2G]XEQ3Lhl$dG]=:]8Ge">x_max</field>
-                                                                                                                                      </block>
+                                                                                                                                      <block type="logic_null" id="z0gO+`Su.;sXQ(oI,(y^"/>
                                                                                                                                     </value>
                                                                                                                                   </block>
                                                                                                                                 </value>
                                                                                                                               </block>
                                                                                                                             </value>
                                                                                                                             <statement name="DO0">
-                                                                                                                              <block type="controls_if" id="Bp.|BTULdy(,]aAoN,l[">
-                                                                                                                                <mutation elseif="3" else="1"/>
+                                                                                                                              <block type="controls_if" id=".azto3k]W3z}%MWyt~-e">
+                                                                                                                                <mutation elseif="2" else="1"/>
                                                                                                                                 <value name="IF0">
-                                                                                                                                  <block type="logic_compare" id="Y-Fctm`Flpx7MN)@x%-u">
-                                                                                                                                    <field name="OP">LTE</field>
+                                                                                                                                  <block type="logic_operation" id="n+p!xL0Cy:ManlHugN9b" inline="false">
+                                                                                                                                    <field name="OP">AND</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="logic_compare" id="Vs3%xCaz|qN@}C*=Tq3$">
+                                                                                                                                        <field name="OP">NEQ</field>
+                                                                                                                                        <value name="A">
+                                                                                                                                          <block type="variables_get" id="GddxTJE,O^,fb~pxb3(b">
+                                                                                                                                            <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
+                                                                                                                                          </block>
+                                                                                                                                        </value>
+                                                                                                                                        <value name="B">
+                                                                                                                                          <block type="logic_null" id="zdJr-qt**l*{;JppUgmP"/>
+                                                                                                                                        </value>
                                                                                                                                       </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="logic_compare" id="1IfAVQZEPrL6SRY?6A28">
+                                                                                                                                        <field name="OP">NEQ</field>
+                                                                                                                                        <value name="A">
+                                                                                                                                          <block type="variables_get" id="I@,t{sciNOi(fg$?r)#f">
+                                                                                                                                            <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
+                                                                                                                                          </block>
+                                                                                                                                        </value>
+                                                                                                                                        <value name="B">
+                                                                                                                                          <block type="logic_null" id="woPk%eJHq,DN-n%_Z+nD"/>
+                                                                                                                                        </value>
                                                                                                                                       </block>
                                                                                                                                     </value>
                                                                                                                                   </block>
                                                                                                                                 </value>
                                                                                                                                 <statement name="DO0">
-                                                                                                                                  <block type="procedures_callnoreturn" id="D$_8aQ2X|h{SIewjUD_R">
-                                                                                                                                    <mutation name="fwd">
-                                                                                                                                      <arg name="v"/>
-                                                                                                                                      <arg name="ticks"/>
-                                                                                                                                    </mutation>
-                                                                                                                                    <value name="ARG0">
-                                                                                                                                      <block type="variables_get" id="Y]2FiJdrWo42L$WHl,($">
-                                                                                                                                        <field name="VAR" id="1idj3sw*{G$j`2:II{^5">v_fast</field>
+                                                                                                                                  <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_GOAL_BOTH</field>
                                                                                                                                       </block>
                                                                                                                                     </value>
-                                                                                                                                    <value name="ARG1">
-                                                                                                                                      <block type="math_number" id="K``m#vm=PeC;2HJxr=Jx">
-                                                                                                                                        <field name="NUM">10</field>
+                                                                                                                                    <next>
+                                                                                                                                      <block type="controls_if" id="*lBS$ZT#Ys7,}]I-O@k^">
+                                                                                                                                        <mutation elseif="0" else="1"/>
+                                                                                                                                        <value name="IF0">
+                                                                                                                                          <block type="logic_operation" id="F*6cCZOW)ukbgn9K8?SO" inline="false">
+                                                                                                                                            <field name="OP">OR</field>
+                                                                                                                                            <value name="A">
+                                                                                                                                              <block type="logic_compare" id="gQMo_h|S:{G:nr]1=UW4">
+                                                                                                                                                <field name="OP">LTE</field>
+                                                                                                                                                <value name="A">
+                                                                                                                                                  <block type="variables_get" id="@8MLRa^g0hU[CeMJ#Wdh">
+                                                                                                                                                    <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                                                                  </block>
+                                                                                                                                                </value>
+                                                                                                                                                <value name="B">
+                                                                                                                                                  <block type="variables_get" id=",-pErfLng]qD$?z[[Fs7">
+                                                                                                                                                    <field name="VAR" id="a8;eFhj+gj?)7exUyU;p">posy_goal_left</field>
+                                                                                                                                                  </block>
+                                                                                                                                                </value>
+                                                                                                                                              </block>
+                                                                                                                                            </value>
+                                                                                                                                            <value name="B">
+                                                                                                                                              <block type="logic_compare" id="KqQ*Wu/:9}*:Cv5}e9ql">
+                                                                                                                                                <field name="OP">LTE</field>
+                                                                                                                                                <value name="A">
+                                                                                                                                                  <block type="variables_get" id="sLP@4jf@Rmdfg+aDCR]T">
+                                                                                                                                                    <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                                                                  </block>
+                                                                                                                                                </value>
+                                                                                                                                                <value name="B">
+                                                                                                                                                  <block type="variables_get" id="r56n`}OQ/*+nk-rCW$m.">
+                                                                                                                                                    <field name="VAR" id="+j/X+RCIMajR28(u#7DG">posy_goal_right</field>
+                                                                                                                                                  </block>
+                                                                                                                                                </value>
+                                                                                                                                              </block>
+                                                                                                                                            </value>
+                                                                                                                                          </block>
+                                                                                                                                        </value>
+                                                                                                                                        <statement name="DO0">
+                                                                                                                                          <block type="procedures_callnoreturn" id="yaFH%EQx@BB~q4Cb%;Qe">
+                                                                                                                                            <mutation name="soundGoal"/>
+                                                                                                                                          </block>
+                                                                                                                                        </statement>
+                                                                                                                                        <statement name="ELSE">
+                                                                                                                                          <block type="controls_if" id="?*]pJ{$BWYb7XOmWoq=}">
+                                                                                                                                            <mutation elseif="2"/>
+                                                                                                                                            <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="variables_get" id="2.y#4B,;Y:6:KX.dWY!e">
+                                                                                                                                                        <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
+                                                                                                                                                      </block>
+                                                                                                                                                    </value>
+                                                                                                                                                  </block>
+                                                                                                                                                </value>
+                                                                                                                                                <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="variables_get" id="ru(1|is|xmE}.]MuY*xT">
+                                                                                                                                                        <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
+                                                                                                                                                      </block>
+                                                                                                                                                    </value>
+                                                                                                                                                  </block>
+                                                                                                                                                </value>
+                                                                                                                                              </block>
+                                                                                                                                            </value>
+                                                                                                                                            <statement name="DO0">
+                                                                                                                                              <block type="procedures_callnoreturn" id="90_K~]2igif9F@eo$.5Z">
+                                                                                                                                                <mutation name="stepBall"/>
+                                                                                                                                              </block>
+                                                                                                                                            </statement>
+                                                                                                                                            <value name="IF1">
+                                                                                                                                              <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="variables_get" id="lpS.y*[{cEi1+0~K+1A0">
+                                                                                                                                                    <field name="VAR" id="{]]L-TSC^#XtGnVinxf[">posx_goal_both</field>
+                                                                                                                                                  </block>
+                                                                                                                                                </value>
+                                                                                                                                              </block>
+                                                                                                                                            </value>
+                                                                                                                                            <statement name="DO1">
+                                                                                                                                              <block type="procedures_callnoreturn" id="R590b9iY$aQ~B7!m8f2l">
+                                                                                                                                                <mutation name="turnSideRight">
+                                                                                                                                                  <arg name="v"/>
+                                                                                                                                                  <arg name="ticks"/>
+                                                                                                                                                </mutation>
+                                                                                                                                                <value name="ARG0">
+                                                                                                                                                  <block type="variables_get" id="vk%)2O)R9Ft/FMn)2yr7">
+                                                                                                                                                    <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                                                                                                                                  </block>
+                                                                                                                                                </value>
+                                                                                                                                                <value name="ARG1">
+                                                                                                                                                  <block type="math_number" id="N.3ER1#5:PMk;ocu-#q(">
+                                                                                                                                                    <field name="NUM">20</field>
+                                                                                                                                                  </block>
+                                                                                                                                                </value>
+                                                                                                                                              </block>
+                                                                                                                                            </statement>
+                                                                                                                                            <value name="IF2">
+                                                                                                                                              <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="variables_get" id="6=]nXa6@Nlp}dkXwpg6@">
+                                                                                                                                                    <field name="VAR" id="{]]L-TSC^#XtGnVinxf[">posx_goal_both</field>
+                                                                                                                                                  </block>
+                                                                                                                                                </value>
+                                                                                                                                              </block>
+                                                                                                                                            </value>
+                                                                                                                                            <statement name="DO2">
+                                                                                                                                              <block type="procedures_callnoreturn" id="@n*^wewk`x?NX#m2}EQE">
+                                                                                                                                                <mutation name="turnSideLeft">
+                                                                                                                                                  <arg name="v"/>
+                                                                                                                                                  <arg name="ticks"/>
+                                                                                                                                                </mutation>
+                                                                                                                                                <value name="ARG0">
+                                                                                                                                                  <block type="variables_get" id="+m}1a:ZW]JoRW2QP.n06">
+                                                                                                                                                    <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                                                                                                                                  </block>
+                                                                                                                                                </value>
+                                                                                                                                                <value name="ARG1">
+                                                                                                                                                  <block type="math_number" id="_;2gj%#h1g[wnD|7oXuo">
+                                                                                                                                                    <field name="NUM">20</field>
+                                                                                                                                                  </block>
+                                                                                                                                                </value>
+                                                                                                                                              </block>
+                                                                                                                                            </statement>
+                                                                                                                                          </block>
+                                                                                                                                        </statement>
                                                                                                                                       </block>
-                                                                                                                                    </value>
+                                                                                                                                    </next>
                                                                                                                                   </block>
                                                                                                                                 </statement>
                                                                                                                                 <value name="IF1">
-                                                                                                                                  <block type="logic_operation" id=".cYqj,XlTza-:6y_=EOC" inline="false">
+                                                                                                                                  <block type="logic_operation" id="(jJONR?QSU;KGYM!9ymz" inline="false">
                                                                                                                                     <field name="OP">AND</field>
                                                                                                                                     <value name="A">
-                                                                                                                                      <block type="logic_compare" id="#%BG`,J51l+POEj{Q4Vj">
-                                                                                                                                        <field name="OP">GT</field>
+                                                                                                                                      <block type="logic_compare" id="`8=+-9%Pb7y~05?n%:.-">
+                                                                                                                                        <field name="OP">NEQ</field>
                                                                                                                                         <value name="A">
-                                                                                                                                          <block type="variables_get" id="KDP(VY1Jh?W1cz~WWh=,">
-                                                                                                                                            <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                                                          <block type="variables_get" id="yho-]F]PY=,)SpSbQPwP">
+                                                                                                                                            <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
                                                                                                                                           </block>
                                                                                                                                         </value>
                                                                                                                                         <value name="B">
-                                                                                                                                          <block type="variables_get" id="L/RedQ[=!jNwBI,ivSt/">
-                                                                                                                                            <field name="VAR" id="}*jl@)UA_Hjh5rc,Gt)c">y_ball_far</field>
-                                                                                                                                          </block>
+                                                                                                                                          <block type="logic_null" id="$fM$v`jz=Gu3u5N-kvvV"/>
                                                                                                                                         </value>
                                                                                                                                       </block>
                                                                                                                                     </value>
                                                                                                                                     <value name="B">
-                                                                                                                                      <block type="logic_compare" id="!r4f:gx)bYp.aGG:gEck">
-                                                                                                                                        <field name="OP">LTE</field>
+                                                                                                                                      <block type="logic_compare" id="3[c=:H.XfB-GEfuelSLT">
+                                                                                                                                        <field name="OP">EQ</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=";ZAx96@n9~k7Pw7/~*8S">
+                                                                                                                                            <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</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>
+                                                                                                                                          <block type="logic_null" id="Dwx`oZu-Z*UMkSF2u9uU"/>
                                                                                                                                         </value>
                                                                                                                                       </block>
                                                                                                                                     </value>
                                                                                                                                   </block>
                                                                                                                                 </value>
                                                                                                                                 <statement name="DO1">
-                                                                                                                                  <block type="procedures_callnoreturn" id="~M+5pWsaHLkyCq)rYO$k">
-                                                                                                                                    <mutation name="fwd">
-                                                                                                                                      <arg name="v"/>
-                                                                                                                                      <arg name="ticks"/>
-                                                                                                                                    </mutation>
-                                                                                                                                    <value name="ARG0">
-                                                                                                                                      <block type="variables_get" id="iXjkVkHFgqS:.%6Q=Z_f">
-                                                                                                                                        <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                                                                                                                  <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_GOAL_LEFT</field>
                                                                                                                                       </block>
                                                                                                                                     </value>
-                                                                                                                                    <value name="ARG1">
-                                                                                                                                      <block type="math_number" id="m]yorgh~PALhYi-x%]93">
-                                                                                                                                        <field name="NUM">10</field>
+                                                                                                                                    <next>
+                                                                                                                                      <block type="procedures_callnoreturn" id="+j-FQusX0T9FJ1P}u:0|">
+                                                                                                                                        <mutation name="turnSideRight">
+                                                                                                                                          <arg name="v"/>
+                                                                                                                                          <arg name="ticks"/>
+                                                                                                                                        </mutation>
+                                                                                                                                        <value name="ARG0">
+                                                                                                                                          <block type="variables_get" id="Jx~`*{sDX:}UuM`gsZp/">
+                                                                                                                                            <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                                                                                                                          </block>
+                                                                                                                                        </value>
+                                                                                                                                        <value name="ARG1">
+                                                                                                                                          <block type="math_number" id=")k]SdR3F1bII`Mo!4Q2T">
+                                                                                                                                            <field name="NUM">20</field>
+                                                                                                                                          </block>
+                                                                                                                                        </value>
                                                                                                                                       </block>
-                                                                                                                                    </value>
+                                                                                                                                    </next>
                                                                                                                                   </block>
                                                                                                                                 </statement>
                                                                                                                                 <value name="IF2">
-                                                                                                                                  <block type="logic_operation" id=":2kiZ:)l/(drayLhwske" inline="false">
+                                                                                                                                  <block type="logic_operation" id="1;1`n[eC4,:;kuqeyYe?" inline="false">
                                                                                                                                     <field name="OP">AND</field>
                                                                                                                                     <value name="A">
-                                                                                                                                      <block type="logic_compare" id="dKOwmYr|Z6CW(+u8.a:w">
-                                                                                                                                        <field name="OP">GT</field>
+                                                                                                                                      <block type="logic_compare" id="TM_H.[_zQQ6+pVvAY1~3">
+                                                                                                                                        <field name="OP">EQ</field>
                                                                                                                                         <value name="A">
-                                                                                                                                          <block type="variables_get" id="_PZg0?|Eka9OOdKCVIhZ">
-                                                                                                                                            <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                                                          <block type="variables_get" id="2%ig?qe,;l|V%-dz/sSa">
+                                                                                                                                            <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
                                                                                                                                           </block>
                                                                                                                                         </value>
                                                                                                                                         <value name="B">
-                                                                                                                                          <block type="variables_get" id=".5Q?xw/;CtWi-HzsEBhp">
-                                                                                                                                            <field name="VAR" id="09n]XF2CKURQs)nHOfam">y_ball_near</field>
-                                                                                                                                          </block>
+                                                                                                                                          <block type="logic_null" id="nWaVJidHgA=jsdDixAN@"/>
                                                                                                                                         </value>
                                                                                                                                       </block>
                                                                                                                                     </value>
                                                                                                                                     <value name="B">
-                                                                                                                                      <block type="logic_compare" id="({,ER8#k!G3+tpPl645Q">
-                                                                                                                                        <field name="OP">LTE</field>
+                                                                                                                                      <block type="logic_compare" id="h2LhI}NfWS@AVx2ZO$SV">
+                                                                                                                                        <field name="OP">NEQ</field>
                                                                                                                                         <value name="A">
-                                                                                                                                          <block type="variables_get" id="QB39f^ga_-f?bwb+!.8X">
-                                                                                                                                            <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                                                          <block type="variables_get" id="8moxf4Q@Tu]VF!9L|68b">
+                                                                                                                                            <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
                                                                                                                                           </block>
                                                                                                                                         </value>
                                                                                                                                         <value name="B">
-                                                                                                                                          <block type="variables_get" id="qkncjacBYB1~0@aF1Q[x">
-                                                                                                                                            <field name="VAR" id="xjf5O*w9;IZf$n55ytVF">y_ball_touch</field>
-                                                                                                                                          </block>
+                                                                                                                                          <block type="logic_null" id="vjJEFGVR/}C}/4mI7%g:"/>
                                                                                                                                         </value>
                                                                                                                                       </block>
                                                                                                                                     </value>
                                                                                                                                   </block>
                                                                                                                                 </value>
                                                                                                                                 <statement name="DO2">
-                                                                                                                                  <block type="procedures_callnoreturn" id="5?xr%Un4{ZZP/*kbTrS4">
-                                                                                                                                    <mutation name="turnSideLeft">
-                                                                                                                                      <arg name="v"/>
-                                                                                                                                      <arg name="ticks"/>
-                                                                                                                                    </mutation>
-                                                                                                                                    <value name="ARG0">
-                                                                                                                                      <block type="variables_get" id="zX7$-2rcp(Tan$g?Z%[U">
-                                                                                                                                        <field name="VAR" id="1idj3sw*{G$j`2:II{^5">v_fast</field>
+                                                                                                                                  <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_GOAL_RIGHT</field>
                                                                                                                                       </block>
                                                                                                                                     </value>
-                                                                                                                                    <value name="ARG1">
-                                                                                                                                      <block type="math_number" id="2xa_b^blTx3j,Xt)H#5}">
-                                                                                                                                        <field name="NUM">20</field>
+                                                                                                                                    <next>
+                                                                                                                                      <block type="procedures_callnoreturn" id="k0ElL*hZU:LP$5|:#LB?">
+                                                                                                                                        <mutation name="turnSideLeft">
+                                                                                                                                          <arg name="v"/>
+                                                                                                                                          <arg name="ticks"/>
+                                                                                                                                        </mutation>
+                                                                                                                                        <value name="ARG0">
+                                                                                                                                          <block type="variables_get" id="OPBK1GzGPPmCYw|3a:2R">
+                                                                                                                                            <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                                                                                                                          </block>
+                                                                                                                                        </value>
+                                                                                                                                        <value name="ARG1">
+                                                                                                                                          <block type="math_number" id="gcH1Ps(J*{a)=3pi9diY">
+                                                                                                                                            <field name="NUM">20</field>
+                                                                                                                                          </block>
+                                                                                                                                        </value>
                                                                                                                                       </block>
-                                                                                                                                    </value>
+                                                                                                                                    </next>
                                                                                                                                   </block>
                                                                                                                                 </statement>
-                                                                                                                                <value name="IF3">
-                                                                                                                                  <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>
-                                                                                                                                <statement name="DO3">
-                                                                                                                                  <block type="procedures_callnoreturn" id="iE.eGjQ64)ne8c#zdVbM">
-                                                                                                                                    <mutation name="bwd">
-                                                                                                                                      <arg name="v"/>
-                                                                                                                                      <arg name="ticks"/>
-                                                                                                                                    </mutation>
-                                                                                                                                    <value name="ARG0">
-                                                                                                                                      <block type="variables_get" id="[3C}+lMgr=zfSwjcYdsJ">
-                                                                                                                                        <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                                                                                                                <statement name="ELSE">
+                                                                                                                                  <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">BALL_NO_GOAL</field>
                                                                                                                                       </block>
                                                                                                                                     </value>
-                                                                                                                                    <value name="ARG1">
-                                                                                                                                      <block type="math_number" id="CWASv61O4meIid@gp|5P">
-                                                                                                                                        <field name="NUM">10</field>
+                                                                                                                                    <next>
+                                                                                                                                      <block type="procedures_callnoreturn" id=")f0^YOdfvadl{9t=j|w1">
+                                                                                                                                        <mutation name="stepBall"/>
                                                                                                                                       </block>
-                                                                                                                                    </value>
-                                                                                                                                  </block>
-                                                                                                                                </statement>
-                                                                                                                                <statement name="ELSE">
-                                                                                                                                  <block type="procedures_callnoreturn" id="sx~{uZ4bCDN4vbG6oz~)">
-                                                                                                                                    <mutation name="stop"/>
+                                                                                                                                    </next>
                                                                                                                                   </block>
                                                                                                                                 </statement>
                                                                                                                               </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>
-                                                                                                                              </block>
-                                                                                                                            </value>
-                                                                                                                            <statement name="DO1">
-                                                                                                                              <block type="procedures_callnoreturn" id="Do:{V-Htoxi(Ky;5q%7)">
-                                                                                                                                <mutation name="right">
-                                                                                                                                  <arg name="v"/>
-                                                                                                                                  <arg name="ticks"/>
-                                                                                                                                </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>
-                                                                                                                                </value>
-                                                                                                                                <value name="ARG1">
-                                                                                                                                  <block type="math_round" id="9w?6fcB$g~RycjY{`7ER">
-                                                                                                                                    <field name="OP">ROUND</field>
-                                                                                                                                    <field name="DECIMALS">0</field>
-                                                                                                                                    <value name="NUM">
-                                                                                                                                      <block type="math_arithmetic" id="EmeRL7tak./N9g?B@nFs">
-                                                                                                                                        <field name="OP">MULTIPLY</field>
+                                                                                                                            <statement name="ELSE">
+                                                                                                                              <block type="controls_if" id=":+;zyZF]7c#-QBh8$DW^">
+                                                                                                                                <mutation elseif="2" else="1"/>
+                                                                                                                                <value name="IF0">
+                                                                                                                                  <block type="logic_operation" id="T;e37h:tRmDfk=i;=KUw" inline="false">
+                                                                                                                                    <field name="OP">AND</field>
+                                                                                                                                    <value name="A">
+                                                                                                                                      <block type="logic_compare" id="J?P(P(GS*(XS.u3,^gDH">
+                                                                                                                                        <field name="OP">NEQ</field>
                                                                                                                                         <value name="A">
-                                                                                                                                          <block type="math_single" id="Z;6k/2E9P61Kc-hmsE6]">
-                                                                                                                                            <field name="OP">ABS</field>
-                                                                                                                                            <value name="NUM">
-                                                                                                                                              <block type="variables_get" id="($1]A%(r+nV+-me@mi{*">
-                                                                                                                                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
-                                                                                                                                              </block>
-                                                                                                                                            </value>
+                                                                                                                                          <block type="variables_get" id="%=:pZSNhgSS#}A7RFb-m">
+                                                                                                                                            <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
                                                                                                                                           </block>
                                                                                                                                         </value>
                                                                                                                                         <value name="B">
-                                                                                                                                          <block type="math_number" id="toF?^MGpT%1d?VxiFuEP">
-                                                                                                                                            <field name="NUM">0.07</field>
-                                                                                                                                          </block>
+                                                                                                                                          <block type="logic_null" id="Krr)V8_2jy)QKT|Uy)A`"/>
                                                                                                                                         </value>
                                                                                                                                       </block>
                                                                                                                                     </value>
-                                                                                                                                  </block>
-                                                                                                                                </value>
-                                                                                                                              </block>
-                                                                                                                            </statement>
-                                                                                                                            <value name="IF2">
-                                                                                                                              <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="DO2">
-                                                                                                                              <block type="procedures_callnoreturn" id="#7@$9Gz4rn?uePi|!w5H">
-                                                                                                                                <mutation name="left">
-                                                                                                                                  <arg name="v"/>
-                                                                                                                                  <arg name="ticks"/>
-                                                                                                                                </mutation>
-                                                                                                                                <value name="ARG0">
-                                                                                                                                  <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>
-                                                                                                                                <value name="ARG1">
-                                                                                                                                  <block type="math_round" id="HlNcRe2g^cx]xGJzkq9a">
-                                                                                                                                    <field name="OP">ROUND</field>
-                                                                                                                                    <field name="DECIMALS">0</field>
-                                                                                                                                    <value name="NUM">
-                                                                                                                                      <block type="math_arithmetic" id="hYC$h9LnV_XesUB4RVb8">
-                                                                                                                                        <field name="OP">MULTIPLY</field>
+                                                                                                                                    <value name="B">
+                                                                                                                                      <block type="logic_compare" id="ffs5T2N@HW6q,YD7+=4y">
+                                                                                                                                        <field name="OP">NEQ</field>
                                                                                                                                         <value name="A">
-                                                                                                                                          <block type="math_single" id="}(49w@smA}1HE9MNaJLw">
-                                                                                                                                            <field name="OP">ABS</field>
-                                                                                                                                            <value name="NUM">
-                                                                                                                                              <block type="variables_get" id="+se(4FE;QgXJ@?.]xm_G">
-                                                                                                                                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
-                                                                                                                                              </block>
-                                                                                                                                            </value>
+                                                                                                                                          <block type="variables_get" id="~_Q+EdEV/6ho6B-lM|e.">
+                                                                                                                                            <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
                                                                                                                                           </block>
                                                                                                                                         </value>
                                                                                                                                         <value name="B">
-                                                                                                                                          <block type="math_number" id="7Uy;@k^^.U]7oteQb]9@">
-                                                                                                                                            <field name="NUM">0.07</field>
-                                                                                                                                          </block>
+                                                                                                                                          <block type="logic_null" id="Xec|5GQgP=8o:@`Scn4C"/>
                                                                                                                                         </value>
                                                                                                                                       </block>
                                                                                                                                     </value>
                                                                                                                                   </block>
                                                                                                                                 </value>
-                                                                                                                              </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>
-                                                                                                                          </block>
-                                                                                                                        </value>
-                                                                                                                        <value name="B">
-                                                                                                                          <block type="logic_operation" id="fGq*Z2TDY5Aiyb._(iWw" 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>
-                                                                                                                                <value name="A">
-                                                                                                                                  <block type="variables_get" id="O/m@rtsP1-]GZu;z!Kd7">
-                                                                                                                                    <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
-                                                                                                                                  </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="variables_get" id="%*W`_VauA#TUT8Bhr(l[">
-                                                                                                                                    <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
-                                                                                                                                  </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_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="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>
-                                                                                                                                    <value name="A">
-                                                                                                                                      <block type="variables_get" id="]Pnwg,R0`8-u%~|{ySI)">
-                                                                                                                                        <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
-                                                                                                                                      </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>
-                                                                                                                                <statement name="DO0">
-                                                                                                                                  <block type="procedures_callnoreturn" id="8_rFe%[Ngs/W)u{[wK-/">
-                                                                                                                                    <mutation name="turnSideRight">
-                                                                                                                                      <arg name="v"/>
-                                                                                                                                      <arg name="ticks"/>
-                                                                                                                                    </mutation>
-                                                                                                                                    <value name="ARG0">
-                                                                                                                                      <block type="variables_get" id="%jZ0j@6g~afS~;)?{MXB">
-                                                                                                                                        <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                    <value name="ARG1">
-                                                                                                                                      <block type="math_number" id="cJ`!Y,Vi0EX0|.|y6Nc|">
-                                                                                                                                        <field name="NUM">20</field>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                  </block>
-                                                                                                                                </statement>
-                                                                                                                                <value name="IF1">
-                                                                                                                                  <block type="logic_compare" id="nUbsUlJ45(hnk!)6CNAr">
-                                                                                                                                    <field name="OP">GT</field>
-                                                                                                                                    <value name="A">
-                                                                                                                                      <block type="variables_get" id="tchE8Qc)Kp|9?UE;Fpe%">
-                                                                                                                                        <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
-                                                                                                                                      </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="turnSideLeft">
-                                                                                                                                      <arg name="v"/>
-                                                                                                                                      <arg name="ticks"/>
-                                                                                                                                    </mutation>
-                                                                                                                                    <value name="ARG0">
-                                                                                                                                      <block type="variables_get" id="|w.R`6dQM5dRkA(EE+yC">
-                                                                                                                                        <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                    <value name="ARG1">
-                                                                                                                                      <block type="math_number" id="E](Zlbs1};rS=bm)zpcI">
-                                                                                                                                        <field name="NUM">20</field>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                  </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>
-                                                                                                                              </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>
-                                                                                                                                  </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="variables_get" id="?uA|$zvDe+x4kMz%-{d.">
-                                                                                                                                    <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
-                                                                                                                                  </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="variables_get" id="D3C[P^f3vp}xb!,-2#r5">
-                                                                                                                                    <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
-                                                                                                                                  </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_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>
-                                                                                                                            </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>
-                                                                                                                            <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>
-                                                                                                                            <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="variables_get" id="BBBFnF[e5`GyH[7wiUs#">
-                                                                                                                                        <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
-                                                                                                                                      </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="turnSideRight">
-                                                                                                                                      <arg name="v"/>
-                                                                                                                                      <arg name="ticks"/>
-                                                                                                                                    </mutation>
-                                                                                                                                    <value name="ARG0">
-                                                                                                                                      <block type="variables_get" id="pL8o,[Ydi/Wp^J{smt$3">
-                                                                                                                                        <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                    <value name="ARG1">
-                                                                                                                                      <block type="math_number" id="l-M{#v:Q6XmgnnE+3,Rf">
-                                                                                                                                        <field name="NUM">20</field>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                  </block>
-                                                                                                                                </statement>
-                                                                                                                                <value name="IF1">
-                                                                                                                                  <block type="logic_compare" id="Y-@u6Td#HTIS8}mNdpK3">
-                                                                                                                                    <field name="OP">GT</field>
-                                                                                                                                    <value name="A">
-                                                                                                                                      <block type="variables_get" id="9ve,4}tDg.,ZfkLL0wUL">
-                                                                                                                                        <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
-                                                                                                                                      </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="turnSideLeft">
-                                                                                                                                      <arg name="v"/>
-                                                                                                                                      <arg name="ticks"/>
-                                                                                                                                    </mutation>
-                                                                                                                                    <value name="ARG0">
-                                                                                                                                      <block type="variables_get" id="%2]eKO_ysvhOPwk$a6Qx">
-                                                                                                                                        <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                    <value name="ARG1">
-                                                                                                                                      <block type="math_number" id="AW2n8Mg#t@e6)x-)NCI]">
-                                                                                                                                        <field name="NUM">20</field>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                  </block>
-                                                                                                                                </statement>
-                                                                                                                                <statement name="ELSE">
-                                                                                                                                  <block type="procedures_callnoreturn" id="Vc$f(+c;1~P{_)XVhUsj">
-                                                                                                                                    <mutation name="stop"/>
-                                                                                                                                  </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>
-                                                                                                                                  </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>
-                                                                                                                            <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>
-                                                                                                                            </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>
-                                                                                                                                  </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>
-                                                                                                                                  </block>
-                                                                                                                                </value>
-                                                                                                                                <value name="B">
-                                                                                                                                  <block type="logic_null" id="lP$*f:B}Uv4E]8^Ao)y2"/>
-                                                                                                                                </value>
-                                                                                                                              </block>
-                                                                                                                            </value>
-                                                                                                                          </block>
-                                                                                                                        </value>
-                                                                                                                        <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="[y%,{E^TI)LH+?|meGy_">
-                                                                                                                                <field name="OP">NEQ</field>
-                                                                                                                                <value name="A">
-                                                                                                                                  <block type="variables_get" id=",+(z.@/%C`r?(v8{Xk6?">
-                                                                                                                                    <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
-                                                                                                                                  </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="variables_get" id="k9g4HbL]=_@lVwgYM*{e">
-                                                                                                                                    <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
-                                                                                                                                  </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_GOAL_BOTH</field>
-                                                                                                                          </block>
-                                                                                                                        </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="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="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>
-                                                                                                                            <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="}m|a8Yo5TtRP74mP_mv`">
-                                                                                                                                    <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
-                                                                                                                                  </block>
-                                                                                                                                </value>
-                                                                                                                                <value name="B">
-                                                                                                                                  <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="variables_get" id="2.y#4B,;Y:6:KX.dWY!e">
-                                                                                                                                            <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
-                                                                                                                                          </block>
-                                                                                                                                        </value>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                    <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="variables_get" id="ru(1|is|xmE}.]MuY*xT">
-                                                                                                                                            <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
-                                                                                                                                          </block>
-                                                                                                                                        </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>
-                                                                                                                                </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="variables_get" id="lpS.y*[{cEi1+0~K+1A0">
-                                                                                                                                            <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
-                                                                                                                                          </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="variables_get" id="QgHqf)%|h?u;iSsKC}HP">
-                                                                                                                                            <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
-                                                                                                                                          </block>
-                                                                                                                                        </value>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                  </block>
-                                                                                                                                </value>
-                                                                                                                                <statement name="DO1">
-                                                                                                                                  <block type="procedures_callnoreturn" id="@n*^wewk`x?NX#m2}EQE">
-                                                                                                                                    <mutation name="turnSideLeft">
-                                                                                                                                      <arg name="v"/>
-                                                                                                                                      <arg name="ticks"/>
-                                                                                                                                    </mutation>
-                                                                                                                                    <value name="ARG0">
-                                                                                                                                      <block type="variables_get" id="+m}1a:ZW]JoRW2QP.n06">
-                                                                                                                                        <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                    <value name="ARG1">
-                                                                                                                                      <block type="math_number" id="_;2gj%#h1g[wnD|7oXuo">
-                                                                                                                                        <field name="NUM">20</field>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                  </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="variables_get" id="B[@Bq0mDVmk`6X84BFeR">
-                                                                                                                                            <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
-                                                                                                                                          </block>
-                                                                                                                                        </value>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                    <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="variables_get" id="6=]nXa6@Nlp}dkXwpg6@">
-                                                                                                                                            <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
-                                                                                                                                          </block>
-                                                                                                                                        </value>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                  </block>
-                                                                                                                                </value>
-                                                                                                                                <statement name="DO2">
-                                                                                                                                  <block type="procedures_callnoreturn" id="R590b9iY$aQ~B7!m8f2l">
-                                                                                                                                    <mutation name="turnSideRight">
-                                                                                                                                      <arg name="v"/>
-                                                                                                                                      <arg name="ticks"/>
-                                                                                                                                    </mutation>
-                                                                                                                                    <value name="ARG0">
-                                                                                                                                      <block type="variables_get" id="vk%)2O)R9Ft/FMn)2yr7">
-                                                                                                                                        <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                    <value name="ARG1">
-                                                                                                                                      <block type="math_number" id="N.3ER1#5:PMk;ocu-#q(">
-                                                                                                                                        <field name="NUM">20</field>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                  </block>
-                                                                                                                                </statement>
-                                                                                                                                <statement name="ELSE">
-                                                                                                                                  <block type="procedures_callnoreturn" id="Xa4Y={.L=QNVSnwr3E|_">
-                                                                                                                                    <mutation name="stop"/>
-                                                                                                                                  </block>
-                                                                                                                                </statement>
-                                                                                                                              </block>
-                                                                                                                            </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="%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="variables_get" id="[p/x;`ab/;Bg4Kn8589%">
-                                                                                                                                    <field name="VAR" id="xjf5O*w9;IZf$n55ytVF">y_ball_touch</field>
-                                                                                                                                  </block>
-                                                                                                                                </value>
-                                                                                                                              </block>
-                                                                                                                            </value>
-                                                                                                                            <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>
-                                                                                                                            </statement>
-                                                                                                                            <statement name="ELSE">
-                                                                                                                              <block type="procedures_callnoreturn" id="=56A!T,|yxe![pQgmxd5">
-                                                                                                                                <mutation name="stop"/>
-                                                                                                                              </block>
-                                                                                                                            </statement>
-                                                                                                                          </block>
-                                                                                                                        </next>
-                                                                                                                      </block>
-                                                                                                                    </statement>
-                                                                                                                    <value name="IF4">
-                                                                                                                      <block type="logic_operation" id="awUXoJ:Avy=jfaq3Lnw2" 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>
-                                                                                                                            <value name="A">
-                                                                                                                              <block type="variables_get" id="T$V8$ZEi|{};;VR5guWF">
-                                                                                                                                <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
-                                                                                                                              </block>
-                                                                                                                            </value>
-                                                                                                                            <value name="B">
-                                                                                                                              <block type="logic_null" id="o5dj.]+Z)07l-FMKaT%{"/>
-                                                                                                                            </value>
-                                                                                                                          </block>
-                                                                                                                        </value>
-                                                                                                                        <value name="B">
-                                                                                                                          <block type="logic_compare" id="L1~%)SdSHa$uo6A.8#6f">
-                                                                                                                            <field name="OP">NEQ</field>
-                                                                                                                            <value name="A">
-                                                                                                                              <block type="variables_get" id="WAl1M*;;q)J/[%+s[Nt^">
-                                                                                                                                <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
-                                                                                                                              </block>
-                                                                                                                            </value>
-                                                                                                                            <value name="B">
-                                                                                                                              <block type="logic_null" id="_D1?^^LL[mra-s}9x67K"/>
-                                                                                                                            </value>
-                                                                                                                          </block>
-                                                                                                                        </value>
-                                                                                                                      </block>
-                                                                                                                    </value>
-                                                                                                                    <statement name="DO4">
-                                                                                                                      <block type="variables_set" id="u#?[x*W2[}s=7T+@kGX3">
-                                                                                                                        <field name="VAR" id="vH;^OzJY7dOdepMScU1s">state</field>
-                                                                                                                        <value name="VALUE">
-                                                                                                                          <block type="text" id="Gi1v,-rKbpMdik!jz5aA">
-                                                                                                                            <field name="TEXT">NO_BALL_GOAL_BOTH</field>
-                                                                                                                          </block>
-                                                                                                                        </value>
-                                                                                                                        <next>
-                                                                                                                          <block type="variables_set" id="[N80,Pt{V6fUM/*V.[V,">
-                                                                                                                            <field name="VAR" id="v0BvP7[91TGaMpQG$r0f">goal_width</field>
-                                                                                                                            <value name="VALUE">
-                                                                                                                              <block type="math_arithmetic" id="stzng{bs`Stm,oBHUX4!">
-                                                                                                                                <field name="OP">MINUS</field>
-                                                                                                                                <value name="A">
-                                                                                                                                  <block type="variables_get" id="((%]wA!T|%@cv3,wHB|j">
-                                                                                                                                    <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
-                                                                                                                                  </block>
-                                                                                                                                </value>
-                                                                                                                                <value name="B">
-                                                                                                                                  <block type="variables_get" id="0%WOX|exw*bIEaQ3.`9q">
-                                                                                                                                    <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
-                                                                                                                                  </block>
-                                                                                                                                </value>
-                                                                                                                              </block>
-                                                                                                                            </value>
-                                                                                                                            <next>
-                                                                                                                              <block type="variables_set" id="VutK`C):{nbAi#Axhu!x">
-                                                                                                                                <field name="VAR" id="{]]L-TSC^#XtGnVinxf[">pos_goal_both</field>
-                                                                                                                                <value name="VALUE">
-                                                                                                                                  <block type="math_arithmetic" id="(KM3-N3=G5B(T:(!4_lq">
-                                                                                                                                    <field name="OP">ADD</field>
-                                                                                                                                    <value name="A">
-                                                                                                                                      <block type="variables_get" id="bS|/)kwXja$*IpF01zL/">
-                                                                                                                                        <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                    <value name="B">
-                                                                                                                                      <block type="math_arithmetic" id="X;-9(dOX5-El:hAx$.=B">
-                                                                                                                                        <field name="OP">DIVIDE</field>
-                                                                                                                                        <value name="A">
-                                                                                                                                          <block type="variables_get" id="Z4=3XhJOodeLD~q6l?{4">
-                                                                                                                                            <field name="VAR" id="v0BvP7[91TGaMpQG$r0f">goal_width</field>
-                                                                                                                                          </block>
-                                                                                                                                        </value>
-                                                                                                                                        <value name="B">
-                                                                                                                                          <block type="math_number" id="+%Vyps+4_*q%/:(:2j+E">
-                                                                                                                                            <field name="NUM">2</field>
-                                                                                                                                          </block>
-                                                                                                                                        </value>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                  </block>
-                                                                                                                                </value>
-                                                                                                                                <next>
-                                                                                                                                  <block type="controls_if" id="ip*`sP8:b(5pR4)~R_an">
-                                                                                                                                    <mutation elseif="2" else="1"/>
-                                                                                                                                    <value name="IF0">
-                                                                                                                                      <block type="logic_operation" id="fn=DRPVeg$aV~zkMY*tl" inline="false">
-                                                                                                                                        <field name="OP">AND</field>
-                                                                                                                                        <value name="A">
-                                                                                                                                          <block type="logic_compare" id="2Q5e3vZ!5/=nainF0od+">
-                                                                                                                                            <field name="OP">GTE</field>
-                                                                                                                                            <value name="A">
-                                                                                                                                              <block type="variables_get" id="CDb^~4feXbvngdh004${">
-                                                                                                                                                <field name="VAR" id="{]]L-TSC^#XtGnVinxf[">pos_goal_both</field>
-                                                                                                                                              </block>
-                                                                                                                                            </value>
-                                                                                                                                            <value name="B">
-                                                                                                                                              <block type="variables_get" id="cR*DIW$3$NL#u11S8#v,">
-                                                                                                                                                <field name="VAR" id="Ym/+Qo0YZe25;%N1d!*f">x_min</field>
-                                                                                                                                              </block>
-                                                                                                                                            </value>
-                                                                                                                                          </block>
-                                                                                                                                        </value>
-                                                                                                                                        <value name="B">
-                                                                                                                                          <block type="logic_compare" id="c(LuogB[ECxBtM-6/r4b">
-                                                                                                                                            <field name="OP">LTE</field>
-                                                                                                                                            <value name="A">
-                                                                                                                                              <block type="variables_get" id="z~zx!V^G#Ywd}HPCLcCn">
-                                                                                                                                                <field name="VAR" id="{]]L-TSC^#XtGnVinxf[">pos_goal_both</field>
-                                                                                                                                              </block>
-                                                                                                                                            </value>
-                                                                                                                                            <value name="B">
-                                                                                                                                              <block type="variables_get" id=")0O+HGV1!`X_dJGq4=yZ">
-                                                                                                                                                <field name="VAR" id="2G]XEQ3Lhl$dG]=:]8Ge">x_max</field>
-                                                                                                                                              </block>
-                                                                                                                                            </value>
-                                                                                                                                          </block>
-                                                                                                                                        </value>
+                                                                                                                                <statement name="DO0">
+                                                                                                                                  <block type="variables_set" id="u#?[x*W2[}s=7T+@kGX3">
+                                                                                                                                    <field name="VAR" id="vH;^OzJY7dOdepMScU1s">state</field>
+                                                                                                                                    <value name="VALUE">
+                                                                                                                                      <block type="text" id="Gi1v,-rKbpMdik!jz5aA">
+                                                                                                                                        <field name="TEXT">NO_BALL_GOAL_BOTH</field>
                                                                                                                                       </block>
                                                                                                                                     </value>
-                                                                                                                                    <statement name="DO0">
-                                                                                                                                      <block type="controls_if" id="#R16p?0!Rt1}82Q_5zO2">
-                                                                                                                                        <mutation elseif="0" else="1"/>
-                                                                                                                                        <value name="IF0">
-                                                                                                                                          <block type="logic_compare" id="UzXI%rAMZA[}UE*cbXUd">
-                                                                                                                                            <field name="OP">LT</field>
+                                                                                                                                    <next>
+                                                                                                                                      <block type="variables_set" id="[N80,Pt{V6fUM/*V.[V,">
+                                                                                                                                        <field name="VAR" id="v0BvP7[91TGaMpQG$r0f">goal_width</field>
+                                                                                                                                        <value name="VALUE">
+                                                                                                                                          <block type="math_arithmetic" id="stzng{bs`Stm,oBHUX4!">
+                                                                                                                                            <field name="OP">MINUS</field>
                                                                                                                                             <value name="A">
-                                                                                                                                              <block type="variables_get" id="@5%T+t9W1)BZT@oXqnww">
-                                                                                                                                                <field name="VAR" id="v0BvP7[91TGaMpQG$r0f">goal_width</field>
+                                                                                                                                              <block type="variables_get" id="((%]wA!T|%@cv3,wHB|j">
+                                                                                                                                                <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
                                                                                                                                               </block>
                                                                                                                                             </value>
                                                                                                                                             <value name="B">
-                                                                                                                                              <block type="math_number" id="Wb8s[K5@WIquU`@,7c@w">
-                                                                                                                                                <field name="NUM">130</field>
+                                                                                                                                              <block type="variables_get" id="0%WOX|exw*bIEaQ3.`9q">
+                                                                                                                                                <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
                                                                                                                                               </block>
                                                                                                                                             </value>
                                                                                                                                           </block>
                                                                                                                                         </value>
-                                                                                                                                        <statement name="DO0">
-                                                                                                                                          <block type="procedures_callnoreturn" id="pu3s6{_T@bDFusTBxc)c">
-                                                                                                                                            <mutation name="fwd">
-                                                                                                                                              <arg name="v"/>
-                                                                                                                                              <arg name="ticks"/>
-                                                                                                                                            </mutation>
-                                                                                                                                            <value name="ARG0">
-                                                                                                                                              <block type="variables_get" id="]RO~:%x7+T~!YzQ5FD:C">
-                                                                                                                                                <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
-                                                                                                                                              </block>
-                                                                                                                                            </value>
-                                                                                                                                            <value name="ARG1">
-                                                                                                                                              <block type="math_number" id="v0c-z!Z^U6/IWhKEPnE*">
-                                                                                                                                                <field name="NUM">10</field>
-                                                                                                                                              </block>
-                                                                                                                                            </value>
-                                                                                                                                          </block>
-                                                                                                                                        </statement>
-                                                                                                                                        <statement name="ELSE">
-                                                                                                                                          <block type="procedures_callnoreturn" id="Y6^M7Oqd:JSsRteXXtVD">
-                                                                                                                                            <mutation name="bwd">
-                                                                                                                                              <arg name="v"/>
-                                                                                                                                              <arg name="ticks"/>
-                                                                                                                                            </mutation>
-                                                                                                                                            <value name="ARG0">
-                                                                                                                                              <block type="variables_get" id="8F$+J#P35!A!gFI[:AHU">
-                                                                                                                                                <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                                                                                                                        <next>
+                                                                                                                                          <block type="variables_set" id="VutK`C):{nbAi#Axhu!x">
+                                                                                                                                            <field name="VAR" id="{]]L-TSC^#XtGnVinxf[">posx_goal_both</field>
+                                                                                                                                            <value name="VALUE">
+                                                                                                                                              <block type="math_arithmetic" id="(KM3-N3=G5B(T:(!4_lq">
+                                                                                                                                                <field name="OP">ADD</field>
+                                                                                                                                                <value name="A">
+                                                                                                                                                  <block type="variables_get" id="bS|/)kwXja$*IpF01zL/">
+                                                                                                                                                    <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
+                                                                                                                                                  </block>
+                                                                                                                                                </value>
+                                                                                                                                                <value name="B">
+                                                                                                                                                  <block type="math_arithmetic" id="X;-9(dOX5-El:hAx$.=B">
+                                                                                                                                                    <field name="OP">DIVIDE</field>
+                                                                                                                                                    <value name="A">
+                                                                                                                                                      <block type="variables_get" id="Z4=3XhJOodeLD~q6l?{4">
+                                                                                                                                                        <field name="VAR" id="v0BvP7[91TGaMpQG$r0f">goal_width</field>
+                                                                                                                                                      </block>
+                                                                                                                                                    </value>
+                                                                                                                                                    <value name="B">
+                                                                                                                                                      <block type="math_number" id="+%Vyps+4_*q%/:(:2j+E">
+                                                                                                                                                        <field name="NUM">2</field>
+                                                                                                                                                      </block>
+                                                                                                                                                    </value>
+                                                                                                                                                  </block>
+                                                                                                                                                </value>
                                                                                                                                               </block>
                                                                                                                                             </value>
-                                                                                                                                            <value name="ARG1">
-                                                                                                                                              <block type="math_number" id="dFB2rRWf.tj`$C?![{FH">
-                                                                                                                                                <field name="NUM">10</field>
+                                                                                                                                            <next>
+                                                                                                                                              <block type="controls_if" id="ip*`sP8:b(5pR4)~R_an">
+                                                                                                                                                <mutation elseif="2" else="1"/>
+                                                                                                                                                <value name="IF0">
+                                                                                                                                                  <block type="logic_operation" id="fn=DRPVeg$aV~zkMY*tl" inline="false">
+                                                                                                                                                    <field name="OP">AND</field>
+                                                                                                                                                    <value name="A">
+                                                                                                                                                      <block type="logic_compare" id="2Q5e3vZ!5/=nainF0od+">
+                                                                                                                                                        <field name="OP">GTE</field>
+                                                                                                                                                        <value name="A">
+                                                                                                                                                          <block type="variables_get" id="CDb^~4feXbvngdh004${">
+                                                                                                                                                            <field name="VAR" id="{]]L-TSC^#XtGnVinxf[">posx_goal_both</field>
+                                                                                                                                                          </block>
+                                                                                                                                                        </value>
+                                                                                                                                                        <value name="B">
+                                                                                                                                                          <block type="variables_get" id="cR*DIW$3$NL#u11S8#v,">
+                                                                                                                                                            <field name="VAR" id="Ym/+Qo0YZe25;%N1d!*f">x_min</field>
+                                                                                                                                                          </block>
+                                                                                                                                                        </value>
+                                                                                                                                                      </block>
+                                                                                                                                                    </value>
+                                                                                                                                                    <value name="B">
+                                                                                                                                                      <block type="logic_compare" id="c(LuogB[ECxBtM-6/r4b">
+                                                                                                                                                        <field name="OP">LTE</field>
+                                                                                                                                                        <value name="A">
+                                                                                                                                                          <block type="variables_get" id="z~zx!V^G#Ywd}HPCLcCn">
+                                                                                                                                                            <field name="VAR" id="{]]L-TSC^#XtGnVinxf[">posx_goal_both</field>
+                                                                                                                                                          </block>
+                                                                                                                                                        </value>
+                                                                                                                                                        <value name="B">
+                                                                                                                                                          <block type="variables_get" id=")0O+HGV1!`X_dJGq4=yZ">
+                                                                                                                                                            <field name="VAR" id="2G]XEQ3Lhl$dG]=:]8Ge">x_max</field>
+                                                                                                                                                          </block>
+                                                                                                                                                        </value>
+                                                                                                                                                      </block>
+                                                                                                                                                    </value>
+                                                                                                                                                  </block>
+                                                                                                                                                </value>
+                                                                                                                                                <statement name="DO0">
+                                                                                                                                                  <block type="controls_if" id="#R16p?0!Rt1}82Q_5zO2">
+                                                                                                                                                    <mutation elseif="1" else="1"/>
+                                                                                                                                                    <value name="IF0">
+                                                                                                                                                      <block type="logic_compare" id="UzXI%rAMZA[}UE*cbXUd">
+                                                                                                                                                        <field name="OP">LT</field>
+                                                                                                                                                        <value name="A">
+                                                                                                                                                          <block type="variables_get" id="@5%T+t9W1)BZT@oXqnww">
+                                                                                                                                                            <field name="VAR" id="v0BvP7[91TGaMpQG$r0f">goal_width</field>
+                                                                                                                                                          </block>
+                                                                                                                                                        </value>
+                                                                                                                                                        <value name="B">
+                                                                                                                                                          <block type="math_number" id="Wb8s[K5@WIquU`@,7c@w">
+                                                                                                                                                            <field name="NUM">130</field>
+                                                                                                                                                          </block>
+                                                                                                                                                        </value>
+                                                                                                                                                      </block>
+                                                                                                                                                    </value>
+                                                                                                                                                    <statement name="DO0">
+                                                                                                                                                      <block type="procedures_callnoreturn" id="pu3s6{_T@bDFusTBxc)c">
+                                                                                                                                                        <mutation name="fwd">
+                                                                                                                                                          <arg name="v"/>
+                                                                                                                                                          <arg name="ticks"/>
+                                                                                                                                                        </mutation>
+                                                                                                                                                        <value name="ARG0">
+                                                                                                                                                          <block type="variables_get" id="]RO~:%x7+T~!YzQ5FD:C">
+                                                                                                                                                            <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                                                                                                                                          </block>
+                                                                                                                                                        </value>
+                                                                                                                                                        <value name="ARG1">
+                                                                                                                                                          <block type="math_number" id="v0c-z!Z^U6/IWhKEPnE*">
+                                                                                                                                                            <field name="NUM">10</field>
+                                                                                                                                                          </block>
+                                                                                                                                                        </value>
+                                                                                                                                                      </block>
+                                                                                                                                                    </statement>
+                                                                                                                                                    <value name="IF1">
+                                                                                                                                                      <block type="logic_compare" id="XoLsJ}.)nZb?`6tpIqv-">
+                                                                                                                                                        <field name="OP">GT</field>
+                                                                                                                                                        <value name="A">
+                                                                                                                                                          <block type="variables_get" id="9NAs7T{MBx/=YP5BpW43">
+                                                                                                                                                            <field name="VAR" id="v0BvP7[91TGaMpQG$r0f">goal_width</field>
+                                                                                                                                                          </block>
+                                                                                                                                                        </value>
+                                                                                                                                                        <value name="B">
+                                                                                                                                                          <block type="math_number" id="|2@A]z`Rs0UlH}Ovv9`T">
+                                                                                                                                                            <field name="NUM">40</field>
+                                                                                                                                                          </block>
+                                                                                                                                                        </value>
+                                                                                                                                                      </block>
+                                                                                                                                                    </value>
+                                                                                                                                                    <statement name="DO1">
+                                                                                                                                                      <block type="procedures_callnoreturn" id="Y6^M7Oqd:JSsRteXXtVD">
+                                                                                                                                                        <mutation name="bwd">
+                                                                                                                                                          <arg name="v"/>
+                                                                                                                                                          <arg name="ticks"/>
+                                                                                                                                                        </mutation>
+                                                                                                                                                        <value name="ARG0">
+                                                                                                                                                          <block type="variables_get" id="8F$+J#P35!A!gFI[:AHU">
+                                                                                                                                                            <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                                                                                                                                          </block>
+                                                                                                                                                        </value>
+                                                                                                                                                        <value name="ARG1">
+                                                                                                                                                          <block type="math_number" id="dFB2rRWf.tj`$C?![{FH">
+                                                                                                                                                            <field name="NUM">10</field>
+                                                                                                                                                          </block>
+                                                                                                                                                        </value>
+                                                                                                                                                      </block>
+                                                                                                                                                    </statement>
+                                                                                                                                                  </block>
+                                                                                                                                                </statement>
+                                                                                                                                                <value name="IF1">
+                                                                                                                                                  <block type="logic_compare" id="(H+T:yEGNo[y%GO7P;Dz">
+                                                                                                                                                    <field name="OP">LT</field>
+                                                                                                                                                    <value name="A">
+                                                                                                                                                      <block type="variables_get" id="D`d-ScN5}NDq#So6U%2M">
+                                                                                                                                                        <field name="VAR" id="{]]L-TSC^#XtGnVinxf[">posx_goal_both</field>
+                                                                                                                                                      </block>
+                                                                                                                                                    </value>
+                                                                                                                                                    <value name="B">
+                                                                                                                                                      <block type="variables_get" id="kw^gNGg!Q00uE[+DZwGg">
+                                                                                                                                                        <field name="VAR" id="Ym/+Qo0YZe25;%N1d!*f">x_min</field>
+                                                                                                                                                      </block>
+                                                                                                                                                    </value>
+                                                                                                                                                  </block>
+                                                                                                                                                </value>
+                                                                                                                                                <statement name="DO1">
+                                                                                                                                                  <block type="procedures_callnoreturn" id="mG-?FU_hknyuqCH{oWJT">
+                                                                                                                                                    <mutation name="left">
+                                                                                                                                                      <arg name="v"/>
+                                                                                                                                                      <arg name="ticks"/>
+                                                                                                                                                    </mutation>
+                                                                                                                                                    <value name="ARG0">
+                                                                                                                                                      <block type="variables_get" id="R%Oe)=kR9%E%`E3L[QVN">
+                                                                                                                                                        <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                                                                                                                                      </block>
+                                                                                                                                                    </value>
+                                                                                                                                                    <value name="ARG1">
+                                                                                                                                                      <block type="math_round" id="6n}aM10-I0P:)!Gr(]i5">
+                                                                                                                                                        <field name="OP">ROUND</field>
+                                                                                                                                                        <field name="DECIMALS">0</field>
+                                                                                                                                                        <value name="NUM">
+                                                                                                                                                          <block type="math_arithmetic" id="9e@Xpj!L)E*5)/BWxD;,">
+                                                                                                                                                            <field name="OP">MULTIPLY</field>
+                                                                                                                                                            <value name="A">
+                                                                                                                                                              <block type="variables_get" id="|5*]zYtMm]955K1])q46">
+                                                                                                                                                                <field name="VAR" id="v0BvP7[91TGaMpQG$r0f">goal_width</field>
+                                                                                                                                                              </block>
+                                                                                                                                                            </value>
+                                                                                                                                                            <value name="B">
+                                                                                                                                                              <block type="math_number" id="=Vugu-k,xt8LKJmb5/PQ">
+                                                                                                                                                                <field name="NUM">0.01</field>
+                                                                                                                                                              </block>
+                                                                                                                                                            </value>
+                                                                                                                                                          </block>
+                                                                                                                                                        </value>
+                                                                                                                                                      </block>
+                                                                                                                                                    </value>
+                                                                                                                                                  </block>
+                                                                                                                                                </statement>
+                                                                                                                                                <value name="IF2">
+                                                                                                                                                  <block type="logic_compare" id="VxyB%0*)9[A{wCi_b~$0">
+                                                                                                                                                    <field name="OP">GT</field>
+                                                                                                                                                    <value name="A">
+                                                                                                                                                      <block type="variables_get" id="-;*b3g{dTtQ{%@$gw6P)">
+                                                                                                                                                        <field name="VAR" id="{]]L-TSC^#XtGnVinxf[">posx_goal_both</field>
+                                                                                                                                                      </block>
+                                                                                                                                                    </value>
+                                                                                                                                                    <value name="B">
+                                                                                                                                                      <block type="variables_get" id="?q##-)hY2%F2{Lx*2U0U">
+                                                                                                                                                        <field name="VAR" id="2G]XEQ3Lhl$dG]=:]8Ge">x_max</field>
+                                                                                                                                                      </block>
+                                                                                                                                                    </value>
+                                                                                                                                                  </block>
+                                                                                                                                                </value>
+                                                                                                                                                <statement name="DO2">
+                                                                                                                                                  <block type="procedures_callnoreturn" id="oGweCRo;|ZbP%1KR7B]a">
+                                                                                                                                                    <mutation name="right">
+                                                                                                                                                      <arg name="v"/>
+                                                                                                                                                      <arg name="ticks"/>
+                                                                                                                                                    </mutation>
+                                                                                                                                                    <value name="ARG0">
+                                                                                                                                                      <block type="variables_get" id="Vc7Fp*A$WDu^X7t.%1`9">
+                                                                                                                                                        <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                                                                                                                                                      </block>
+                                                                                                                                                    </value>
+                                                                                                                                                    <value name="ARG1">
+                                                                                                                                                      <block type="math_round" id="5^^7yxNg{mw+_^(*rmC#">
+                                                                                                                                                        <field name="OP">ROUND</field>
+                                                                                                                                                        <field name="DECIMALS">0</field>
+                                                                                                                                                        <value name="NUM">
+                                                                                                                                                          <block type="math_arithmetic" id="eW}|s]3dmm#iEvK%uj/1">
+                                                                                                                                                            <field name="OP">MULTIPLY</field>
+                                                                                                                                                            <value name="A">
+                                                                                                                                                              <block type="variables_get" id="B}iVX#7NZ$fvR1!YH6@S">
+                                                                                                                                                                <field name="VAR" id="v0BvP7[91TGaMpQG$r0f">goal_width</field>
+                                                                                                                                                              </block>
+                                                                                                                                                            </value>
+                                                                                                                                                            <value name="B">
+                                                                                                                                                              <block type="math_number" id="(n)Uz^8S1N!C^7@](sJ)">
+                                                                                                                                                                <field name="NUM">0.01</field>
+                                                                                                                                                              </block>
+                                                                                                                                                            </value>
+                                                                                                                                                          </block>
+                                                                                                                                                        </value>
+                                                                                                                                                      </block>
+                                                                                                                                                    </value>
+                                                                                                                                                  </block>
+                                                                                                                                                </statement>
                                                                                                                                               </block>
-                                                                                                                                            </value>
+                                                                                                                                            </next>
                                                                                                                                           </block>
-                                                                                                                                        </statement>
+                                                                                                                                        </next>
                                                                                                                                       </block>
-                                                                                                                                    </statement>
-                                                                                                                                    <value name="IF1">
-                                                                                                                                      <block type="logic_compare" id="(H+T:yEGNo[y%GO7P;Dz">
-                                                                                                                                        <field name="OP">LT</field>
+                                                                                                                                    </next>
+                                                                                                                                  </block>
+                                                                                                                                </statement>
+                                                                                                                                <value name="IF1">
+                                                                                                                                  <block type="logic_operation" id="OODzyK;qukR-n-DzK/{V" inline="false">
+                                                                                                                                    <field name="OP">AND</field>
+                                                                                                                                    <value name="A">
+                                                                                                                                      <block type="logic_compare" id="RXI-@2_E6Wh|wxbt$s,I">
+                                                                                                                                        <field name="OP">NEQ</field>
                                                                                                                                         <value name="A">
-                                                                                                                                          <block type="variables_get" id="D`d-ScN5}NDq#So6U%2M">
-                                                                                                                                            <field name="VAR" id="{]]L-TSC^#XtGnVinxf[">pos_goal_both</field>
+                                                                                                                                          <block type="variables_get" id="do13adT([f7eV=#H|B[K">
+                                                                                                                                            <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
                                                                                                                                           </block>
                                                                                                                                         </value>
                                                                                                                                         <value name="B">
-                                                                                                                                          <block type="variables_get" id="kw^gNGg!Q00uE[+DZwGg">
-                                                                                                                                            <field name="VAR" id="Ym/+Qo0YZe25;%N1d!*f">x_min</field>
+                                                                                                                                          <block type="logic_null" id="fizI-!+UN#8/mWI*%=W]"/>
+                                                                                                                                        </value>
+                                                                                                                                      </block>
+                                                                                                                                    </value>
+                                                                                                                                    <value name="B">
+                                                                                                                                      <block type="logic_compare" id="xrJIK[zPx+}zKlkzTc#w">
+                                                                                                                                        <field name="OP">EQ</field>
+                                                                                                                                        <value name="A">
+                                                                                                                                          <block type="variables_get" id="pc9J=b0[$xVE!_ya2}(Z">
+                                                                                                                                            <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
                                                                                                                                           </block>
                                                                                                                                         </value>
+                                                                                                                                        <value name="B">
+                                                                                                                                          <block type="logic_null" id="N19OOSab2Qlki*P#1DVj"/>
+                                                                                                                                        </value>
                                                                                                                                       </block>
                                                                                                                                     </value>
-                                                                                                                                    <statement name="DO1">
-                                                                                                                                      <block type="procedures_callnoreturn" id="mG-?FU_hknyuqCH{oWJT">
-                                                                                                                                        <mutation name="left">
+                                                                                                                                  </block>
+                                                                                                                                </value>
+                                                                                                                                <statement name="DO1">
+                                                                                                                                  <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_GOAL_LEFT</field>
+                                                                                                                                      </block>
+                                                                                                                                    </value>
+                                                                                                                                    <next>
+                                                                                                                                      <block type="procedures_callnoreturn" id="U96^i60j(oeYzU8kTgU}">
+                                                                                                                                        <mutation name="right">
                                                                                                                                           <arg name="v"/>
                                                                                                                                           <arg name="ticks"/>
                                                                                                                                         </mutation>
                                                                                                                                         <value name="ARG0">
-                                                                                                                                          <block type="variables_get" id="R%Oe)=kR9%E%`E3L[QVN">
+                                                                                                                                          <block type="variables_get" id="NNO?/UcvB5S=//YOQ51j">
                                                                                                                                             <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
                                                                                                                                           </block>
                                                                                                                                         </value>
                                                                                                                                         <value name="ARG1">
-                                                                                                                                          <block type="math_round" id="6n}aM10-I0P:)!Gr(]i5">
+                                                                                                                                          <block type="math_round" id=")kbJ+|FY0:`OyFD|5o1n">
                                                                                                                                             <field name="OP">ROUND</field>
                                                                                                                                             <field name="DECIMALS">0</field>
                                                                                                                                             <value name="NUM">
-                                                                                                                                              <block type="math_arithmetic" id="9e@Xpj!L)E*5)/BWxD;,">
-                                                                                                                                                <field name="OP">MULTIPLY</field>
-                                                                                                                                                <value name="A">
-                                                                                                                                                  <block type="variables_get" id="|5*]zYtMm]955K1])q46">
-                                                                                                                                                    <field name="VAR" id="v0BvP7[91TGaMpQG$r0f">goal_width</field>
-                                                                                                                                                  </block>
-                                                                                                                                                </value>
-                                                                                                                                                <value name="B">
-                                                                                                                                                  <block type="math_number" id="=Vugu-k,xt8LKJmb5/PQ">
-                                                                                                                                                    <field name="NUM">0.01</field>
+                                                                                                                                              <block type="math_single" id="w#OguMAoO|^wrS9~m7QM">
+                                                                                                                                                <field name="OP">ABS</field>
+                                                                                                                                                <value name="NUM">
+                                                                                                                                                  <block type="math_arithmetic" id="A9MgtS+IiS%Ns7f$JnJ`">
+                                                                                                                                                    <field name="OP">MULTIPLY</field>
+                                                                                                                                                    <value name="A">
+                                                                                                                                                      <block type="variables_get" id="^$$6dKK$Lr7ThLi|d_3y">
+                                                                                                                                                        <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
+                                                                                                                                                      </block>
+                                                                                                                                                    </value>
+                                                                                                                                                    <value name="B">
+                                                                                                                                                      <block type="math_number" id="=+CXXJ[n-?V=f6zroOtS">
+                                                                                                                                                        <field name="NUM">0.1</field>
+                                                                                                                                                      </block>
+                                                                                                                                                    </value>
                                                                                                                                                   </block>
                                                                                                                                                 </value>
                                                                                                                                               </block>
@@ -1670,48 +1013,79 @@
                                                                                                                                           </block>
                                                                                                                                         </value>
                                                                                                                                       </block>
-                                                                                                                                    </statement>
-                                                                                                                                    <value name="IF2">
-                                                                                                                                      <block type="logic_compare" id="VxyB%0*)9[A{wCi_b~$0">
-                                                                                                                                        <field name="OP">GT</field>
+                                                                                                                                    </next>
+                                                                                                                                  </block>
+                                                                                                                                </statement>
+                                                                                                                                <value name="IF2">
+                                                                                                                                  <block type="logic_operation" id="_ffH*UYCZwP#p@(u*vKt" inline="false">
+                                                                                                                                    <field name="OP">AND</field>
+                                                                                                                                    <value name="A">
+                                                                                                                                      <block type="logic_compare" id="FuFu?Z[*41)=3e8JR]J;">
+                                                                                                                                        <field name="OP">EQ</field>
                                                                                                                                         <value name="A">
-                                                                                                                                          <block type="variables_get" id="-;*b3g{dTtQ{%@$gw6P)">
-                                                                                                                                            <field name="VAR" id="{]]L-TSC^#XtGnVinxf[">pos_goal_both</field>
+                                                                                                                                          <block type="variables_get" id="SqF~a0kV,A7s{_^N9^ux">
+                                                                                                                                            <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
                                                                                                                                           </block>
                                                                                                                                         </value>
                                                                                                                                         <value name="B">
-                                                                                                                                          <block type="variables_get" id="?q##-)hY2%F2{Lx*2U0U">
-                                                                                                                                            <field name="VAR" id="2G]XEQ3Lhl$dG]=:]8Ge">x_max</field>
+                                                                                                                                          <block type="logic_null" id="!SjW++O0oh^QU(]FB5$#"/>
+                                                                                                                                        </value>
+                                                                                                                                      </block>
+                                                                                                                                    </value>
+                                                                                                                                    <value name="B">
+                                                                                                                                      <block type="logic_compare" id="aX7B2KBJ)s)ba|pbt7pB">
+                                                                                                                                        <field name="OP">NEQ</field>
+                                                                                                                                        <value name="A">
+                                                                                                                                          <block type="variables_get" id="+_/Dc,$asRE]ha^Ka).9">
+                                                                                                                                            <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
                                                                                                                                           </block>
                                                                                                                                         </value>
+                                                                                                                                        <value name="B">
+                                                                                                                                          <block type="logic_null" id="tA?4Q8nb1Np=Ih}SVJbo"/>
+                                                                                                                                        </value>
                                                                                                                                       </block>
                                                                                                                                     </value>
-                                                                                                                                    <statement name="DO2">
-                                                                                                                                      <block type="procedures_callnoreturn" id="oGweCRo;|ZbP%1KR7B]a">
-                                                                                                                                        <mutation name="right">
+                                                                                                                                  </block>
+                                                                                                                                </value>
+                                                                                                                                <statement name="DO2">
+                                                                                                                                  <block type="variables_set" id="zX@s(@}$N7L6cM*{mc:{">
+                                                                                                                                    <field name="VAR" id="vH;^OzJY7dOdepMScU1s">state</field>
+                                                                                                                                    <value name="VALUE">
+                                                                                                                                      <block type="text" id="Zw4*=firw67G(Xw@?.}|">
+                                                                                                                                        <field name="TEXT">NO_BALL_GOAL_RIGHT</field>
+                                                                                                                                      </block>
+                                                                                                                                    </value>
+                                                                                                                                    <next>
+                                                                                                                                      <block type="procedures_callnoreturn" id="Wizmeh4`g4Fgmk1A|sV@">
+                                                                                                                                        <mutation name="left">
                                                                                                                                           <arg name="v"/>
                                                                                                                                           <arg name="ticks"/>
                                                                                                                                         </mutation>
                                                                                                                                         <value name="ARG0">
-                                                                                                                                          <block type="variables_get" id="Vc7Fp*A$WDu^X7t.%1`9">
+                                                                                                                                          <block type="variables_get" id="s+91j;@jAXoyAP!%ls#{">
                                                                                                                                             <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
                                                                                                                                           </block>
                                                                                                                                         </value>
                                                                                                                                         <value name="ARG1">
-                                                                                                                                          <block type="math_round" id="5^^7yxNg{mw+_^(*rmC#">
+                                                                                                                                          <block type="math_round" id="!9XkF[+`Qfl(y.B94[cc">
                                                                                                                                             <field name="OP">ROUND</field>
                                                                                                                                             <field name="DECIMALS">0</field>
                                                                                                                                             <value name="NUM">
-                                                                                                                                              <block type="math_arithmetic" id="eW}|s]3dmm#iEvK%uj/1">
-                                                                                                                                                <field name="OP">MULTIPLY</field>
-                                                                                                                                                <value name="A">
-                                                                                                                                                  <block type="variables_get" id="B}iVX#7NZ$fvR1!YH6@S">
-                                                                                                                                                    <field name="VAR" id="v0BvP7[91TGaMpQG$r0f">goal_width</field>
-                                                                                                                                                  </block>
-                                                                                                                                                </value>
-                                                                                                                                                <value name="B">
-                                                                                                                                                  <block type="math_number" id="(n)Uz^8S1N!C^7@](sJ)">
-                                                                                                                                                    <field name="NUM">0.01</field>
+                                                                                                                                              <block type="math_single" id="gOM#UD(tV-_1Cyz:a;/^">
+                                                                                                                                                <field name="OP">ABS</field>
+                                                                                                                                                <value name="NUM">
+                                                                                                                                                  <block type="math_arithmetic" id="nqa/Wid0hzlziX,(MK#4">
+                                                                                                                                                    <field name="OP">MULTIPLY</field>
+                                                                                                                                                    <value name="A">
+                                                                                                                                                      <block type="variables_get" id="1sebS=sup~V3d9+*a:d=">
+                                                                                                                                                        <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
+                                                                                                                                                      </block>
+                                                                                                                                                    </value>
+                                                                                                                                                    <value name="B">
+                                                                                                                                                      <block type="math_number" id="qoM$8go,0,2xd@dr`hjO">
+                                                                                                                                                        <field name="NUM">0.1</field>
+                                                                                                                                                      </block>
+                                                                                                                                                    </value>
                                                                                                                                                   </block>
                                                                                                                                                 </value>
                                                                                                                                               </block>
@@ -1719,435 +1093,206 @@
                                                                                                                                           </block>
                                                                                                                                         </value>
                                                                                                                                       </block>
-                                                                                                                                    </statement>
-                                                                                                                                    <statement name="ELSE">
-                                                                                                                                      <block type="procedures_callnoreturn" id="txDc~?FC/.mMwB2ftP!t">
-                                                                                                                                        <mutation name="stop"/>
-                                                                                                                                      </block>
-                                                                                                                                    </statement>
-                                                                                                                                  </block>
-                                                                                                                                </next>
-                                                                                                                              </block>
-                                                                                                                            </next>
-                                                                                                                          </block>
-                                                                                                                        </next>
-                                                                                                                      </block>
-                                                                                                                    </statement>
-                                                                                                                    <value name="IF5">
-                                                                                                                      <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">AND</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>
-                                                                                                                                  </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>
-                                                                                                                                  </block>
-                                                                                                                                </value>
-                                                                                                                                <value name="B">
-                                                                                                                                  <block type="logic_null" id="tsl[NONq~[]^~}KRpNQy"/>
-                                                                                                                                </value>
-                                                                                                                              </block>
-                                                                                                                            </value>
-                                                                                                                          </block>
-                                                                                                                        </value>
-                                                                                                                        <value name="B">
-                                                                                                                          <block type="logic_operation" id="w[--Ee4II.j.3yFUzaHC" inline="false">
-                                                                                                                            <field name="OP">AND</field>
-                                                                                                                            <value name="A">
-                                                                                                                              <block type="logic_compare" id="O{Tccxva=xl#e:%Ta#cj">
-                                                                                                                                <field name="OP">NEQ</field>
-                                                                                                                                <value name="A">
-                                                                                                                                  <block type="variables_get" id="XnSX|A;Vc=7XtVTPe;II">
-                                                                                                                                    <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
-                                                                                                                                  </block>
-                                                                                                                                </value>
-                                                                                                                                <value name="B">
-                                                                                                                                  <block type="logic_null" id="fWFBJEE}YZGKJY)tiNyv"/>
-                                                                                                                                </value>
-                                                                                                                              </block>
-                                                                                                                            </value>
-                                                                                                                            <value name="B">
-                                                                                                                              <block type="logic_compare" id="w[W/2lkK6=`$]ikD=RR|">
-                                                                                                                                <field name="OP">EQ</field>
-                                                                                                                                <value name="A">
-                                                                                                                                  <block type="variables_get" id="J-=Q(vP@Rc16*!had-;y">
-                                                                                                                                    <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
-                                                                                                                                  </block>
-                                                                                                                                </value>
-                                                                                                                                <value name="B">
-                                                                                                                                  <block type="logic_null" id="@Is_#Ked]NGd$K2MW-N^"/>
-                                                                                                                                </value>
-                                                                                                                              </block>
-                                                                                                                            </value>
-                                                                                                                          </block>
-                                                                                                                        </value>
-                                                                                                                      </block>
-                                                                                                                    </value>
-                                                                                                                    <statement name="DO5">
-                                                                                                                      <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_GOAL_LEFT</field>
-                                                                                                                          </block>
-                                                                                                                        </value>
-                                                                                                                        <next>
-                                                                                                                          <block type="procedures_callnoreturn" id="U96^i60j(oeYzU8kTgU}">
-                                                                                                                            <mutation name="right">
-                                                                                                                              <arg name="v"/>
-                                                                                                                              <arg name="ticks"/>
-                                                                                                                            </mutation>
-                                                                                                                            <value name="ARG0">
-                                                                                                                              <block type="variables_get" id="NNO?/UcvB5S=//YOQ51j">
-                                                                                                                                <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
-                                                                                                                              </block>
-                                                                                                                            </value>
-                                                                                                                            <value name="ARG1">
-                                                                                                                              <block type="math_round" id=")kbJ+|FY0:`OyFD|5o1n">
-                                                                                                                                <field name="OP">ROUND</field>
-                                                                                                                                <field name="DECIMALS">0</field>
-                                                                                                                                <value name="NUM">
-                                                                                                                                  <block type="math_single" id="w#OguMAoO|^wrS9~m7QM">
-                                                                                                                                    <field name="OP">ABS</field>
-                                                                                                                                    <value name="NUM">
-                                                                                                                                      <block type="math_arithmetic" id="A9MgtS+IiS%Ns7f$JnJ`">
-                                                                                                                                        <field name="OP">MULTIPLY</field>
-                                                                                                                                        <value name="A">
-                                                                                                                                          <block type="variables_get" id="^$$6dKK$Lr7ThLi|d_3y">
-                                                                                                                                            <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
-                                                                                                                                          </block>
-                                                                                                                                        </value>
-                                                                                                                                        <value name="B">
-                                                                                                                                          <block type="math_number" id="=+CXXJ[n-?V=f6zroOtS">
-                                                                                                                                            <field name="NUM">0.1</field>
-                                                                                                                                          </block>
-                                                                                                                                        </value>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                  </block>
-                                                                                                                                </value>
-                                                                                                                              </block>
-                                                                                                                            </value>
-                                                                                                                          </block>
-                                                                                                                        </next>
-                                                                                                                      </block>
-                                                                                                                    </statement>
-                                                                                                                    <value name="IF6">
-                                                                                                                      <block type="logic_operation" id="@A84Nx^IpXz%LCYDf+3a" inline="false">
-                                                                                                                        <field name="OP">AND</field>
-                                                                                                                        <value name="A">
-                                                                                                                          <block type="logic_operation" id="9{.L1,^dK`cx%gkekh((" inline="false">
-                                                                                                                            <field name="OP">AND</field>
-                                                                                                                            <value name="A">
-                                                                                                                              <block type="logic_compare" id="B.4G5j0lpHiK^%Co:jY(">
-                                                                                                                                <field name="OP">EQ</field>
-                                                                                                                                <value name="A">
-                                                                                                                                  <block type="variables_get" id="N|{6x7I=]/-FV.9c}m6;">
-                                                                                                                                    <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
-                                                                                                                                  </block>
-                                                                                                                                </value>
-                                                                                                                                <value name="B">
-                                                                                                                                  <block type="logic_null" id="_]3{l!O7]TQml!/!$`],"/>
-                                                                                                                                </value>
-                                                                                                                              </block>
-                                                                                                                            </value>
-                                                                                                                            <value name="B">
-                                                                                                                              <block type="logic_compare" id="1rtp?f;WQuGueC0!fsF1">
-                                                                                                                                <field name="OP">EQ</field>
-                                                                                                                                <value name="A">
-                                                                                                                                  <block type="variables_get" id="P)7_c}h5-WzhIT2+Sm!3">
-                                                                                                                                    <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
-                                                                                                                                  </block>
-                                                                                                                                </value>
-                                                                                                                                <value name="B">
-                                                                                                                                  <block type="logic_null" id="6|946y1Dt?3;v$m7}3b#"/>
-                                                                                                                                </value>
-                                                                                                                              </block>
-                                                                                                                            </value>
-                                                                                                                          </block>
-                                                                                                                        </value>
-                                                                                                                        <value name="B">
-                                                                                                                          <block type="logic_operation" id="/CB,rxMtGbnS.o4@P$H9" inline="false">
-                                                                                                                            <field name="OP">AND</field>
-                                                                                                                            <value name="A">
-                                                                                                                              <block type="logic_compare" id="5}=h$U=O8]*WCIA_=(9a">
-                                                                                                                                <field name="OP">EQ</field>
-                                                                                                                                <value name="A">
-                                                                                                                                  <block type="variables_get" id="SSnH/1RJv#G9|cl`hYc*">
-                                                                                                                                    <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
-                                                                                                                                  </block>
-                                                                                                                                </value>
-                                                                                                                                <value name="B">
-                                                                                                                                  <block type="logic_null" id="wSe^9aT1?BoFCiEZ)67i"/>
-                                                                                                                                </value>
-                                                                                                                              </block>
-                                                                                                                            </value>
-                                                                                                                            <value name="B">
-                                                                                                                              <block type="logic_compare" id="E}DH@Yb00(X!:w660oS^">
-                                                                                                                                <field name="OP">NEQ</field>
-                                                                                                                                <value name="A">
-                                                                                                                                  <block type="variables_get" id="i@GB;88$3cms~;*_]d*C">
-                                                                                                                                    <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
+                                                                                                                                    </next>
                                                                                                                                   </block>
-                                                                                                                                </value>
-                                                                                                                                <value name="B">
-                                                                                                                                  <block type="logic_null" id="_]zY;9N^B,D_VA;,OV8_"/>
-                                                                                                                                </value>
-                                                                                                                              </block>
-                                                                                                                            </value>
-                                                                                                                          </block>
-                                                                                                                        </value>
-                                                                                                                      </block>
-                                                                                                                    </value>
-                                                                                                                    <statement name="DO6">
-                                                                                                                      <block type="variables_set" id="zX@s(@}$N7L6cM*{mc:{">
-                                                                                                                        <field name="VAR" id="vH;^OzJY7dOdepMScU1s">state</field>
-                                                                                                                        <value name="VALUE">
-                                                                                                                          <block type="text" id="Zw4*=firw67G(Xw@?.}|">
-                                                                                                                            <field name="TEXT">NO_BALL_GOAL_RIGHT</field>
-                                                                                                                          </block>
-                                                                                                                        </value>
-                                                                                                                        <next>
-                                                                                                                          <block type="procedures_callnoreturn" id="Wizmeh4`g4Fgmk1A|sV@">
-                                                                                                                            <mutation name="left">
-                                                                                                                              <arg name="v"/>
-                                                                                                                              <arg name="ticks"/>
-                                                                                                                            </mutation>
-                                                                                                                            <value name="ARG0">
-                                                                                                                              <block type="variables_get" id="s+91j;@jAXoyAP!%ls#{">
-                                                                                                                                <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
-                                                                                                                              </block>
-                                                                                                                            </value>
-                                                                                                                            <value name="ARG1">
-                                                                                                                              <block type="math_round" id="!9XkF[+`Qfl(y.B94[cc">
-                                                                                                                                <field name="OP">ROUND</field>
-                                                                                                                                <field name="DECIMALS">0</field>
-                                                                                                                                <value name="NUM">
-                                                                                                                                  <block type="math_single" id="gOM#UD(tV-_1Cyz:a;/^">
-                                                                                                                                    <field name="OP">ABS</field>
-                                                                                                                                    <value name="NUM">
-                                                                                                                                      <block type="math_arithmetic" id="nqa/Wid0hzlziX,(MK#4">
-                                                                                                                                        <field name="OP">MULTIPLY</field>
-                                                                                                                                        <value name="A">
-                                                                                                                                          <block type="variables_get" id="1sebS=sup~V3d9+*a:d=">
-                                                                                                                                            <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
-                                                                                                                                          </block>
-                                                                                                                                        </value>
-                                                                                                                                        <value name="B">
-                                                                                                                                          <block type="math_number" id="qoM$8go,0,2xd@dr`hjO">
-                                                                                                                                            <field name="NUM">0.1</field>
-                                                                                                                                          </block>
-                                                                                                                                        </value>
+                                                                                                                                </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>
                                                                                                                                   </block>
-                                                                                                                                </value>
-                                                                                                                              </block>
-                                                                                                                            </value>
-                                                                                                                          </block>
-                                                                                                                        </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>
-                                                                                                                        <next>
-                                                                                                                          <block type="procedures_callnoreturn" id="_X-|0l5pe^4k**|RuSSZ" inline="true">
-                                                                                                                            <mutation name="search_ball_rot">
-                                                                                                                              <arg name="v"/>
-                                                                                                                            </mutation>
-                                                                                                                            <value name="ARG0">
-                                                                                                                              <block type="variables_get" id="q9XrN{.:T$USmI[ZR79Q">
-                                                                                                                                <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
-                                                                                                                              </block>
-                                                                                                                            </value>
-                                                                                                                          </block>
-                                                                                                                        </next>
-                                                                                                                      </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>
-                                                                                                                        <value name="value">
-                                                                                                                          <shadow type="text">
-                                                                                                                            <field name="TEXT">abc</field>
-                                                                                                                          </shadow>
-                                                                                                                          <block type="text_format" id="xXJlH+s%1,D1WcfOkt#6">
-                                                                                                                            <mutation items="4"/>
-                                                                                                                            <value name="value">
-                                                                                                                              <shadow type="text" id=":(AhX7mg_fQeOGz*xR@g">
-                                                                                                                                <field name="TEXT">x:{}, {}, p:{}, w:{}</field>
-                                                                                                                              </shadow>
-                                                                                                                            </value>
-                                                                                                                            <value name="ADD0">
-                                                                                                                              <block type="variables_get" id="ppSdz+]@cvkJ)r-5HdD^">
-                                                                                                                                <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
-                                                                                                                              </block>
-                                                                                                                            </value>
-                                                                                                                            <value name="ADD1">
-                                                                                                                              <block type="variables_get" id="^dcWdBa0xHuSF#~S44{U">
-                                                                                                                                <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
-                                                                                                                              </block>
-                                                                                                                            </value>
-                                                                                                                            <value name="ADD2">
-                                                                                                                              <block type="variables_get" id="#`/5m819@:#HS;yIM[b0">
-                                                                                                                                <field name="VAR" id="{]]L-TSC^#XtGnVinxf[">pos_goal_both</field>
-                                                                                                                              </block>
-                                                                                                                            </value>
-                                                                                                                            <value name="ADD3">
-                                                                                                                              <block type="variables_get" id="FtuJ6v[UEy/YEuJ3qlsr">
-                                                                                                                                <field name="VAR" id="v0BvP7[91TGaMpQG$r0f">goal_width</field>
+                                                                                                                                </statement>
                                                                                                                               </block>
-                                                                                                                            </value>
+                                                                                                                            </statement>
                                                                                                                           </block>
-                                                                                                                        </value>
+                                                                                                                        </statement>
                                                                                                                         <next>
-                                                                                                                          <block type="display_set_label_text" id="Fn{?O{el^_@qD+)BLOev">
-                                                                                                                            <field name="instance_name">txt_label_counters</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="XRX)WXoaE,9N}4t?YAI#">
-                                                                                                                                <mutation items="1"/>
+                                                                                                                              <block type="text_format" id="bMzX7EzL+}J^dowK5pv|">
+                                                                                                                                <mutation items="2"/>
                                                                                                                                 <value name="value">
-                                                                                                                                  <shadow type="text" id="UlS|}~2{uOl01S@(ahiE">
-                                                                                                                                    <field name="TEXT">{}</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="XdyZ*L#*0E`A`0/3UYf~">
-                                                                                                                                    <field name="VAR" id="5@U(%o_ghQ1;jiB#odH8">counters</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="10"/>
+                                                                                                                                  <block type="text_format" id="xXJlH+s%1,D1WcfOkt#6">
+                                                                                                                                    <mutation items="6"/>
                                                                                                                                     <value name="value">
-                                                                                                                                      <shadow type="text" id="a{L7ErJR}=Flx|}3~+X4">
-                                                                                                                                        <field name="TEXT">{}:{}  GOAL_x: {}, {}, p:{}, w:{} BALL_pos:{},{} v_x:{} v_y:{}</field>
+                                                                                                                                      <shadow type="text" id=":(AhX7mg_fQeOGz*xR@g">
+                                                                                                                                        <field name="TEXT">left:{} {}, right:{} {}, p:{}, w:{}</field>
                                                                                                                                       </shadow>
                                                                                                                                     </value>
                                                                                                                                     <value name="ADD0">
-                                                                                                                                      <block type="variables_get" id="UGc[vu*b~9D^!p.3?7mo">
-                                                                                                                                        <field name="VAR" id="vH;^OzJY7dOdepMScU1s">state</field>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                    <value name="ADD1">
-                                                                                                                                      <block type="variables_get" id="wVt[k#I:X+:T`RVkRf]K">
-                                                                                                                                        <field name="VAR" id="fPH`.@]riH+=v{,A)bP5">cmd</field>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                    <value name="ADD2">
-                                                                                                                                      <block type="variables_get" id="+?O{K7(C)vw`Y6!T4L(o">
+                                                                                                                                      <block type="variables_get" id="ppSdz+]@cvkJ)r-5HdD^">
                                                                                                                                         <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
                                                                                                                                       </block>
                                                                                                                                     </value>
-                                                                                                                                    <value name="ADD3">
-                                                                                                                                      <block type="variables_get" id="/(B3zJewppd~EofXj-kV">
-                                                                                                                                        <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                    <value name="ADD4">
-                                                                                                                                      <block type="variables_get" id="u$4~ei085+j]JF61p!Kz">
-                                                                                                                                        <field name="VAR" id="{]]L-TSC^#XtGnVinxf[">pos_goal_both</field>
-                                                                                                                                      </block>
-                                                                                                                                    </value>
-                                                                                                                                    <value name="ADD5">
-                                                                                                                                      <block type="variables_get" id="#umK_pdUK0;[tcAYO_7s">
-                                                                                                                                        <field name="VAR" id="v0BvP7[91TGaMpQG$r0f">goal_width</field>
+                                                                                                                                    <value name="ADD1">
+                                                                                                                                      <block type="variables_get" id="Fe?~n3W$cZh6_K]^Dsyx">
+                                                                                                                                        <field name="VAR" id="a8;eFhj+gj?)7exUyU;p">posy_goal_left</field>
                                                                                                                                       </block>
                                                                                                                                     </value>
-                                                                                                                                    <value name="ADD6">
-                                                                                                                                      <block type="variables_get" id="sPxj5C*ZzYUH*$WCe4|q">
-                                                                                                                                        <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                                                    <value name="ADD2">
+                                                                                                                                      <block type="variables_get" id="^dcWdBa0xHuSF#~S44{U">
+                                                                                                                                        <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
                                                                                                                                       </block>
                                                                                                                                     </value>
-                                                                                                                                    <value name="ADD7">
-                                                                                                                                      <block type="variables_get" id="~vY0WPr#jWq#SxvDb1@n">
-                                                                                                                                        <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                                                                                                                                    <value name="ADD3">
+                                                                                                                                      <block type="variables_get" id="kuo|)Aebqd#k+PebfFA^">
+                                                                                                                                        <field name="VAR" id="+j/X+RCIMajR28(u#7DG">posy_goal_right</field>
                                                                                                                                       </block>
                                                                                                                                     </value>
-                                                                                                                                    <value name="ADD8">
-                                                                                                                                      <block type="variables_get" id="r!O8lsSDk:Xs*=-;)LRu">
-                                                                                                                                        <field name="VAR" id="O=Lc:FQ[]f3iuM/V@.mv">v_var_ball_xpos</field>
+                                                                                                                                    <value name="ADD4">
+                                                                                                                                      <block type="variables_get" id="#`/5m819@:#HS;yIM[b0">
+                                                                                                                                        <field name="VAR" id="{]]L-TSC^#XtGnVinxf[">posx_goal_both</field>
                                                                                                                                       </block>
                                                                                                                                     </value>
-                                                                                                                                    <value name="ADD9">
-                                                                                                                                      <block type="variables_get" id="`fG05b:bzq8[q?bquCg6">
-                                                                                                                                        <field name="VAR" id=";S3?%3)**s[[l~Aq3*,{">v_var_ball_ypos</field>
+                                                                                                                                    <value name="ADD5">
+                                                                                                                                      <block type="variables_get" id="FtuJ6v[UEy/YEuJ3qlsr">
+                                                                                                                                        <field name="VAR" id="v0BvP7[91TGaMpQG$r0f">goal_width</field>
                                                                                                                                       </block>
                                                                                                                                     </value>
                                                                                                                                   </block>
                                                                                                                                 </value>
                                                                                                                                 <next>
-                                                                                                                                  <block type="procedures_callnoreturn" id="O6U,(~H4n-^0fP^x)_,{">
-                                                                                                                                    <mutation name="checkTimeouts"/>
-                                                                                                                                    <next>
-                                                                                                                                      <block type="util_wait_for" id="U4XL;U0gG@tD~]*kp|L{">
-                                                                                                                                        <field name="format">ms</field>
+                                                                                                                                  <block type="display_set_label_text" id="Fn{?O{el^_@qD+)BLOev">
+                                                                                                                                    <field name="instance_name">txt_label_counters</field>
+                                                                                                                                    <value name="value">
+                                                                                                                                      <shadow type="text">
+                                                                                                                                        <field name="TEXT">abc</field>
+                                                                                                                                      </shadow>
+                                                                                                                                      <block type="text_format" id="XRX)WXoaE,9N}4t?YAI#">
+                                                                                                                                        <mutation items="1"/>
                                                                                                                                         <value name="value">
-                                                                                                                                          <shadow type="math_number" id="E9K@*OZ(Ftp5CGt}.9cT">
-                                                                                                                                            <field name="NUM">80</field>
+                                                                                                                                          <shadow type="text" id="UlS|}~2{uOl01S@(ahiE">
+                                                                                                                                            <field name="TEXT">{}</field>
+                                                                                                                                          </shadow>
+                                                                                                                                        </value>
+                                                                                                                                        <value name="ADD0">
+                                                                                                                                          <block type="variables_get" id="XdyZ*L#*0E`A`0/3UYf~">
+                                                                                                                                            <field name="VAR" id="5@U(%o_ghQ1;jiB#odH8">counters</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"/>
                                                                                                                                           </shadow>
+                                                                                                                                          <block type="text_format" id="mB*d7.SSna@S_Ds5Y4[o">
+                                                                                                                                            <mutation items="12"/>
+                                                                                                                                            <value name="value">
+                                                                                                                                              <shadow type="text" id="a{L7ErJR}=Flx|}3~+X4">
+                                                                                                                                                <field name="TEXT">{}:{}  GOAL left: {} {}, right:{} {}, p:{}, w:{} BALL_pos:{},{} v_x:{} v_y:{}</field>
+                                                                                                                                              </shadow>
+                                                                                                                                            </value>
+                                                                                                                                            <value name="ADD0">
+                                                                                                                                              <block type="variables_get" id="UGc[vu*b~9D^!p.3?7mo">
+                                                                                                                                                <field name="VAR" id="vH;^OzJY7dOdepMScU1s">state</field>
+                                                                                                                                              </block>
+                                                                                                                                            </value>
+                                                                                                                                            <value name="ADD1">
+                                                                                                                                              <block type="variables_get" id="wVt[k#I:X+:T`RVkRf]K">
+                                                                                                                                                <field name="VAR" id="fPH`.@]riH+=v{,A)bP5">cmd</field>
+                                                                                                                                              </block>
+                                                                                                                                            </value>
+                                                                                                                                            <value name="ADD2">
+                                                                                                                                              <block type="variables_get" id="+?O{K7(C)vw`Y6!T4L(o">
+                                                                                                                                                <field name="VAR" id="=2ARo+;2DS07SU~j29Fk">posx_goal_left</field>
+                                                                                                                                              </block>
+                                                                                                                                            </value>
+                                                                                                                                            <value name="ADD3">
+                                                                                                                                              <block type="variables_get" id="kiYnqn=QqrO`bh^F{AQ#">
+                                                                                                                                                <field name="VAR" id="a8;eFhj+gj?)7exUyU;p">posy_goal_left</field>
+                                                                                                                                              </block>
+                                                                                                                                            </value>
+                                                                                                                                            <value name="ADD4">
+                                                                                                                                              <block type="variables_get" id="/(B3zJewppd~EofXj-kV">
+                                                                                                                                                <field name="VAR" id="7Tp~7_.qfmJN0SR]5p}F">posx_goal_right</field>
+                                                                                                                                              </block>
+                                                                                                                                            </value>
+                                                                                                                                            <value name="ADD5">
+                                                                                                                                              <block type="variables_get" id=",3+x;7D(bN-41WySQn.v">
+                                                                                                                                                <field name="VAR" id="+j/X+RCIMajR28(u#7DG">posy_goal_right</field>
+                                                                                                                                              </block>
+                                                                                                                                            </value>
+                                                                                                                                            <value name="ADD6">
+                                                                                                                                              <block type="variables_get" id="u$4~ei085+j]JF61p!Kz">
+                                                                                                                                                <field name="VAR" id="{]]L-TSC^#XtGnVinxf[">posx_goal_both</field>
+                                                                                                                                              </block>
+                                                                                                                                            </value>
+                                                                                                                                            <value name="ADD7">
+                                                                                                                                              <block type="variables_get" id="#umK_pdUK0;[tcAYO_7s">
+                                                                                                                                                <field name="VAR" id="v0BvP7[91TGaMpQG$r0f">goal_width</field>
+                                                                                                                                              </block>
+                                                                                                                                            </value>
+                                                                                                                                            <value name="ADD8">
+                                                                                                                                              <block type="variables_get" id="sPxj5C*ZzYUH*$WCe4|q">
+                                                                                                                                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                                                                                                                                              </block>
+                                                                                                                                            </value>
+                                                                                                                                            <value name="ADD9">
+                                                                                                                                              <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="ADD10">
+                                                                                                                                              <block type="variables_get" id="r!O8lsSDk:Xs*=-;)LRu">
+                                                                                                                                                <field name="VAR" id="O=Lc:FQ[]f3iuM/V@.mv">v_var_ball_xpos</field>
+                                                                                                                                              </block>
+                                                                                                                                            </value>
+                                                                                                                                            <value name="ADD11">
+                                                                                                                                              <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>
+                                                                                                                                        <next>
+                                                                                                                                          <block type="procedures_callnoreturn" id="O6U,(~H4n-^0fP^x)_,{">
+                                                                                                                                            <mutation name="checkTimeouts"/>
+                                                                                                                                            <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">80</field>
+                                                                                                                                                  </shadow>
+                                                                                                                                                </value>
+                                                                                                                                              </block>
+                                                                                                                                            </next>
+                                                                                                                                          </block>
+                                                                                                                                        </next>
                                                                                                                                       </block>
                                                                                                                                     </next>
                                                                                                                                   </block>
@@ -2157,11 +1302,11 @@
                                                                                                                           </block>
                                                                                                                         </next>
                                                                                                                       </block>
-                                                                                                                    </next>
+                                                                                                                    </statement>
                                                                                                                   </block>
                                                                                                                 </next>
                                                                                                               </block>
-                                                                                                            </statement>
+                                                                                                            </next>
                                                                                                           </block>
                                                                                                         </next>
                                                                                                       </block>
@@ -2215,7 +1360,345 @@
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="N2EC5uK:$~0ERXAdK0!y" x="0" y="6703">
+  <block type="procedures_defnoreturn" id="BJV|hZc!#JXq:io7MmM`" x="0" y="4281">
+    <field name="NAME">stepBall</field>
+    <statement name="STACK">
+      <block type="variables_set" id=".tHpZ}-+@nb7zjqP7C^#">
+        <field name="VAR" id="vH;^OzJY7dOdepMScU1s">state</field>
+        <value name="VALUE">
+          <block type="text" id=",nfiz@ECfk0tQ6B?M$;.">
+            <field name="TEXT">stepBall</field>
+          </block>
+        </value>
+        <next>
+          <block type="controls_if" id="~2]YNjvaC#TjWjq1umt`">
+            <mutation elseif="2"/>
+            <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="#7@$9Gz4rn?uePi|!w5H">
+                <mutation name="left">
+                  <arg name="v"/>
+                  <arg name="ticks"/>
+                </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>
+                <value name="ARG1">
+                  <block type="math_round" id="HlNcRe2g^cx]xGJzkq9a">
+                    <field name="OP">ROUND</field>
+                    <field name="DECIMALS">0</field>
+                    <value name="NUM">
+                      <block type="math_arithmetic" id="hYC$h9LnV_XesUB4RVb8">
+                        <field name="OP">MULTIPLY</field>
+                        <value name="A">
+                          <block type="math_single" id="}(49w@smA}1HE9MNaJLw">
+                            <field name="OP">ABS</field>
+                            <value name="NUM">
+                              <block type="variables_get" id="+se(4FE;QgXJ@?.]xm_G">
+                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                              </block>
+                            </value>
+                          </block>
+                        </value>
+                        <value name="B">
+                          <block type="math_number" id="7Uy;@k^^.U]7oteQb]9@">
+                            <field name="NUM">0.07</field>
+                          </block>
+                        </value>
+                      </block>
+                    </value>
+                  </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>
+              </block>
+            </value>
+            <statement name="DO1">
+              <block type="procedures_callnoreturn" id="Do:{V-Htoxi(Ky;5q%7)">
+                <mutation name="right">
+                  <arg name="v"/>
+                  <arg name="ticks"/>
+                </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>
+                <value name="ARG1">
+                  <block type="math_round" id="9w?6fcB$g~RycjY{`7ER">
+                    <field name="OP">ROUND</field>
+                    <field name="DECIMALS">0</field>
+                    <value name="NUM">
+                      <block type="math_arithmetic" id="EmeRL7tak./N9g?B@nFs">
+                        <field name="OP">MULTIPLY</field>
+                        <value name="A">
+                          <block type="math_single" id="Z;6k/2E9P61Kc-hmsE6]">
+                            <field name="OP">ABS</field>
+                            <value name="NUM">
+                              <block type="variables_get" id="($1]A%(r+nV+-me@mi{*">
+                                <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                              </block>
+                            </value>
+                          </block>
+                        </value>
+                        <value name="B">
+                          <block type="math_number" id="toF?^MGpT%1d?VxiFuEP">
+                            <field name="NUM">0.07</field>
+                          </block>
+                        </value>
+                      </block>
+                    </value>
+                  </block>
+                </value>
+              </block>
+            </statement>
+            <value name="IF2">
+              <block type="logic_operation" id="^asrJKsemc}^7|@CcyFs" inline="false">
+                <field name="OP">AND</field>
+                <value name="A">
+                  <block type="logic_compare" id="TwsU8jOZc$*pZ+:EbKo8">
+                    <field name="OP">GTE</field>
+                    <value name="A">
+                      <block type="variables_get" id="0Ipt`Bjn]B09@rni:!Bt">
+                        <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                      </block>
+                    </value>
+                    <value name="B">
+                      <block type="variables_get" id="Y{MczN`(?*Y74i0iF|bh">
+                        <field name="VAR" id="Ym/+Qo0YZe25;%N1d!*f">x_min</field>
+                      </block>
+                    </value>
+                  </block>
+                </value>
+                <value name="B">
+                  <block type="logic_compare" id="s:+dT(r%}]H#_Y~wHeTE">
+                    <field name="OP">LTE</field>
+                    <value name="A">
+                      <block type="variables_get" id="mW,P#kP}6gH1+ZmkJ/L8">
+                        <field name="VAR" id="S4.mduNQC(va3iR{oSdB">posx_ball</field>
+                      </block>
+                    </value>
+                    <value name="B">
+                      <block type="variables_get" id="8:8~qf8*mh3[Jhzmk^A%">
+                        <field name="VAR" id="2G]XEQ3Lhl$dG]=:]8Ge">x_max</field>
+                      </block>
+                    </value>
+                  </block>
+                </value>
+              </block>
+            </value>
+            <statement name="DO2">
+              <block type="controls_if" id="Bp.|BTULdy(,]aAoN,l[">
+                <mutation elseif="3" 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>
+                <statement name="DO0">
+                  <block type="procedures_callnoreturn" id="D$_8aQ2X|h{SIewjUD_R">
+                    <mutation name="fwd">
+                      <arg name="v"/>
+                      <arg name="ticks"/>
+                    </mutation>
+                    <value name="ARG0">
+                      <block type="variables_get" id="Y]2FiJdrWo42L$WHl,($">
+                        <field name="VAR" id="1idj3sw*{G$j`2:II{^5">v_fast</field>
+                      </block>
+                    </value>
+                    <value name="ARG1">
+                      <block type="math_number" id="K``m#vm=PeC;2HJxr=Jx">
+                        <field name="NUM">10</field>
+                      </block>
+                    </value>
+                  </block>
+                </statement>
+                <value name="IF1">
+                  <block type="logic_operation" id=".cYqj,XlTza-:6y_=EOC" inline="false">
+                    <field name="OP">AND</field>
+                    <value name="A">
+                      <block type="logic_compare" id="#%BG`,J51l+POEj{Q4Vj">
+                        <field name="OP">GT</field>
+                        <value name="A">
+                          <block type="variables_get" id="KDP(VY1Jh?W1cz~WWh=,">
+                            <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                          </block>
+                        </value>
+                        <value name="B">
+                          <block type="variables_get" id="L/RedQ[=!jNwBI,ivSt/">
+                            <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="!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="DO1">
+                  <block type="procedures_callnoreturn" id="~M+5pWsaHLkyCq)rYO$k">
+                    <mutation name="fwd">
+                      <arg name="v"/>
+                      <arg name="ticks"/>
+                    </mutation>
+                    <value name="ARG0">
+                      <block type="variables_get" id="iXjkVkHFgqS:.%6Q=Z_f">
+                        <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                      </block>
+                    </value>
+                    <value name="ARG1">
+                      <block type="math_number" id="m]yorgh~PALhYi-x%]93">
+                        <field name="NUM">5</field>
+                      </block>
+                    </value>
+                  </block>
+                </statement>
+                <value name="IF2">
+                  <block type="logic_operation" id=":2kiZ:)l/(drayLhwske" inline="false">
+                    <field name="OP">AND</field>
+                    <value name="A">
+                      <block type="logic_compare" id="dKOwmYr|Z6CW(+u8.a:w">
+                        <field name="OP">GT</field>
+                        <value name="A">
+                          <block type="variables_get" id="_PZg0?|Eka9OOdKCVIhZ">
+                            <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                          </block>
+                        </value>
+                        <value name="B">
+                          <block type="variables_get" id=".5Q?xw/;CtWi-HzsEBhp">
+                            <field name="VAR" id="09n]XF2CKURQs)nHOfam">y_ball_near</field>
+                          </block>
+                        </value>
+                      </block>
+                    </value>
+                    <value name="B">
+                      <block type="logic_compare" id="({,ER8#k!G3+tpPl645Q">
+                        <field name="OP">LTE</field>
+                        <value name="A">
+                          <block type="variables_get" id="QB39f^ga_-f?bwb+!.8X">
+                            <field name="VAR" id="q#H`+Gwt~43Dh@fu;G-D">posy_ball</field>
+                          </block>
+                        </value>
+                        <value name="B">
+                          <block type="variables_get" id="qkncjacBYB1~0@aF1Q[x">
+                            <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="5?xr%Un4{ZZP/*kbTrS4">
+                    <mutation name="turnSideLeft">
+                      <arg name="v"/>
+                      <arg name="ticks"/>
+                    </mutation>
+                    <value name="ARG0">
+                      <block type="variables_get" id="zX7$-2rcp(Tan$g?Z%[U">
+                        <field name="VAR" id="1idj3sw*{G$j`2:II{^5">v_fast</field>
+                      </block>
+                    </value>
+                    <value name="ARG1">
+                      <block type="math_number" id="2xa_b^blTx3j,Xt)H#5}">
+                        <field name="NUM">20</field>
+                      </block>
+                    </value>
+                  </block>
+                </statement>
+                <value name="IF3">
+                  <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>
+                <statement name="DO3">
+                  <block type="procedures_callnoreturn" id="iE.eGjQ64)ne8c#zdVbM">
+                    <mutation name="bwd">
+                      <arg name="v"/>
+                      <arg name="ticks"/>
+                    </mutation>
+                    <value name="ARG0">
+                      <block type="variables_get" id="[3C}+lMgr=zfSwjcYdsJ">
+                        <field name="VAR" id=")rK_fR,m=]b(j[{.CtBj">v_slow</field>
+                      </block>
+                    </value>
+                    <value name="ARG1">
+                      <block type="math_number" id="CWASv61O4meIid@gp|5P">
+                        <field name="NUM">5</field>
+                      </block>
+                    </value>
+                  </block>
+                </statement>
+              </block>
+            </statement>
+          </block>
+        </next>
+      </block>
+    </statement>
+  </block>
+  <block type="procedures_defnoreturn" id="N2EC5uK:$~0ERXAdK0!y" x="0" y="5376">
     <field name="NAME">checkTimeouts</field>
     <statement name="STACK">
       <block type="controls_if" id="o.;j7*F0}TW}ju0E18(_">
@@ -2337,7 +1820,7 @@
       </block>
     </statement>
   </block>
-  <block type="camera_on_ball_detected" id="dgC*A|KHMC_R5S#ZRk}d" x="0" y="7136">
+  <block type="camera_on_ball_detected" id="dgC*A|KHMC_R5S#ZRk}d" x="0" y="5809">
     <field name="instance_name">ball_detector</field>
     <statement name="statement">
       <block type="variables_set" id="=2/,IQfcLO{_5PNd3UK~">
@@ -2538,7 +2021,7 @@
       </block>
     </statement>
   </block>
-  <block type="camera_on_ball_detected" id="Rg2Gt(0WT:J2|Us~[j.3" x="0" y="7803">
+  <block type="camera_on_ball_detected" id="Rg2Gt(0WT:J2|Us~[j.3" x="0" y="6476">
     <field name="instance_name">ball_detector_goal_left</field>
     <statement name="statement">
       <block type="variables_set" id="kvK,D4e%04[?+!jq*Lch">
@@ -2560,45 +2043,58 @@
               </block>
             </value>
             <next>
-              <block type="controls_if" id="nxYMxA/BU%!6NBBUR2cH">
-                <value name="IF0">
-                  <block type="logic_boolean" id="VP{|qMim2(s!C23]V~1A">
-                    <field name="BOOL">FALSE</field>
+              <block type="variables_set" id="5HIj/[Q%C5ryV/yyIv:n">
+                <field name="VAR" id="a8;eFhj+gj?)7exUyU;p">posy_goal_left</field>
+                <value name="VALUE">
+                  <block type="camera_ball_get_value" id="iSuFx:%G8RrafS{x5pZ4">
+                    <field name="dropdown_event">y</field>
+                    <value name="instance_name">
+                      <shadow type="camera_detection_event" id="xP1IyWVEW_7Vdu``HK7e"/>
+                    </value>
                   </block>
                 </value>
-                <statement name="DO0">
-                  <block type="text_print" id="pRGkR~HGW:+!/Ls,ueY}">
-                    <value name="TEXT">
-                      <shadow type="text">
-                        <field name="TEXT"/>
-                      </shadow>
-                      <block type="text_format" id="o]il@/;)K@URUswz3ur=">
-                        <mutation items="2"/>
-                        <value name="value">
-                          <shadow type="text" id="rn8gG`@nHnj8?V~]/`8Z">
-                            <field name="TEXT">goal left: posx:{} posy:{}</field>
+                <next>
+                  <block type="controls_if" id="nxYMxA/BU%!6NBBUR2cH">
+                    <value name="IF0">
+                      <block type="logic_boolean" id="VP{|qMim2(s!C23]V~1A">
+                        <field name="BOOL">FALSE</field>
+                      </block>
+                    </value>
+                    <statement name="DO0">
+                      <block type="text_print" id="pRGkR~HGW:+!/Ls,ueY}">
+                        <value name="TEXT">
+                          <shadow type="text">
+                            <field name="TEXT"/>
                           </shadow>
-                        </value>
-                        <value name="ADD0">
-                          <block type="camera_ball_get_value" id="dQPs|JB?,oM9RM$!:}gA">
-                            <field name="dropdown_event">x</field>
-                            <value name="instance_name">
-                              <shadow type="camera_detection_event" id="OZ3kH~IF#i]:%pGpbDBj"/>
+                          <block type="text_format" id="o]il@/;)K@URUswz3ur=">
+                            <mutation items="2"/>
+                            <value name="value">
+                              <shadow type="text" id="rn8gG`@nHnj8?V~]/`8Z">
+                                <field name="TEXT">goal left: posx:{} posy:{}</field>
+                              </shadow>
                             </value>
-                          </block>
-                        </value>
-                        <value name="ADD1">
-                          <block type="camera_ball_get_value" id="}%|u0lSMt.@-GDS2piU8">
-                            <field name="dropdown_event">y</field>
-                            <value name="instance_name">
-                              <shadow type="camera_detection_event" id="(efF42~rdQ,u^GZ]K/3Q"/>
+                            <value name="ADD0">
+                              <block type="camera_ball_get_value" id="dQPs|JB?,oM9RM$!:}gA">
+                                <field name="dropdown_event">x</field>
+                                <value name="instance_name">
+                                  <shadow type="camera_detection_event" id="OZ3kH~IF#i]:%pGpbDBj"/>
+                                </value>
+                              </block>
+                            </value>
+                            <value name="ADD1">
+                              <block type="camera_ball_get_value" id="}%|u0lSMt.@-GDS2piU8">
+                                <field name="dropdown_event">y</field>
+                                <value name="instance_name">
+                                  <shadow type="camera_detection_event" id="(efF42~rdQ,u^GZ]K/3Q"/>
+                                </value>
+                              </block>
                             </value>
                           </block>
                         </value>
                       </block>
-                    </value>
+                    </statement>
                   </block>
-                </statement>
+                </next>
               </block>
             </next>
           </block>
@@ -2606,7 +2102,7 @@
       </block>
     </statement>
   </block>
-  <block type="camera_on_ball_detected" id="(?slhGsN^:d1`vP{j9#|" x="0" y="8096">
+  <block type="camera_on_ball_detected" id="(?slhGsN^:d1`vP{j9#|" x="0" y="6807">
     <field name="instance_name">ball_detector_goal_right</field>
     <statement name="statement">
       <block type="variables_set" id="0!1?#@4|tcM8+U6E[$Tl">
@@ -2628,45 +2124,58 @@
               </block>
             </value>
             <next>
-              <block type="controls_if" id="i.[Ryx%b6A^=xnE[Xx$A">
-                <value name="IF0">
-                  <block type="logic_boolean" id="aA:DS!?msA@zHkOczhXx">
-                    <field name="BOOL">FALSE</field>
+              <block type="variables_set" id="BYS#w6:;+pl%{53Ars)Q">
+                <field name="VAR" id="+j/X+RCIMajR28(u#7DG">posy_goal_right</field>
+                <value name="VALUE">
+                  <block type="camera_ball_get_value" id="is3|Br#a[AzHssi~k~h)">
+                    <field name="dropdown_event">y</field>
+                    <value name="instance_name">
+                      <shadow type="camera_detection_event" id="@EQ?XR0YLPash^Fk=8c}"/>
+                    </value>
                   </block>
                 </value>
-                <statement name="DO0">
-                  <block type="text_print" id="q2(^p4SyTCB3V9x$qufL">
-                    <value name="TEXT">
-                      <shadow type="text">
-                        <field name="TEXT"/>
-                      </shadow>
-                      <block type="text_format" id="pcQS07Q^!C|~pVid{}Ev">
-                        <mutation items="2"/>
-                        <value name="value">
-                          <shadow type="text" id="hWEmmvBo)?2YN$R3?}1C">
-                            <field name="TEXT">goal right: posx:{} posy:{}</field>
+                <next>
+                  <block type="controls_if" id="i.[Ryx%b6A^=xnE[Xx$A">
+                    <value name="IF0">
+                      <block type="logic_boolean" id="aA:DS!?msA@zHkOczhXx">
+                        <field name="BOOL">FALSE</field>
+                      </block>
+                    </value>
+                    <statement name="DO0">
+                      <block type="text_print" id="q2(^p4SyTCB3V9x$qufL">
+                        <value name="TEXT">
+                          <shadow type="text">
+                            <field name="TEXT"/>
                           </shadow>
-                        </value>
-                        <value name="ADD0">
-                          <block type="camera_ball_get_value" id="oYhV*54ObZ(bGW#uT|FB">
-                            <field name="dropdown_event">x</field>
-                            <value name="instance_name">
-                              <shadow type="camera_detection_event" id="*^dJE~J_!XF_5.jU]mhZ"/>
+                          <block type="text_format" id="pcQS07Q^!C|~pVid{}Ev">
+                            <mutation items="2"/>
+                            <value name="value">
+                              <shadow type="text" id="hWEmmvBo)?2YN$R3?}1C">
+                                <field name="TEXT">goal right: posx:{} posy:{}</field>
+                              </shadow>
                             </value>
-                          </block>
-                        </value>
-                        <value name="ADD1">
-                          <block type="camera_ball_get_value" id="_L:jweTen.9z!a~w#+bl">
-                            <field name="dropdown_event">y</field>
-                            <value name="instance_name">
-                              <shadow type="camera_detection_event" id="qo7;3$`+qC4Qpg/`.~+W"/>
+                            <value name="ADD0">
+                              <block type="camera_ball_get_value" id="oYhV*54ObZ(bGW#uT|FB">
+                                <field name="dropdown_event">x</field>
+                                <value name="instance_name">
+                                  <shadow type="camera_detection_event" id="*^dJE~J_!XF_5.jU]mhZ"/>
+                                </value>
+                              </block>
+                            </value>
+                            <value name="ADD1">
+                              <block type="camera_ball_get_value" id="_L:jweTen.9z!a~w#+bl">
+                                <field name="dropdown_event">y</field>
+                                <value name="instance_name">
+                                  <shadow type="camera_detection_event" id="qo7;3$`+qC4Qpg/`.~+W"/>
+                                </value>
+                              </block>
                             </value>
                           </block>
                         </value>
                       </block>
-                    </value>
+                    </statement>
                   </block>
-                </statement>
+                </next>
               </block>
             </next>
           </block>
@@ -2674,7 +2183,7 @@
       </block>
     </statement>
   </block>
-  <block type="counter_event" id="T^aHOKaV|bU#ZeZfn[GJ" x="0" y="8389">
+  <block type="counter_event" id="T^aHOKaV|bU#ZeZfn[GJ" x="0" y="7138">
     <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>
@@ -2722,7 +2231,7 @@
       </block>
     </statement>
   </block>
-  <block type="counter_event" id="7wA~J+BkZ5~nV6aI|fLZ" x="0" y="8536">
+  <block type="counter_event" id="7wA~J+BkZ5~nV6aI|fLZ" x="0" y="7285">
     <value name="condition">
       <shadow type="counter_if_value" id="RDF|2PoXWvG^_k{FB37U">
         <field name="instance_name">TXT_M_C2_motor_step_counter</field>
@@ -2770,7 +2279,7 @@
       </block>
     </statement>
   </block>
-  <block type="counter_event" id="Nv;e.HwUkTK/=(qEs~82" x="0" y="8683">
+  <block type="counter_event" id="Nv;e.HwUkTK/=(qEs~82" x="0" y="7432">
     <value name="condition">
       <shadow type="counter_if_value" id="05ihu;VYh*tmqA78pJQL">
         <field name="instance_name">TXT_M_C3_motor_step_counter</field>
@@ -2818,7 +2327,7 @@
       </block>
     </statement>
   </block>
-  <block type="counter_event" id="j|Pz^uHewb7]si9}3az3" x="0" y="8830">
+  <block type="counter_event" id="j|Pz^uHewb7]si9}3az3" x="0" y="7579">
     <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>
@@ -2866,7 +2375,7 @@
       </block>
     </statement>
   </block>
-  <block type="input_event" id="j(TuhJ0G}{^qGSq:26FY" x="0" y="8977">
+  <block type="input_event" id="j(TuhJ0G}{^qGSq:26FY" x="0" y="7726">
     <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>
@@ -2889,7 +2398,7 @@
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="RyK*td9aN5aR;@gw4f)+" x="0" y="9114">
+  <block type="procedures_defnoreturn" id="RyK*td9aN5aR;@gw4f)+" x="0" y="7863">
     <field name="NAME">shotBall</field>
     <statement name="STACK">
       <block type="variables_set" id="l,2u2WF|]I#%kDS#5O7-">
@@ -2980,31 +2489,8 @@
                                       </block>
                                     </value>
                                     <next>
-                                      <block type="sound_play_audio_file" id="-8bCV.(5yrq.DB#~[_}@">
-                                        <field name="soundfile_name">26_Augenzwinkern.wav</field>
-                                        <field name="checkbox">FALSE</field>
-                                        <next>
-                                          <block type="display_set_switch_checked" id=")N/~DtYFy8cPbOpo-I50">
-                                            <field name="instance_name">txt_switch_active</field>
-                                            <field name="property_name">checked</field>
-                                            <value name="value">
-                                              <shadow type="logic_boolean" id="@Yk!SDjWfHi4@-ozuu_d">
-                                                <field name="BOOL">FALSE</field>
-                                              </shadow>
-                                            </value>
-                                            <next>
-                                              <block type="util_wait_until" id="O|8(q6;n0}n@CgSBRQCl">
-                                                <value name="value">
-                                                  <block type="logic_negate" id="g4~%p~r;1tU)2+XmU,@N">
-                                                    <value name="BOOL">
-                                                      <block type="sound_is_playing_audiofile" id="kaPo^8PCo^/;@S8JJp^2"/>
-                                                    </value>
-                                                  </block>
-                                                </value>
-                                              </block>
-                                            </next>
-                                          </block>
-                                        </next>
+                                      <block type="procedures_callnoreturn" id="ySvYC,Z~:IVHI$O|9C~S">
+                                        <mutation name="soundGoal"/>
                                       </block>
                                     </next>
                                   </block>
@@ -3024,232 +2510,48 @@
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="+FKt%DE[[q%Zp0T.Fn}d" x="0" y="9728">
-    <field name="NAME">stop</field>
-    <statement name="STACK">
-      <block type="variables_set" id="0lb+=KDkMxl8Q(.f(!U4">
-        <field name="VAR" id="fPH`.@]riH+=v{,A)bP5">cmd</field>
-        <value name="VALUE">
-          <block type="text" id="[STGuKU5$?TCkTMnB@dh">
-            <field name="TEXT">stop</field>
-          </block>
-        </value>
-        <next>
-          <block type="encodermotor_stop" id="}]1#.xeDc*.k9aGX5P?4">
-            <mutation syncBlocks="3"/>
-            <field name="instance_name_0">TXT_M_M1_encodermotor</field>
-            <field name="instance_name_1">TXT_M_M2_encodermotor</field>
-            <field name="instance_name_2">TXT_M_M3_encodermotor</field>
-            <field name="instance_name_3">TXT_M_M4_encodermotor</field>
-          </block>
-        </next>
-      </block>
-    </statement>
-  </block>
-  <block type="procedures_defnoreturn" id="/pGK)WReTLfX`L_7oAMD" x="0" y="9949">
-    <mutation>
-      <arg name="v" varid="DfDz@$]?^P=(6r:%^xC*" argid="{M*n_!I)eN0.4..0Bzo#"/>
-    </mutation>
-    <field name="NAME">fwd_v</field>
-    <field name="{M*n_!I)eN0.4..0Bzo#">v</field>
-    <statement name="STACK">
-      <block type="variables_set" id="k4%B2_)cuM/0XAejS?6,">
-        <field name="VAR" id="fPH`.@]riH+=v{,A)bP5">cmd</field>
-        <value name="VALUE">
-          <block type="text" id="h[B[wN${qL8]9fVs;wQ#">
-            <field name="TEXT">fwd_v</field>
-          </block>
-        </value>
-        <next>
-          <block type="encodermotor_set_speed" id="ah7YO6/{vwtV1B9-5][Z">
-            <mutation syncBlocks="3"/>
-            <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.CCW</field>
-            <field name="instance_name_2">TXT_M_M3_encodermotor</field>
-            <field name="direction_2">Motor.CCW</field>
-            <field name="instance_name_3">TXT_M_M4_encodermotor</field>
-            <field name="direction_3">Motor.CCW</field>
-            <value name="speed">
-              <shadow type="motor_number" id="se]mq?calLw6d0oaOQ#q">
-                <field name="MOTOR_NUM">512</field>
-              </shadow>
-              <block type="variables_get" id="F2VdZTX[?#t@xpXe5PGZ">
-                <field name="VAR" id="DfDz@$]?^P=(6r:%^xC*">v</field>
-              </block>
-            </value>
-          </block>
-        </next>
-      </block>
-    </statement>
-  </block>
-  <block type="procedures_defnoreturn" id="qX~e_RBh^tj];fOb=cq6" x="0" y="10198">
-    <mutation>
-      <arg name="v" varid="DfDz@$]?^P=(6r:%^xC*" argid="{M*n_!I)eN0.4..0Bzo#"/>
-    </mutation>
-    <field name="NAME">bwd_v</field>
-    <field name="{M*n_!I)eN0.4..0Bzo#">v</field>
-    <statement name="STACK">
-      <block type="variables_set" id="rjgb/wZ.G(d1q*MvVWyS">
-        <field name="VAR" id="fPH`.@]riH+=v{,A)bP5">cmd</field>
-        <value name="VALUE">
-          <block type="text" id="K8QD$0jHA+Dm+{RRS8:n">
-            <field name="TEXT">bwd_v</field>
-          </block>
-        </value>
-        <next>
-          <block type="encodermotor_set_speed" id="YS-=5/?xzHBymyv(0~I[">
-            <mutation syncBlocks="3"/>
-            <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.CW</field>
-            <field name="instance_name_2">TXT_M_M3_encodermotor</field>
-            <field name="direction_2">Motor.CW</field>
-            <field name="instance_name_3">TXT_M_M4_encodermotor</field>
-            <field name="direction_3">Motor.CW</field>
-            <value name="speed">
-              <shadow type="motor_number">
-                <field name="MOTOR_NUM">512</field>
-              </shadow>
-              <block type="variables_get" id=":=uFcASeChn[[mZmP=JV">
-                <field name="VAR" id="DfDz@$]?^P=(6r:%^xC*">v</field>
-              </block>
-            </value>
-          </block>
-        </next>
-      </block>
-    </statement>
-  </block>
-  <block type="procedures_defnoreturn" id="!zD7YDZ.5n?En8cYle4R" x="0" y="10447">
-    <mutation>
-      <arg name="v" varid="DfDz@$]?^P=(6r:%^xC*" argid=",q%qjDTJ~Z@[BoMwORuq"/>
-    </mutation>
-    <field name="NAME">left_v</field>
-    <field name=",q%qjDTJ~Z@[BoMwORuq">v</field>
-    <statement name="STACK">
-      <block type="variables_set" id="9UC$F$BrPjk6CDy%BB]f">
-        <field name="VAR" id="fPH`.@]riH+=v{,A)bP5">cmd</field>
-        <value name="VALUE">
-          <block type="text" id="SIyo}OztKoVxJ[=D8clt">
-            <field name="TEXT">left_v</field>
-          </block>
-        </value>
-        <next>
-          <block type="encodermotor_set_speed" id="`gfvLl$(n`J_k.%k4:;$">
-            <mutation syncBlocks="3"/>
-            <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>
-            <field name="instance_name_2">TXT_M_M3_encodermotor</field>
-            <field name="direction_2">Motor.CCW</field>
-            <field name="instance_name_3">TXT_M_M4_encodermotor</field>
-            <field name="direction_3">Motor.CW</field>
-            <value name="speed">
-              <shadow type="motor_number">
-                <field name="MOTOR_NUM">512</field>
-              </shadow>
-              <block type="variables_get" id=")YRj9Ls`3L]5*jDTk**X">
-                <field name="VAR" id="DfDz@$]?^P=(6r:%^xC*">v</field>
-              </block>
-            </value>
-          </block>
-        </next>
-      </block>
-    </statement>
-  </block>
-  <block type="procedures_defnoreturn" id="}KXL0=RKLgCT~yQ];aw:" x="0" y="10696">
-    <mutation>
-      <arg name="v" varid="DfDz@$]?^P=(6r:%^xC*" argid=",q%qjDTJ~Z@[BoMwORuq"/>
-    </mutation>
-    <field name="NAME">right_v</field>
-    <field name=",q%qjDTJ~Z@[BoMwORuq">v</field>
-    <statement name="STACK">
-      <block type="variables_set" id="_%oPi#@c!;(F[8p]QAd!">
-        <field name="VAR" id="fPH`.@]riH+=v{,A)bP5">cmd</field>
-        <value name="VALUE">
-          <block type="text" id="1Tn,Qoec1k.1M0YT4?=.">
-            <field name="TEXT">right_v</field>
-          </block>
-        </value>
-        <next>
-          <block type="encodermotor_set_speed" id="nx1gdpc@IPQ^`H:CbI[*">
-            <mutation syncBlocks="3"/>
-            <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>
-            <field name="instance_name_2">TXT_M_M3_encodermotor</field>
-            <field name="direction_2">Motor.CW</field>
-            <field name="instance_name_3">TXT_M_M4_encodermotor</field>
-            <field name="direction_3">Motor.CCW</field>
-            <value name="speed">
-              <shadow type="motor_number">
-                <field name="MOTOR_NUM">512</field>
-              </shadow>
-              <block type="variables_get" id="$@n1C^pw7z*pgx,V+kbX">
-                <field name="VAR" id="DfDz@$]?^P=(6r:%^xC*">v</field>
-              </block>
-            </value>
-          </block>
-        </next>
-      </block>
-    </statement>
-  </block>
-  <block type="procedures_defnoreturn" id="0R.p||vBpkt08x[mI=z[" x="0" y="10945">
-    <mutation>
-      <arg name="v" varid="DfDz@$]?^P=(6r:%^xC*" argid=",q%qjDTJ~Z@[BoMwORuq"/>
-    </mutation>
-    <field name="NAME">search_ball_rot</field>
-    <field name=",q%qjDTJ~Z@[BoMwORuq">v</field>
+  <block type="procedures_defnoreturn" id="na=DVwj{P1Npv6z`ZSY{" x="0" y="8420">
+    <field name="NAME">soundGoal</field>
     <statement name="STACK">
-      <block type="variables_set" id="K}2j!Hz/RYuBz+(~Gi59">
+      <block type="variables_set" id="o^c1yss2pIv%8YmX`=6X">
         <field name="VAR" id="fPH`.@]riH+=v{,A)bP5">cmd</field>
         <value name="VALUE">
-          <block type="text" id="_l(?USQWVcXo!=EeZ!l$">
-            <field name="TEXT">search_ball_rot</field>
+          <block type="text" id="ZDFc3f+G6B@X%V`K`Chm">
+            <field name="TEXT">soundGOAL</field>
           </block>
         </value>
         <next>
-          <block type="controls_if" id=":j7vG?8C4FXZdB[+V7Nl">
-            <mutation elseif="0" else="1"/>
-            <value name="IF0">
-              <block type="variables_get" id="~Y@!W9td!8kYdIc/kMkw">
-                <field name="VAR" id="2Lkg^#Z.uZy(%Nr[26)6">search_dir_left</field>
-              </block>
-            </value>
-            <statement name="DO0">
-              <block type="procedures_callnoreturn" id="YvX.x.^TrWBOPLSlBiLf" inline="true">
-                <mutation name="left_v">
-                  <arg name="v"/>
-                </mutation>
-                <value name="ARG0">
-                  <block type="variables_get" id="o6~j-n7ex}.$nbH/Nw,l">
-                    <field name="VAR" id="DfDz@$]?^P=(6r:%^xC*">v</field>
-                  </block>
+          <block type="sound_play_audio_file" id="-8bCV.(5yrq.DB#~[_}@">
+            <field name="soundfile_name">26_Augenzwinkern.wav</field>
+            <field name="checkbox">FALSE</field>
+            <next>
+              <block type="display_set_switch_checked" id=")N/~DtYFy8cPbOpo-I50">
+                <field name="instance_name">txt_switch_active</field>
+                <field name="property_name">checked</field>
+                <value name="value">
+                  <shadow type="logic_boolean" id="@Yk!SDjWfHi4@-ozuu_d">
+                    <field name="BOOL">FALSE</field>
+                  </shadow>
                 </value>
-              </block>
-            </statement>
-            <statement name="ELSE">
-              <block type="procedures_callnoreturn" id="4M:.8icq7AlRrzRTyTKi" inline="true">
-                <mutation name="right_v">
-                  <arg name="v"/>
-                </mutation>
-                <value name="ARG0">
-                  <block type="variables_get" id="@.9?uHc%LEgenn6]q98Q">
-                    <field name="VAR" id="DfDz@$]?^P=(6r:%^xC*">v</field>
+                <next>
+                  <block type="util_wait_until" id="O|8(q6;n0}n@CgSBRQCl">
+                    <value name="value">
+                      <block type="logic_negate" id="g4~%p~r;1tU)2+XmU,@N">
+                        <value name="BOOL">
+                          <block type="sound_is_playing_audiofile" id="kaPo^8PCo^/;@S8JJp^2"/>
+                        </value>
+                      </block>
+                    </value>
                   </block>
-                </value>
+                </next>
               </block>
-            </statement>
+            </next>
           </block>
         </next>
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="UFM0X7|X:*ja#f+^7kz;" x="0" y="11214">
+  <block type="procedures_defnoreturn" id="UFM0X7|X:*ja#f+^7kz;" x="0" y="8614">
     <mutation>
       <arg name="v" varid="DfDz@$]?^P=(6r:%^xC*" argid="-fFb#6a:h}yA(|L+pf*l"/>
       <arg name="ticks" varid="l9lR0!)Laya}3RYVW(ZQ" argid="h?@dWX*~x|BDzo:O{is["/>
@@ -3346,7 +2648,7 @@
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="*i[s2YTWD*g9HS4dxkPq" x="0" y="11627">
+  <block type="procedures_defnoreturn" id="*i[s2YTWD*g9HS4dxkPq" x="0" y="9027">
     <mutation>
       <arg name="v" varid="DfDz@$]?^P=(6r:%^xC*" argid="k6At@e}Qga_x|SmVlf6C"/>
       <arg name="ticks" varid="l9lR0!)Laya}3RYVW(ZQ" argid="~VyZflQ+9HCPP`ynQ/=Y"/>
@@ -3443,7 +2745,7 @@
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="oSa9Ly*^-c^M{$gkMZt1" x="0" y="12040">
+  <block type="procedures_defnoreturn" id="oSa9Ly*^-c^M{$gkMZt1" x="0" y="9440">
     <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{"/>
@@ -3519,7 +2821,7 @@
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="G@]xamrhDPW$7uQ6oPo#" x="0" y="12425">
+  <block type="procedures_defnoreturn" id="G@]xamrhDPW$7uQ6oPo#" x="0" y="9825">
     <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"/>
@@ -3595,7 +2897,7 @@
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="5Hv=PFtVvPQA=IZrkJfU" x="0" y="12810">
+  <block type="procedures_defnoreturn" id="5Hv=PFtVvPQA=IZrkJfU" x="0" y="10210">
     <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"/>
@@ -3686,7 +2988,7 @@
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="[S@[MO!Z/cNt:Jsg4dd}" x="0" y="13251">
+  <block type="procedures_defnoreturn" id="[S@[MO!Z/cNt:Jsg4dd}" x="0" y="10651">
     <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#"/>
@@ -3777,148 +3079,4 @@
       </block>
     </statement>
   </block>
-  <block type="procedures_defnoreturn" id="0yb4y~)e=F^~rds6/HYd" x="0" y="13692">
-    <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"/>
-    </mutation>
-    <field name="NAME">left2</field>
-    <field name="~d8Z+AHZ!wz|G]JHW0lQ">v</field>
-    <field name="jRMx@L,Ya|zd@/bBb#1T">ticks</field>
-    <statement name="STACK">
-      <block type="variables_set" id="A]{I6TpDT17JbK|7n6=a">
-        <field name="VAR" id="fPH`.@]riH+=v{,A)bP5">cmd</field>
-        <value name="VALUE">
-          <block type="text" id="%ih=tz@Th_ON![?}E),L">
-            <field name="TEXT">left2</field>
-          </block>
-        </value>
-        <next>
-          <block type="controls_if" id="o}S)]f3}2XEN7MUlYw$u">
-            <value name="IF0">
-              <block type="logic_compare" id="/{eGv/K=g!(^C:9P6$xv">
-                <field name="OP">GTE</field>
-                <value name="A">
-                  <block type="variables_get" id="}$zB71Q]4`P@feibL2fu">
-                    <field name="VAR" id="l9lR0!)Laya}3RYVW(ZQ">ticks</field>
-                  </block>
-                </value>
-                <value name="B">
-                  <block type="math_number" id=",[,X9TSiPq4iUUtrUmK`">
-                    <field name="NUM">1</field>
-                  </block>
-                </value>
-              </block>
-            </value>
-            <statement name="DO0">
-              <block type="encodermotor_set_values" id="+;!!Z=]w_K!uA/Xr8|S9">
-                <mutation syncBlocks="1"/>
-                <field name="instance_name_0">TXT_M_M2_encodermotor</field>
-                <field name="direction_0">Motor.CW</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">
-                    <field name="MOTOR_NUM">512</field>
-                  </shadow>
-                  <block type="variables_get" id="p;kkWp~F[]J`zNw|vvtD">
-                    <field name="VAR" id="DfDz@$]?^P=(6r:%^xC*">v</field>
-                  </block>
-                </value>
-                <value name="distance">
-                  <shadow type="math_number">
-                    <field name="NUM">100</field>
-                  </shadow>
-                  <block type="variables_get" id="u77Xwm,Q_bZ~tZ0@BLBn">
-                    <field name="VAR" id="l9lR0!)Laya}3RYVW(ZQ">ticks</field>
-                  </block>
-                </value>
-                <next>
-                  <block type="util_wait_until" id=";XC@(3f=D+v6lmnb_QuP">
-                    <value name="value">
-                      <block type="encodermotor_position_read" id="MYE]zy/B%RxZ2xKvlDUB">
-                        <field name="instance_name">TXT_M_M2_encodermotor</field>
-                      </block>
-                    </value>
-                  </block>
-                </next>
-              </block>
-            </statement>
-          </block>
-        </next>
-      </block>
-    </statement>
-  </block>
-  <block type="procedures_defnoreturn" id="qiCJ8lc,P.U`J8k0us:C" x="0" y="14021">
-    <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#"/>
-    </mutation>
-    <field name="NAME">right2</field>
-    <field name="8Z2n_ZVA.)85]V7j%3;7">v</field>
-    <field name="J(gJ~*9ZJJa,[V1)[xn#">ticks</field>
-    <statement name="STACK">
-      <block type="variables_set" id="SPlhff?DiY*F*7h3x,}V">
-        <field name="VAR" id="fPH`.@]riH+=v{,A)bP5">cmd</field>
-        <value name="VALUE">
-          <block type="text" id="Yge$doWr+Gl4j73DnbYO">
-            <field name="TEXT">right2</field>
-          </block>
-        </value>
-        <next>
-          <block type="controls_if" id="lp~ks}%o(L5|/7T|.OjC">
-            <value name="IF0">
-              <block type="logic_compare" id="sO)7$Q2lYogwSoKBo1wg">
-                <field name="OP">GTE</field>
-                <value name="A">
-                  <block type="variables_get" id="+A)3lC*iL0Z74oq;{]:z">
-                    <field name="VAR" id="l9lR0!)Laya}3RYVW(ZQ">ticks</field>
-                  </block>
-                </value>
-                <value name="B">
-                  <block type="math_number" id="kb1Pk8v*VCf8Xe3@+.qk">
-                    <field name="NUM">1</field>
-                  </block>
-                </value>
-              </block>
-            </value>
-            <statement name="DO0">
-              <block type="encodermotor_set_values" id="XXyKv68yF}^:dH:;lOCp">
-                <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_M3_encodermotor</field>
-                <field name="direction_1">Motor.CW</field>
-                <value name="speed">
-                  <shadow type="motor_number">
-                    <field name="MOTOR_NUM">512</field>
-                  </shadow>
-                  <block type="variables_get" id="E1^{iI#Z0F1VibDTtiuR">
-                    <field name="VAR" id="DfDz@$]?^P=(6r:%^xC*">v</field>
-                  </block>
-                </value>
-                <value name="distance">
-                  <shadow type="math_number">
-                    <field name="NUM">100</field>
-                  </shadow>
-                  <block type="variables_get" id="~aVmZ51ntm~OA:X=Iu0M">
-                    <field name="VAR" id="l9lR0!)Laya}3RYVW(ZQ">ticks</field>
-                  </block>
-                </value>
-                <next>
-                  <block type="util_wait_until" id="@c8|rKBWD1*xgH{JbtQy">
-                    <value name="value">
-                      <block type="encodermotor_position_read" id="M-]LhjAT~p$Nfe`JXqlc">
-                        <field name="instance_name">TXT_M_M1_encodermotor</field>
-                      </block>
-                    </value>
-                  </block>
-                </next>
-              </block>
-            </statement>
-          </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 4ecfe80..335485f 100644
--- a/omniwheels_x4_soccer_goal.py
+++ b/omniwheels_x4_soccer_goal.py
@@ -14,6 +14,7 @@ ts_ball = None
 ts_goal_left = None
 ts_goal_right = None
 cmd = None
+state = None
 factor_y = None
 posx_ball = None
 posx_goal_left = None
@@ -21,20 +22,21 @@ posx_goal_right = None
 counters = None
 x_min = None
 posy_ball = None
-search_dir_left = None
+posy_goal_left = None
+posy_goal_right = None
 x_max = None
 v_var_ball_xpos = None
 v_slow = None
 y_ball_far = None
 v_var_ball_ypos = None
-y_ball_near = None
-y_ball_touch = None
 v_fast = None
+y_ball_touch = None
+y_ball_near = None
 goal_width = None
-pos_goal_both = None
-state = None
+posx_goal_both = None
+search_dir_left = None
 def checkTimeouts():
-    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, state, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, posy_goal_left, posy_goal_right, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, v_fast, y_ball_touch, y_ball_near, goal_width, posx_goal_both, search_dir_left
     if (time.time() * 1000) - ts_ball > 500:
         posx_ball = None
         posy_ball = None
@@ -45,8 +47,28 @@ def checkTimeouts():
 
 
 
+def stepBall():
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, state, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, posy_goal_left, posy_goal_right, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, v_fast, y_ball_touch, y_ball_near, goal_width, posx_goal_both, search_dir_left
+    state = 'stepBall'
+    if posx_ball < x_min:
+        left(v_slow, round(math.fabs(posx_ball) * 0.07))
+    elif posx_ball > x_max:
+        right(v_slow, round(math.fabs(posx_ball) * 0.07))
+    elif posx_ball >= x_min and posx_ball <= x_max:
+        if posy_ball <= y_ball_far:
+            fwd(v_fast, 10)
+        elif posy_ball > y_ball_far and posy_ball <= y_ball_near:
+            fwd(v_slow, 5)
+        elif posy_ball > y_ball_near and posy_ball <= y_ball_touch:
+            turnSideLeft(v_fast, 20)
+        elif posy_ball <= y_ball_touch:
+            bwd(v_slow, 5)
+        else:
+            pass
+
+
 def ball_callback(event):
-    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, state, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, posy_goal_left, posy_goal_right, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, v_fast, y_ball_touch, y_ball_near, goal_width, posx_goal_both, search_dir_left
     ts_ball = (time.time() * 1000)
     posx_ball = event.value.x
     posy_ball = event.value.y
@@ -59,9 +81,10 @@ ball_detector.add_detection_listener(ball_callback)
 
 
 def ball_callback2(event):
-    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, state, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, posy_goal_left, posy_goal_right, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, v_fast, y_ball_touch, y_ball_near, goal_width, posx_goal_both, search_dir_left
     ts_goal_left = (time.time() * 1000)
     posx_goal_left = event.value.x
+    posy_goal_left = event.value.y
     if False:
         print('goal left: posx:{} posy:{}'.format(event.value.x, event.value.y))
 
@@ -69,9 +92,10 @@ 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, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, state, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, posy_goal_left, posy_goal_right, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, v_fast, y_ball_touch, y_ball_near, goal_width, posx_goal_both, search_dir_left
     ts_goal_right = (time.time() * 1000)
     posx_goal_right = event.value.x
+    posy_goal_right = event.value.y
     if False:
         print('goal right: posx:{} posy:{}'.format(event.value.x, event.value.y))
 
@@ -79,7 +103,7 @@ 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, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, state, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, posy_goal_left, posy_goal_right, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, v_fast, y_ball_touch, y_ball_near, goal_width, posx_goal_both, search_dir_left
     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))
@@ -89,7 +113,7 @@ 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, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, state, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, posy_goal_left, posy_goal_right, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, v_fast, y_ball_touch, y_ball_near, goal_width, posx_goal_both, search_dir_left
     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))
@@ -99,7 +123,7 @@ 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, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, state, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, posy_goal_left, posy_goal_right, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, v_fast, y_ball_touch, y_ball_near, goal_width, posx_goal_both, search_dir_left
     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))
@@ -109,7 +133,7 @@ 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, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, state, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, posy_goal_left, posy_goal_right, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, v_fast, y_ball_touch, y_ball_near, goal_width, posx_goal_both, search_dir_left
     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))
@@ -119,7 +143,7 @@ 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, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, state, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, posy_goal_left, posy_goal_right, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, v_fast, y_ball_touch, y_ball_near, goal_width, posx_goal_both, search_dir_left
     if TXT_M_I8_photo_transistor.is_dark():
         shotBall()
         time.sleep(5)
@@ -129,7 +153,7 @@ 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, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, state, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, posy_goal_left, posy_goal_right, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, v_fast, y_ball_touch, y_ball_near, goal_width, posx_goal_both, search_dir_left
     cmd = 'shotBall'
     TXT_M_S1_servomotor.set_position(int(400))
     TXT_M_M1_encodermotor.set_speed(int(512), Motor.CCW)
@@ -152,6 +176,12 @@ def shotBall():
         if (not TXT_M_M1_encodermotor.is_running()):
             break
         time.sleep(0.010)
+    soundGoal()
+
+
+def soundGoal():
+    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, state, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, posy_goal_left, posy_goal_right, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, v_fast, y_ball_touch, y_ball_near, goal_width, posx_goal_both, search_dir_left
+    cmd = 'soundGOAL'
     TXT_M.get_loudspeaker().play("26_Augenzwinkern.wav", False)
     display.set_attr("txt_switch_active.checked", str(False).lower())
     while True:
@@ -160,63 +190,8 @@ def shotBall():
         time.sleep(0.010)
 
 
-def stop():
-    global v, ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
-    cmd = 'stop'
-    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, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
-    cmd = 'fwd_v'
-    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)
-
-
-def bwd_v(v):
-    global ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
-    cmd = 'bwd_v'
-    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)
-
-
-def left_v(v):
-    global ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
-    cmd = 'left_v'
-    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)
-
-
-def right_v(v):
-    global ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
-    cmd = 'right_v'
-    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)
-
-
-def search_ball_rot(v):
-    global ticks, factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
-    cmd = 'search_ball_rot'
-    if search_dir_left:
-        left_v(v)
-    else:
-        right_v(v)
-
-
 def turnSideLeft(v, ticks):
-    global factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
+    global factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, state, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, posy_goal_left, posy_goal_right, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, v_fast, y_ball_touch, y_ball_near, goal_width, posx_goal_both, search_dir_left
     cmd = 'turnSideLeft'
     if ticks >= 1:
         TXT_M_M1_encodermotor.set_speed(int(v_slow), Motor.CCW)
@@ -232,7 +207,7 @@ def turnSideLeft(v, ticks):
 
 
 def turnSideRight(v, ticks):
-    global factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
+    global factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, state, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, posy_goal_left, posy_goal_right, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, v_fast, y_ball_touch, y_ball_near, goal_width, posx_goal_both, search_dir_left
     cmd = 'turnSideRight'
     if ticks >= 1:
         TXT_M_M1_encodermotor.set_speed(int(v_slow), Motor.CW)
@@ -248,7 +223,7 @@ def turnSideRight(v, ticks):
 
 
 def fwd(v, ticks):
-    global factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
+    global factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, state, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, posy_goal_left, posy_goal_right, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, v_fast, y_ball_touch, y_ball_near, goal_width, posx_goal_both, search_dir_left
     cmd = 'fwd'
     if ticks >= 1:
         TXT_M_M1_encodermotor.set_speed(int(v), Motor.CCW)
@@ -263,7 +238,7 @@ def fwd(v, ticks):
 
 
 def bwd(v, ticks):
-    global factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
+    global factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, state, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, posy_goal_left, posy_goal_right, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, v_fast, y_ball_touch, y_ball_near, goal_width, posx_goal_both, search_dir_left
     cmd = 'bwd'
     if ticks >= 1:
         TXT_M_M1_encodermotor.set_speed(int(v), Motor.CW)
@@ -278,7 +253,7 @@ def bwd(v, ticks):
 
 
 def left(v, ticks):
-    global factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
+    global factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, state, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, posy_goal_left, posy_goal_right, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, v_fast, y_ball_touch, y_ball_near, goal_width, posx_goal_both, search_dir_left
     cmd = 'left ({}, {})'.format(v, ticks)
     if ticks >= 1:
         TXT_M_M1_encodermotor.set_speed(int(v), Motor.CCW)
@@ -293,7 +268,7 @@ def left(v, ticks):
 
 
 def right(v, ticks):
-    global factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
+    global factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, state, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, posy_goal_left, posy_goal_right, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, v_fast, y_ball_touch, y_ball_near, goal_width, posx_goal_both, search_dir_left
     cmd = 'right ({}, {})'.format(v, ticks)
     if ticks >= 1:
         TXT_M_M1_encodermotor.set_speed(int(v), Motor.CW)
@@ -307,47 +282,23 @@ def right(v, ticks):
             time.sleep(0.010)
 
 
-def left2(v, ticks):
-    global factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
-    cmd = 'left2'
-    if ticks >= 1:
-        TXT_M_M2_encodermotor.set_speed(int(v), Motor.CW)
-        TXT_M_M4_encodermotor.set_speed(int(v), Motor.CW)
-        TXT_M_M2_encodermotor.set_distance(int(ticks), TXT_M_M4_encodermotor)
-        while True:
-            if (not TXT_M_M2_encodermotor.is_running()):
-                break
-            time.sleep(0.010)
-
-
-def right2(v, ticks):
-    global factor_x, ts_ball, ts_goal_left, ts_goal_right, cmd, factor_y, posx_ball, posx_goal_left, posx_goal_right, counters, x_min, posy_ball, search_dir_left, x_max, v_var_ball_xpos, v_slow, y_ball_far, v_var_ball_ypos, y_ball_near, y_ball_touch, v_fast, goal_width, pos_goal_both, state
-    cmd = 'right2'
-    if ticks >= 1:
-        TXT_M_M1_encodermotor.set_speed(int(v), Motor.CW)
-        TXT_M_M3_encodermotor.set_speed(int(v), Motor.CW)
-        TXT_M_M1_encodermotor.set_distance(int(ticks), TXT_M_M3_encodermotor)
-        while True:
-            if (not TXT_M_M1_encodermotor.is_running()):
-                break
-            time.sleep(0.010)
-
-
 factor_x = 0.2
 factor_y = 3.5
-x_min = -5
-x_max = 5
+x_min = -10
+x_max = 10
 y_ball_far = -5
-y_ball_near = 50
+y_ball_near = 45
 y_ball_touch = 74
 v_slow = 250
 v_fast = 512
 v_var_ball_xpos = 512
 v_var_ball_ypos = 512
 posx_goal_left = None
+posy_goal_left = None
 posx_goal_right = None
+posy_goal_right = None
 goal_width = 0
-pos_goal_both = 0
+posx_goal_both = 0
 counters = [TXT_M_C1_motor_step_counter.get_count(), TXT_M_C2_motor_step_counter.get_count(), TXT_M_C3_motor_step_counter.get_count(), TXT_M_C4_motor_step_counter.get_count()]
 posx_ball = None
 posy_ball = None
@@ -360,100 +311,57 @@ cmd = 'NONE'
 time.sleep(2)
 while True:
     if display.get_attr("txt_switch_active.checked"):
-        if posx_ball != None and posy_ball != None and posx_goal_left == None and posx_goal_right == None:
-            state = 'BALL_NO_GOAL'
-            if posx_ball >= x_min and posx_ball <= x_max:
-                if posy_ball <= y_ball_far:
-                    fwd(v_fast, 10)
-                elif posy_ball > y_ball_far and posy_ball <= y_ball_near:
-                    fwd(v_slow, 10)
-                elif posy_ball > y_ball_near and posy_ball <= y_ball_touch:
-                    turnSideLeft(v_fast, 20)
-                elif posy_ball <= y_ball_touch:
-                    bwd(v_slow, 10)
-                else:
-                    stop()
-            elif posx_ball > x_max:
-                right(v_var_ball_xpos, round(math.fabs(posx_ball) * 0.07))
-            elif posx_ball < x_min:
-                left(v_var_ball_xpos, round(math.fabs(posx_ball) * 0.07))
-            else:
-                pass
-        elif posx_ball != None and posy_ball != None and posx_goal_left != None and posx_goal_right == None:
-            state = 'BALL_GOAL_LEFT'
-            if posy_ball <= y_ball_far:
-                fwd_v(v_slow)
-            elif posy_ball <= y_ball_near:
-                if posx_goal_left < posx_ball:
-                    turnSideRight(v_slow, 20)
-                elif posx_goal_left > posx_ball:
-                    turnSideLeft(v_slow, 20)
+        if posx_ball != None and posy_ball != None:
+            if posx_goal_left != None and posx_goal_right != None:
+                state = 'BALL_GOAL_BOTH'
+                if posy_ball <= posy_goal_left or posy_ball <= posy_goal_right:
+                    soundGoal()
                 else:
-                    stop()
-            elif posy_ball <= y_ball_touch:
-                bwd_v(v_slow)
+                    if posx_ball > posx_goal_left and posx_ball < posx_goal_right:
+                        stepBall()
+                    elif posx_ball < posx_goal_both:
+                        turnSideRight(v_slow, 20)
+                    elif posx_ball > posx_goal_both:
+                        turnSideLeft(v_slow, 20)
+            elif posx_goal_left != None and posx_goal_right == None:
+                state = 'BALL_GOAL_LEFT'
+                turnSideRight(v_slow, 20)
+            elif posx_goal_left == None and posx_goal_right != None:
+                state = 'BALL_GOAL_RIGHT'
+                turnSideLeft(v_slow, 20)
             else:
-                stop()
-        elif posx_ball != None and posy_ball != None and posx_goal_left == None and posx_goal_right != None:
-            state = 'BALL_GOAL_RIGHT'
-            if posy_ball <= y_ball_far:
-                fwd_v(v_slow)
-            elif posy_ball <= y_ball_near:
-                if posx_goal_right < posx_ball:
-                    turnSideRight(v_slow, 20)
-                elif posx_goal_right > posx_ball:
-                    turnSideLeft(v_slow, 20)
-                else:
-                    stop()
-            elif posy_ball <= y_ball_touch:
-                bwd_v(v_slow)
-            else:
-                stop()
-        elif posx_ball != None and posy_ball != None and posx_goal_left != None and posx_goal_right != None:
-            state = 'BALL_GOAL_BOTH'
-            if posy_ball <= y_ball_far:
-                fwd_v(v_slow)
-            elif posy_ball <= y_ball_near:
-                if posx_ball > posx_goal_left and posx_ball < posx_goal_right:
-                    fwd_v(v_slow)
-                elif posx_ball < posx_goal_left and posx_ball < posx_goal_right:
-                    turnSideLeft(v_slow, 20)
-                elif posx_ball > posx_goal_left and posx_ball > posx_goal_right:
-                    turnSideRight(v_slow, 20)
-                else:
-                    stop()
-            elif posy_ball <= y_ball_touch:
-                bwd_v(v_slow)
-            else:
-                stop()
-        elif posx_goal_left != None and posx_goal_right != None:
-            state = 'NO_BALL_GOAL_BOTH'
-            goal_width = posx_goal_right - posx_goal_left
-            pos_goal_both = posx_goal_left + goal_width / 2
-            if pos_goal_both >= x_min and pos_goal_both <= x_max:
-                if goal_width < 130:
-                    fwd(v_slow, 10)
+                state = 'BALL_NO_GOAL'
+                stepBall()
+        else:
+            if posx_goal_left != None and posx_goal_right != None:
+                state = 'NO_BALL_GOAL_BOTH'
+                goal_width = posx_goal_right - posx_goal_left
+                posx_goal_both = posx_goal_left + goal_width / 2
+                if posx_goal_both >= x_min and posx_goal_both <= x_max:
+                    if goal_width < 130:
+                        fwd(v_slow, 10)
+                    elif goal_width > 40:
+                        bwd(v_slow, 10)
+                    else:
+                        pass
+                elif posx_goal_both < x_min:
+                    left(v_slow, round(goal_width * 0.01))
+                elif posx_goal_both > x_max:
+                    right(v_slow, round(goal_width * 0.01))
                 else:
-                    bwd(v_slow, 10)
-            elif pos_goal_both < x_min:
-                left(v_slow, round(goal_width * 0.01))
-            elif pos_goal_both > x_max:
-                right(v_slow, round(goal_width * 0.01))
+                    pass
+            elif posx_goal_left != None and posx_goal_right == None:
+                state = 'NO_BALL_GOAL_LEFT'
+                right(v_slow, round(math.fabs(posx_goal_left * 0.1)))
+            elif posx_goal_left == None and posx_goal_right != None:
+                state = 'NO_BALL_GOAL_RIGHT'
+                left(v_slow, round(math.fabs(posx_goal_right * 0.1)))
             else:
-                stop()
-        elif posx_ball == None and posy_ball == None and posx_goal_left != None and posx_goal_right == None:
-            state = 'NO_BALL_GOAL_LEFT'
-            right(v_slow, round(math.fabs(posx_goal_left * 0.1)))
-        elif posx_ball == None and posy_ball == None and posx_goal_left == None and posx_goal_right != None:
-            state = 'NO_BALL_GOAL_RIGHT'
-            left(v_slow, round(math.fabs(posx_goal_right * 0.1)))
-        else:
-            state = 'NONE'
-            search_ball_rot(v_slow)
+                state = 'NONE'
     display.set_attr("txt_label_ball.text", str('x:{}, y:{}'.format(posx_ball, posy_ball)))
-    display.set_attr("txt_label_goal.text", str('x:{}, {}, p:{}, w:{}'.format(posx_goal_left, posx_goal_right, pos_goal_both, goal_width)))
+    display.set_attr("txt_label_goal.text", str('left:{} {}, right:{} {}, p:{}, w:{}'.format(posx_goal_left, posy_goal_left, posx_goal_right, posy_goal_right, posx_goal_both, goal_width)))
     display.set_attr("txt_label_counters.text", str('{}'.format(counters)))
-    print('{}:{}  GOAL_x: {}, {}, p:{}, w:{} BALL_pos:{},{} v_x:{} v_y:{}'.format(state, cmd, posx_goal_left, posx_goal_right, pos_goal_both, goal_width, posx_ball, posy_ball, v_var_ball_xpos, v_var_ball_ypos))
+    print('{}:{}  GOAL left: {} {}, right:{} {}, p:{}, w:{} BALL_pos:{},{} v_x:{} v_y:{}'.format(state, cmd, posx_goal_left, posy_goal_left, posx_goal_right, posy_goal_right, posx_goal_both, goal_width, posx_ball, posy_ball, v_var_ball_xpos, v_var_ball_ypos))
     checkTimeouts()
     time.sleep(0.08)
 
-- 
GitLab