Home » Personal collection » Acorn hard disk » files » BallBot » BioBot/BBReal4

BioBot/BBReal4

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn hard disk » files » BallBot
Filename: BioBot/BBReal4
Read OK:
File size: 218E bytes
Load address: 0000
Exec address: 0000
Duplicates

There are 2 duplicate copies of this file in the archive:

File contents
   10 REM BallBot V2.0
   20 REM Real-Time Version
   30 REM (C) Dominic Ford 1997
   40 :
   50 REM Welcome screen
   60 MODE6:PRINT" BallBot Artificial Intelligence Module"'"Simulation Tester V2.0 Real Time Version"''"Programmed and Designed by Dominic Ford"''SPC(16);"(C) 1997"
   70 PRINT'''"Press <SPACE>"
   80 REPEAT UNTIL INKEY(-99)
   90 :
  100 REM Setup variables
  110 VOICE 1,"StringLib-Soft":*STEREO 1 0
  120 VOICE 2,"StringLib-Soft":*STEREO 2 -127
  130 VOICE 3,"StringLib-Soft":*STEREO 3 127
  140 current=0:DIMball(4,1):bbx=640:bby=950:dir=270:PROCsetupbb
  150 MODE15:MOUSE ON:PROCdrawfull
  160 :
  170 REM Start main loop
  180 REPEAT:T=TIME
  190 PROCuser
  200 IF idle THEN UNTIL FALSE
  210 PROCsense
  220 mov=FNai(freqa,freqb,freqc)
  230 fwd=(mov AND 1)<>0
  240 reverse=(mov AND 2)<>0
  250 left=(mov AND 4)<>0
  260 right=(mov AND 8)<>0
  270 turbo=(mov AND 16)<>0
  280 open=(mov AND 32)<>0
  290 PROCmoveit
  300 REM REPEAT UNTIL TIME>(T+30)
  310 UNTIL FALSE
  320 :
  330 REM Graphic interface
  340 DEFPROCdrawfull
  350 REM Set up constants
  360 LOCALsx,sy,width
  370 sx=1:sy=2:width=10
  380 REM Draw green court area
  390 CLS:GCOL0,%000100:RECTANGLE FILL 0,0,1279,1023
  400 REM Mark out white lines onto court
  410 GCOL0,%111111:RECTANGLE FILL sx/(23.77+2*sx)*1280,sy/(10.97+2*sy)*1024,23.77/(23.77+2*sx)*1280,width:RECTANGLE FILL sx/(23.77+2*sx)*1280,(1.37+sy)/(10.97+2*sy)*1024,23.77/(23.77+2*sx)*1280,width
  420 RECTANGLE FILL sx/(23.77+2*sx)*1280,(9.6+sy)/(10.97+2*sy)*1024,23.77/(23.77+2*sx)*1280,width:RECTANGLE FILL sx/(23.77+2*sx)*1280,(10.97+sy)/(10.97+2*sy)*1024,23.77/(23.77+2*sx)*1280,width
  430 RECTANGLE FILL (sx+5.47)/(23.77+2*sx)*1280,(sy+5.49)/(10.97+2*sy)*1024,12.8/(23.77+2*sx)*1280,width
  440 RECTANGLE FILL sx/(23.77+2*sx)*1280,sy/(10.97+2*sy)*1024,width,10.97/(10.97+2*sy)*1024:RECTANGLE FILL (sx+23.77)/(23.77+2*sx)*1280,sy/(10.97+2*sy)*1024,width,10.97/(10.97+2*sy)*1024+width
  450 RECTANGLE FILL (sx+5.47)/(23.77+2*sx)*1280,(sy+1.37)/(10.97+2*sy)*1024,width,8.23/(10.97+2*sy)*1024:RECTANGLE FILL (sx+18.3)/(23.77+2*sx)*1280,(sy+1.37)/(10.97+2*sy)*1024,width,8.23/(10.97+2*sy)*1024
  460 :
  470 REM Draw net
  480 GCOL0,0:FORl=100TO924STEP10:MOVE 640,l:DRAW 680,l+50:NEXT:FORl=0TO40STEP10:MOVE 640+l,100+l:DRAW640+l,924+l:NEXT:FORl=0TO5:MOVE637+l,100:DRAW677+l,150:MOVE637+l,924:DRAW677+l,974:NEXT
  490 GCOL0,%111111:MOVE 682,142:DRAW682,966
  500 PROCdrawmini
  510 ENDPROC
  520 :
  530 REM Draw ballbot and balls
  540 DEFPROCdrawmini
  550 GCOL3,%001011:FORb=0TO4
  560 IF ball(b,0)<>0 OR ball(b,1)<>0 THEN RECTANGLE FILL ball(b,0),ball(b,1),5,5
  570 NEXT
  580 GCOL3,%000111:RECTANGLE FILL bbx,bby,5,5
  590 ENDPROC
  600 :
  610 REM User interface (putting balls down)
  620 DEFPROCuser
  630 MOUSE x,y,c
  640 IF c=0 THEN ENDPROC
  650 IF (c AND 4)<>0 THEN PROCdrawmini:ball(current,0)=x:ball(current,1)=y:current=(current+1)MOD5:PROCdrawmini
  660 IF (c AND 2)<>0 THEN idle=FALSE:stage=0:start=TIME
  670 REPEAT
  680 MOUSE x,y,c
  690 UNTIL c=0
  700 ENDPROC
  710 :
  720 REM Calculate ballbot's new position
  730 DEFPROCmoveit
  740 IF (left AND fwd) OR (right AND reverse) THEN dir=dir-2.5*(1-3*turbo)
  750 IF (right AND fwd) OR (left AND reverse) THEN dir=dir+2.5*(1-3*turbo)
  760 :
  770 REM Get direction in range 0<theta<360
  780 REPEAT IF dir<0 THEN dir=dir+360
  790 IF dir>=360 THEN dir=dir-360
  800 UNTIL dir>=0 AND dir<360
  810 :
  820 fr=0:IF fwd THEN fr=fr+0.25
  830 IF reverse THEN fr=fr-0.25
  840 IF turbo THEN fr=fr*4
  850 PROCdrawmini:bbx=bbx+16*SIN(PI*dir/180)*fr
  860 bby=bby+16*COS(PI*dir/180)*fr
  870 FORball=0TO4:IF open AND ABS(bbx-ball(ball,0))<10 AND ABS(bby-ball(ball,1))<10 THEN ball(ball,0)=0
  880 NEXT:PROCdrawmini
  890 ENDPROC
  900 :
  910 REM Calculate ballbot's background echo reading (-balls), using several points to check out where net posts are.
  920 DEFFNback(x,y,freq)
  930 LOCAL freqa,dummy
  940 freqa=FNback2(x,y,freq,100,923):ftype$=ft$
  950 IF ft$="U" THEN =freqa
  960 dummy=FNback2(x,y,freq,100,125):IF ft$="N" AND dummy<=freqa THEN ftype$="P"
  970 dummy=FNback2(x,y,freq,898,923):IF ft$="N" AND dummy<=freqa THEN ftype$="P"
  980 =freqa
  990 :
 1000 REM Calculate reading from one point
 1010 DEFFNback2(x,y,freq,min,max)
 1020 ft$="U":REM Set up general value of frequency type (UNIDENTIFIED)
 1030 REM Calculate Angle of net as seen by Ballbot
 1040 LOCAL freqa
 1050 netlow=(FNangle(640,max,x,y)-dir) MOD 360
 1060 IF netlow<0 THEN netlow=netlow+360
 1070 IF netlow>180 THEN netlow=netlow-360
 1080 nethi=(FNangle(640,min,x,y)-dir) MOD 360
 1090 IF nethi<0 THEN nethi=nethi+360
 1100 IF nethi>180 THEN nethi=nethi-360
 1110 :
 1120 REM Calculate reading
 1130 freqa=freq+RND(6)-3
 1140 IF ABS(SIN(PI*dir/180))>0.01 THEN IF ((netlow<0 AND nethi>0) OR (nethi<0 AND netlow>0)) AND (640-x)/SIN(PI*dir/180)>0 THEN freqa=(640-x)/SIN(PI*dir/180):ft$="N"
 1150 =freqa
 1160 :
 1170 REM Calculate Ballbot's readings (MAIN ROUTINE)
 1180 :
 1190 DEFPROCsense
 1200 REM Get background readings from FNback
 1210 freq=RND(250)+1500
 1220 freqa=FNback(bbx,bby,freq):fa$=ftype$
 1230 dir=dir-30:freqb=FNback(bbx,bby,freq):fb$=ftype$
 1240 dir=dir+60:freqc=FNback(bbx,bby,freq):fc$=ftype$
 1250 dir=dir-105:freqd=FNback(bbx,bby,freq):dir=dir+75:fd$=ftype$
 1260 :
 1270 REM Add any relevant balls to readings (using hairy trigonometry)
 1280 :
 1290 FORball=0TO4
 1300 d%=SQR((ball(ball,0)-bbx)^2+(ball(ball,1)-bby)^2)
 1310 IF ball(ball,0)=0 THEN d%=9999
 1320 a=FNangle(ball(ball,0),ball(ball,1),bbx,bby)-dir
 1330 IF ABS(a)<15 AND freqa>d% THEN freqa=d%:fa$="B"
 1340 IF a>-46 AND a<=-15 AND freqb>d% THEN freqb=d%:fb$="B"
 1350 IF a>=15 AND a<46 AND freqc>d% THEN freqc=d%:fc$="B"
 1360 IF a>-90 AND a<=-46 AND freqd>d% THEN freqd=d%:fd$="B"
 1370 NEXT
 1380 :
 1390 REM Update user displays
 1400 :
 1410 PRINTTAB(0,0)INT((TIME-start)/12000);":";(INT((TIME-start)/200)MOD60);" "
 1420 PRINTTAB(0,31)fd$,fb$,fa$,fc$,stage,INT(searching),left,right;
 1430 SOUND 1,-1,freqa/4,5:SOUND 2,-1,freqb/4,5:SOUND 3,-1,freqc/4,5
 1440 ENDPROC
 1450:
 1460 REM Calculate bearing of B from A
 1470 DEFFNangle(x1,y1,x2,y2)
 1480 IF y2=y1 THEN ang=90 ELSE ang=180*ATN((x2-x1)/(y2-y1))/PI
 1490 IF (y2>y1) THEN ang=ang+180
 1500 IF ang<0 THEN ang=ang+360
 1510 =ang MOD 360
 1520 :
 1530 REM BALLBOT ROBOTIC INTELLIGENCE MODULE
 1540 :
 1550 DEFFNai(freqa,freqb,freqc)
 1560 REM Artificial intelligence routines (ie. What Next??)
 1570 LOCALfwd,reverse,left,right,turbo
 1580 fwd=TRUE:reverse=FALSE:left=FALSE:right=FALSE:turbo=FALSE
 1590 :
 1600 REM What stage are we in? Hunt for balls or move to new area?
 1610 IF near<>0 AND stage<8 THEN PROCdonearstuff
 1620 IF near=0 AND (stage=0 OR stage=2) THEN PROChunt
 1630 IF near=0 AND (stage=1 OR stage=3) THEN PROCmoveout
 1640 IF stage=4 THEN PROCreleaseb
 1650 :
 1660 REM Prepare output into binary for transmission
 1670 feed=0:IF fwd THEN feed=feed+1
 1680 IF reving THEN turbo=TRUE
 1690 IF reverse THEN feed=feed+2
 1700 IF left THEN feed=feed+4
 1710 IF right THEN feed=feed+8
 1720 IF turbo THEN feed=feed+16
 1730 IF opencter>0 THEN feed=feed+32
 1740 =feed
 1750 :
 1760 REM Perform a sweep to find any balls
 1770 DEFPROChunt
 1780 REM Watch out if too near to net
 1790 IF((freqa<20AND fa$<>"B")OR(freqb<20AND fb$<>"B")OR(freqc<20AND fc$<>"B"))OR(reving AND((freqa<150AND fa$<>"B")OR(freqb<150AND fb$<>"B")OR(freqc<150AND fc$<>"B")))THENreving=TRUE:reverse=TRUE:fwd=FALSE:left=FALSE:right=TRUE:ENDPROC
 1800 reving=FALSE
 1810 :
 1820 REM If Ball is out of reach in the "D" sector, reverse!
 1830 FDR=freqd*1.25:IFfreqd<150ANDfd$="B"ANDFDR<freqa ANDFDR<freqb ANDFDR<freqc AND(fa$<>"B"ORfreqa>100)AND(fb$<>"B"ORfreqb>100)AND(fc$<>"B"ORfreqc>100)THEN turbo=TRUE:reverse=TRUE:fwd=FALSE:right=TRUE:farleft=-6*(freqd>40):ENDPROC
 1840 IF farleft>0 THEN
 1850  farleft=farleft-1:reverse=TRUE:fwd=FALSE:right=TRUE:turbo=TRUE
 1860  IF fa$="B" OR (fd$<>"B" AND fb$<>"B") THEN farleft=0
 1870  ENDPROC
 1880 ENDIF
 1890 :
 1900 REM Rotate to face ball
 1910 opencter=-5*(((freqa<20)ANDfa$="B")OR((freqb<20)ANDfb$="B")OR((freqc<20)ANDfc$="B")OR((freqd<20)ANDfd$="B"))
 1920 IF fa$="B" THEN tending=%01:searching=searching/2:turbo=freqa>100:ENDPROC
 1930 IF fb$="B" THEN tending=%11:left=TRUE:ENDPROC
 1940 IF fc$="B" THEN tending=%01:right=TRUE:ENDPROC
 1950 REM If no ball in sight, continue rotation...
 1960 align=FALSE:searching=searching+1:reverse=TRUE:fwd=TRUE:IF (tending AND 1)<>0 THEN fwd=FALSE ELSE reverse=FALSE
 1962 IF (tending AND 2)<>0 THEN right=TRUE ELSE left=TRUE
 1964 IF searching=5 THEN tending=(tending EOR 2) AND 2
 1965 IF searching>5 THEN tending=tending AND 2
 1970 IF searching>150 THEN stage=stage+1
 1980 ENDPROC
 1990 :
 2000 REM Find edge of net and aim for it to move to other side
 2010 DEFPROCmoveout
 2020 REM Watch out if too near to net
 2030 IF (freqa<30 OR freqb<30 OR freqc<30) OR (reving AND (freqa<125 OR freqb<125 OR freqc<125)) THEN reving=TRUE:farleft=0:reverse=TRUE:fwd=FALSE:left=FALSE:right=FALSE:ENDPROC
 2040 reving=FALSE
 2050 REM Align ballbot to face the net post...
 2060 IF freqd<75 AND fb$="N" THEN farleft=5:left=TRUE:turbo=TRUE:ENDPROC
 2070 IF farleft>0 THEN farleft=farleft-1:left=TRUE:turbo=TRUE:ENDPROC
 2080 IF freqa<350 THEN right=TRUE:ENDPROC
 2090 IF fd$="N" AND fb$="P" AND freqb<150 THEN right=TRUE:near=1:ENDPROC
 2100 IF freqa<200 AND freqb<200 AND freqc<200 THEN right=TRUE:ENDPROC
 2110 IF (freqb*1.5)>freqc THEN left=TRUE:ENDPROC
 2120 IF freqb>100 THEN turbo=TRUE
 2130 ENDPROC
 2140 :
 2150 REM Nearly there... Just need a little nudge in the right direction.
 2160 DEFPROCdonearstuff
 2170 near=near+1
 2180 IF near<8 THEN right=TRUE:ENDPROC
 2190 left=TRUE
 2200 IF near>16 THEN near=0:stage=stage+1:searching=0:tending=2
 2210 ENDPROC
 2220 :
 2230 REM Initialise BallBot variables at the beginning of a run
 2240 DEFPROCsetupbb
 2250 reving=FALSE:left=FALSE:right=FALSE:fwd=FALSE:reverse=FALSE:searching=0:idle=TRUE
 2260 near=FALSE:farleft=0:opencter=0:tending=2
 2270 ENDPROC
 2280 :
 2290 DEFPROCreleaseb
 2300 REM Got all the balls, now just dump them!
 2310 near=near+1:reverse=TRUE:fwd=FALSE
 2320 IF near>9 THEN idle=TRUE:near=FALSE
 2330 ENDPROC
 2340 REPEAT:FORX=1TO12:OSCLI"CHANNELVOICE 1 "+STR$X:SOUND1,-10,52,100:FORR=0TO10000:NEXT,:UNTIL FALSE
 2350 :
 2360 REM Whizz-back to line up with D - what if whizz back into net?
 2370 REM Reverse if BallBot knows that balls are behind it.

 � BallBot V2.0
 � Real-Time Version
 � (C) Dominic Ford 1997
( :
2 � Welcome screen
<� �6:�" BallBot Artificial Intelligence Module"'"Simulation Tester V2.0 Real Time Version"''"Programmed and Designed by Dominic Ford"''�(16);"(C) 1997"
F �'''"Press <SPACE>"
P � � �(-99)
Z :
d � Setup variables
n& ȡ 1,"StringLib-Soft":*STEREO 1 0
x) ȡ 2,"StringLib-Soft":*STEREO 2 -127
�( ȡ 3,"StringLib-Soft":*STEREO 3 127
�: current=0:�ball(4,1):bbx=640:bby=950:dir=270:�setupbb
� �15:ȗ �:�drawfull
� :
� � Start main loop
�
 �:T=�
�
 �user
� � idle � � �
� �sense
� mov=�ai(freqa,freqb,freqc)
� fwd=(mov � 1)<>0
� reverse=(mov � 2)<>0
� left=(mov � 4)<>0
 right=(mov � 8)<>0
 turbo=(mov � 16)<>0
 open=(mov � 32)<>0
" �moveit
, � REPEAT UNTIL TIME>(T+30)
6 � �
@ :
J � Graphic interface
T ��drawfull
^ � Set up constants
h �sx,sy,width
r sx=1:sy=2:width=10
| � Draw green court area
�% �:�0,%000100:ȓ Ȑ 0,0,1279,1023
�& � Mark out white lines onto court
�� �0,%111111:ȓ Ȑ sx/(23.77+2*sx)*1280,sy/(10.97+2*sy)*1024,23.77/(23.77+2*sx)*1280,width:ȓ Ȑ sx/(23.77+2*sx)*1280,(1.37+sy)/(10.97+2*sy)*1024,23.77/(23.77+2*sx)*1280,width
�� ȓ Ȑ sx/(23.77+2*sx)*1280,(9.6+sy)/(10.97+2*sy)*1024,23.77/(23.77+2*sx)*1280,width:ȓ Ȑ sx/(23.77+2*sx)*1280,(10.97+sy)/(10.97+2*sy)*1024,23.77/(23.77+2*sx)*1280,width
�_ ȓ Ȑ (sx+5.47)/(23.77+2*sx)*1280,(sy+5.49)/(10.97+2*sy)*1024,12.8/(23.77+2*sx)*1280,width
�� ȓ Ȑ sx/(23.77+2*sx)*1280,sy/(10.97+2*sy)*1024,width,10.97/(10.97+2*sy)*1024:ȓ Ȑ (sx+23.77)/(23.77+2*sx)*1280,sy/(10.97+2*sy)*1024,width,10.97/(10.97+2*sy)*1024+width
º ȓ Ȑ (sx+5.47)/(23.77+2*sx)*1280,(sy+1.37)/(10.97+2*sy)*1024,width,8.23/(10.97+2*sy)*1024:ȓ Ȑ (sx+18.3)/(23.77+2*sx)*1280,(sy+1.37)/(10.97+2*sy)*1024,width,8.23/(10.97+2*sy)*1024
� :
� � Draw net
� �0,0:�l=100�924�10:� 640,l:� 680,l+50:�:�l=0�40�10:� 640+l,100+l:�640+l,924+l:�:�l=0�5:�637+l,100:�677+l,150:�637+l,924:�677+l,974:�
�" �0,%111111:� 682,142:�682,966
� �drawmini
� �
 :
 � Draw ballbot and balls
 ��drawmini
& �3,%001011:�b=0�4
0B � ball(b,0)<>0 � ball(b,1)<>0 � ȓ Ȑ ball(b,0),ball(b,1),5,5
: �
D! �3,%000111:ȓ Ȑ bbx,bby,5,5
N �
X :
b* � User interface (putting balls down)
l ��user
v
 ȗ x,y,c
� � c=0 � �
�a � (c � 4)<>0 � �drawmini:ball(current,0)=x:ball(current,1)=y:current=(current+1)�5:�drawmini
�* � (c � 2)<>0 � idle=�:stage=0:start=�
� �
�
 ȗ x,y,c
�
 � c=0
� �
� :
�' � Calculate ballbot's new position
�
 ��moveit
�A � (left � fwd) � (right � reverse) � dir=dir-2.5*(1-3*turbo)
�A � (right � fwd) � (left � reverse) � dir=dir+2.5*(1-3*turbo)
� :
) � Get direction in range 0<theta<360
 � � dir<0 � dir=dir+360
 � dir>=360 � dir=dir-360
  � dir>=0 � dir<360
* :
4 fr=0:� fwd � fr=fr+0.25
> � reverse � fr=fr-0.25
H � turbo � fr=fr*4
R) �drawmini:bbx=bbx+16*�(�*dir/180)*fr
\ bby=bby+16*�(�*dir/180)*fr
fX �ball=0�4:� open � �(bbx-ball(ball,0))<10 � �(bby-ball(ball,1))<10 � ball(ball,0)=0
p �:�drawmini
z �
� :
�s � Calculate ballbot's background echo reading (-balls), using several points to check out where net posts are.
� ݤback(x,y,freq)
� � freqa,dummy
�. freqa=�back2(x,y,freq,100,923):ftype$=ft$
� � ft$="U" � =freqa
�I dummy=�back2(x,y,freq,100,125):� ft$="N" � dummy<=freqa � ftype$="P"
�I dummy=�back2(x,y,freq,898,923):� ft$="N" � dummy<=freqa � ftype$="P"
� =freqa
� :
�' � Calculate reading from one point
� ݤback2(x,y,freq,min,max)
�D ft$="U":� Set up general value of frequency type (UNIDENTIFIED)
0 � Calculate Angle of net as seen by Ballbot
 � freqa
+ netlow=(�angle(640,max,x,y)-dir) � 360
$# � netlow<0 � netlow=netlow+360
.% � netlow>180 � netlow=netlow-360
8* nethi=(�angle(640,min,x,y)-dir) � 360
B  � nethi<0 � nethi=nethi+360
L" � nethi>180 � nethi=nethi-360
V :
` � Calculate reading
j freqa=freq+�(6)-3
t� � �(�(�*dir/180))>0.01 � � ((netlow<0 � nethi>0) � (nethi<0 � netlow>0)) � (640-x)/�(�*dir/180)>0 � freqa=(640-x)/�(�*dir/180):ft$="N"
~ =freqa
� :
�2 � Calculate Ballbot's readings (MAIN ROUTINE)
� :
� ��sense
�* � Get background readings from FNback
� freq=�(250)+1500
�) freqa=�back(bbx,bby,freq):fa$=ftype$
�4 dir=dir-30:freqb=�back(bbx,bby,freq):fb$=ftype$
�4 dir=dir+60:freqc=�back(bbx,bby,freq):fc$=ftype$
�@ dir=dir-105:freqd=�back(bbx,bby,freq):dir=dir+75:fd$=ftype$
� :
�D � Add any relevant balls to readings (using hairy trigonometry)
 :

 �ball=0�4
4 d%=�((ball(ball,0)-bbx)^2+(ball(ball,1)-bby)^2)
 � ball(ball,0)=0 � d%=9999
(4 a=�angle(ball(ball,0),ball(ball,1),bbx,bby)-dir
2, � �(a)<15 � freqa>d% � freqa=d%:fa$="B"
<3 � a>-46 � a<=-15 � freqb>d% � freqb=d%:fb$="B"
F1 � a>=15 � a<46 � freqc>d% � freqc=d%:fc$="B"
P3 � a>-90 � a<=-46 � freqd>d% � freqd=d%:fd$="B"
Z �
d :
n � Update user displays
x :
�; �0,0)�((�-start)/12000);":";(�((�-start)/200)�60);" "
�: �0,31)fd$,fb$,fa$,fc$,stage,�(searching),left,right;
�7 � 1,-1,freqa/4,5:� 2,-1,freqb/4,5:� 3,-1,freqc/4,5
� �
�:
�$ � Calculate bearing of B from A
� ݤangle(x1,y1,x2,y2)
�4 � y2=y1 � ang=90 � ang=180*�((x2-x1)/(y2-y1))/�
� � (y2>y1) � ang=ang+180
� � ang<0 � ang=ang+360
� =ang � 360
� :
�* � BALLBOT ROBOTIC INTELLIGENCE MODULE
 :
 ݤai(freqa,freqb,freqc)
9 � Artificial intelligence routines (ie. What Next??)
"" �fwd,reverse,left,right,turbo
,+ fwd=�:reverse=�:left=�:right=�:turbo=�
6 :
@@ � What stage are we in? Hunt for balls or move to new area?
J' � near<>0 � stage<8 � �donearstuff
T+ � near=0 � (stage=0 � stage=2) � �hunt
^. � near=0 � (stage=1 � stage=3) � �moveout
h � stage=4 � �releaseb
r :
|2 � Prepare output into binary for transmission
� feed=0:� fwd � feed=feed+1
� � reving � turbo=�
� � reverse � feed=feed+2
� � left � feed=feed+4
� � right � feed=feed+8
� � turbo � feed=feed+16
�  � opencter>0 � feed=feed+32
�
 =feed
� :
�( � Perform a sweep to find any balls
� ��hunt
�# � Watch out if too near to net
�� �((freqa<20� fa$<>"B")�(freqb<20� fb$<>"B")�(freqc<20� fc$<>"B"))�(reving �((freqa<150� fa$<>"B")�(freqb<150� fb$<>"B")�(freqc<150� fc$<>"B")))�reving=�:reverse=�:fwd=�:left=�:right=�:�

 reving=�
 :
: � If Ball is out of reach in the "D" sector, reverse!
&� FDR=freqd*1.25:�freqd<150�fd$="B"�FDR<freqa �FDR<freqb �FDR<freqc �(fa$<>"B"�freqa>100)�(fb$<>"B"�freqb>100)�(fc$<>"B"�freqc>100)� turbo=�:reverse=�:fwd=�:right=�:farleft=-6*(freqd>40):�
0 � farleft>0 �
:7  farleft=farleft-1:reverse=�:fwd=�:right=�:turbo=�
D3  � fa$="B" � (fd$<>"B" � fb$<>"B") � farleft=0
N  �
X �
b :
l � Rotate to face ball
vf opencter=-5*(((freqa<20)�fa$="B")�((freqb<20)�fb$="B")�((freqc<20)�fc$="B")�((freqd<20)�fd$="B"))
�D � fa$="B" � tending=%01:searching=searching/2:turbo=freqa>100:�
�% � fb$="B" � tending=%11:left=�:�
�& � fc$="B" � tending=%01:right=�:�
�0 � If no ball in sight, continue rotation...
�Y align=�:searching=searching+1:reverse=�:fwd=�:� (tending � 1)<>0 � fwd=� � reverse=�
�* � (tending � 2)<>0 � right=� � left=�
�. � searching=5 � tending=(tending � 2) � 2
�( � searching>5 � tending=tending � 2
�$ � searching>150 � stage=stage+1
� �
� :
�< � Find edge of net and aim for it to move to other side
� ��moveout
�# � Watch out if too near to net
� � (freqa<30 � freqb<30 � freqc<30) � (reving � (freqa<125 � freqb<125 � freqc<125)) � reving=�:farleft=0:reverse=�:fwd=�:left=�:right=�:�
�
 reving=�
, � Align ballbot to face the net post...
6 � freqd<75 � fb$="N" � farleft=5:left=�:turbo=�:�
5 � farleft>0 � farleft=farleft-1:left=�:turbo=�:�
  � freqa<350 � right=�:�
*7 � fd$="N" � fb$="P" � freqb<150 � right=�:near=1:�
44 � freqa<200 � freqb<200 � freqc<200 � right=�:�
># � (freqb*1.5)>freqc � left=�:�
H � freqb>100 � turbo=�
R �
\ :
fG � Nearly there... Just need a little nudge in the right direction.
p ��donearstuff
z near=near+1
� � near<8 � right=�:�
� left=�
�; � near>16 � near=0:stage=stage+1:searching=0:tending=2
� �
� :
�= � Initialise BallBot variables at the beginning of a run
� ��setupbb
�? reving=�:left=�:right=�:fwd=�:reverse=�:searching=0:idle=�
�* near=�:farleft=0:opencter=0:tending=2
� �
� :
� ��releaseb
�- � Got all the balls, now just dump them!
	  near=near+1:reverse=�:fwd=�
	 � near>9 � idle=�:near=�
	 �
	$D �:�X=1�12:�"CHANNELVOICE 1 "+�X:�1,-10,52,100:�R=0�10000:�,:� �
	. :
	8B � Whizz-back to line up with D - what if whizz back into net?
	B9 � Reverse if BallBot knows that balls are behind it.
�
00000000  0d 00 0a 13 20 f4 20 42  61 6c 6c 42 6f 74 20 56  |.... . BallBot V|
00000010  32 2e 30 0d 00 14 18 20  f4 20 52 65 61 6c 2d 54  |2.0.... . Real-T|
00000020  69 6d 65 20 56 65 72 73  69 6f 6e 0d 00 1e 1c 20  |ime Version.... |
00000030  f4 20 28 43 29 20 44 6f  6d 69 6e 69 63 20 46 6f  |. (C) Dominic Fo|
00000040  72 64 20 31 39 39 37 0d  00 28 06 20 3a 0d 00 32  |rd 1997..(. :..2|
00000050  15 20 f4 20 57 65 6c 63  6f 6d 65 20 73 63 72 65  |. . Welcome scre|
00000060  65 6e 0d 00 3c 9a 20 eb  36 3a f1 22 20 42 61 6c  |en..<. .6:." Bal|
00000070  6c 42 6f 74 20 41 72 74  69 66 69 63 69 61 6c 20  |lBot Artificial |
00000080  49 6e 74 65 6c 6c 69 67  65 6e 63 65 20 4d 6f 64  |Intelligence Mod|
00000090  75 6c 65 22 27 22 53 69  6d 75 6c 61 74 69 6f 6e  |ule"'"Simulation|
000000a0  20 54 65 73 74 65 72 20  56 32 2e 30 20 52 65 61  | Tester V2.0 Rea|
000000b0  6c 20 54 69 6d 65 20 56  65 72 73 69 6f 6e 22 27  |l Time Version"'|
000000c0  27 22 50 72 6f 67 72 61  6d 6d 65 64 20 61 6e 64  |'"Programmed and|
000000d0  20 44 65 73 69 67 6e 65  64 20 62 79 20 44 6f 6d  | Designed by Dom|
000000e0  69 6e 69 63 20 46 6f 72  64 22 27 27 89 28 31 36  |inic Ford"''.(16|
000000f0  29 3b 22 28 43 29 20 31  39 39 37 22 0d 00 46 18  |);"(C) 1997"..F.|
00000100  20 f1 27 27 27 22 50 72  65 73 73 20 3c 53 50 41  | .'''"Press <SPA|
00000110  43 45 3e 22 0d 00 50 0f  20 f5 20 fd 20 a6 28 2d  |CE>"..P. . . .(-|
00000120  39 39 29 0d 00 5a 06 20  3a 0d 00 64 16 20 f4 20  |99)..Z. :..d. . |
00000130  53 65 74 75 70 20 76 61  72 69 61 62 6c 65 73 0d  |Setup variables.|
00000140  00 6e 26 20 c8 a1 20 31  2c 22 53 74 72 69 6e 67  |.n& .. 1,"String|
00000150  4c 69 62 2d 53 6f 66 74  22 3a 2a 53 54 45 52 45  |Lib-Soft":*STERE|
00000160  4f 20 31 20 30 0d 00 78  29 20 c8 a1 20 32 2c 22  |O 1 0..x) .. 2,"|
00000170  53 74 72 69 6e 67 4c 69  62 2d 53 6f 66 74 22 3a  |StringLib-Soft":|
00000180  2a 53 54 45 52 45 4f 20  32 20 2d 31 32 37 0d 00  |*STEREO 2 -127..|
00000190  82 28 20 c8 a1 20 33 2c  22 53 74 72 69 6e 67 4c  |.( .. 3,"StringL|
000001a0  69 62 2d 53 6f 66 74 22  3a 2a 53 54 45 52 45 4f  |ib-Soft":*STEREO|
000001b0  20 33 20 31 32 37 0d 00  8c 3a 20 63 75 72 72 65  | 3 127...: curre|
000001c0  6e 74 3d 30 3a de 62 61  6c 6c 28 34 2c 31 29 3a  |nt=0:.ball(4,1):|
000001d0  62 62 78 3d 36 34 30 3a  62 62 79 3d 39 35 30 3a  |bbx=640:bby=950:|
000001e0  64 69 72 3d 32 37 30 3a  f2 73 65 74 75 70 62 62  |dir=270:.setupbb|
000001f0  0d 00 96 17 20 eb 31 35  3a c8 97 20 ee 3a f2 64  |.... .15:.. .:.d|
00000200  72 61 77 66 75 6c 6c 0d  00 a0 06 20 3a 0d 00 aa  |rawfull.... :...|
00000210  16 20 f4 20 53 74 61 72  74 20 6d 61 69 6e 20 6c  |. . Start main l|
00000220  6f 6f 70 0d 00 b4 0a 20  f5 3a 54 3d 91 0d 00 be  |oop.... .:T=....|
00000230  0a 20 f2 75 73 65 72 0d  00 c8 11 20 e7 20 69 64  |. .user.... . id|
00000240  6c 65 20 8c 20 fd 20 a3  0d 00 d2 0b 20 f2 73 65  |le . . ..... .se|
00000250  6e 73 65 0d 00 dc 1f 20  6d 6f 76 3d a4 61 69 28  |nse.... mov=.ai(|
00000260  66 72 65 71 61 2c 66 72  65 71 62 2c 66 72 65 71  |freqa,freqb,freq|
00000270  63 29 0d 00 e6 15 20 66  77 64 3d 28 6d 6f 76 20  |c).... fwd=(mov |
00000280  80 20 31 29 3c 3e 30 0d  00 f0 19 20 72 65 76 65  |. 1)<>0.... reve|
00000290  72 73 65 3d 28 6d 6f 76  20 80 20 32 29 3c 3e 30  |rse=(mov . 2)<>0|
000002a0  0d 00 fa 16 20 6c 65 66  74 3d 28 6d 6f 76 20 80  |.... left=(mov .|
000002b0  20 34 29 3c 3e 30 0d 01  04 17 20 72 69 67 68 74  | 4)<>0.... right|
000002c0  3d 28 6d 6f 76 20 80 20  38 29 3c 3e 30 0d 01 0e  |=(mov . 8)<>0...|
000002d0  18 20 74 75 72 62 6f 3d  28 6d 6f 76 20 80 20 31  |. turbo=(mov . 1|
000002e0  36 29 3c 3e 30 0d 01 18  17 20 6f 70 65 6e 3d 28  |6)<>0.... open=(|
000002f0  6d 6f 76 20 80 20 33 32  29 3c 3e 30 0d 01 22 0c  |mov . 32)<>0..".|
00000300  20 f2 6d 6f 76 65 69 74  0d 01 2c 1f 20 f4 20 52  | .moveit..,. . R|
00000310  45 50 45 41 54 20 55 4e  54 49 4c 20 54 49 4d 45  |EPEAT UNTIL TIME|
00000320  3e 28 54 2b 33 30 29 0d  01 36 08 20 fd 20 a3 0d  |>(T+30)..6. . ..|
00000330  01 40 06 20 3a 0d 01 4a  18 20 f4 20 47 72 61 70  |.@. :..J. . Grap|
00000340  68 69 63 20 69 6e 74 65  72 66 61 63 65 0d 01 54  |hic interface..T|
00000350  0f 20 dd f2 64 72 61 77  66 75 6c 6c 0d 01 5e 17  |. ..drawfull..^.|
00000360  20 f4 20 53 65 74 20 75  70 20 63 6f 6e 73 74 61  | . Set up consta|
00000370  6e 74 73 0d 01 68 11 20  ea 73 78 2c 73 79 2c 77  |nts..h. .sx,sy,w|
00000380  69 64 74 68 0d 01 72 17  20 73 78 3d 31 3a 73 79  |idth..r. sx=1:sy|
00000390  3d 32 3a 77 69 64 74 68  3d 31 30 0d 01 7c 1c 20  |=2:width=10..|. |
000003a0  f4 20 44 72 61 77 20 67  72 65 65 6e 20 63 6f 75  |. Draw green cou|
000003b0  72 74 20 61 72 65 61 0d  01 86 25 20 db 3a e6 30  |rt area...% .:.0|
000003c0  2c 25 30 30 30 31 30 30  3a c8 93 20 c8 90 20 30  |,%000100:.. .. 0|
000003d0  2c 30 2c 31 32 37 39 2c  31 30 32 33 0d 01 90 26  |,0,1279,1023...&|
000003e0  20 f4 20 4d 61 72 6b 20  6f 75 74 20 77 68 69 74  | . Mark out whit|
000003f0  65 20 6c 69 6e 65 73 20  6f 6e 74 6f 20 63 6f 75  |e lines onto cou|
00000400  72 74 0d 01 9a b2 20 e6  30 2c 25 31 31 31 31 31  |rt.... .0,%11111|
00000410  31 3a c8 93 20 c8 90 20  73 78 2f 28 32 33 2e 37  |1:.. .. sx/(23.7|
00000420  37 2b 32 2a 73 78 29 2a  31 32 38 30 2c 73 79 2f  |7+2*sx)*1280,sy/|
00000430  28 31 30 2e 39 37 2b 32  2a 73 79 29 2a 31 30 32  |(10.97+2*sy)*102|
00000440  34 2c 32 33 2e 37 37 2f  28 32 33 2e 37 37 2b 32  |4,23.77/(23.77+2|
00000450  2a 73 78 29 2a 31 32 38  30 2c 77 69 64 74 68 3a  |*sx)*1280,width:|
00000460  c8 93 20 c8 90 20 73 78  2f 28 32 33 2e 37 37 2b  |.. .. sx/(23.77+|
00000470  32 2a 73 78 29 2a 31 32  38 30 2c 28 31 2e 33 37  |2*sx)*1280,(1.37|
00000480  2b 73 79 29 2f 28 31 30  2e 39 37 2b 32 2a 73 79  |+sy)/(10.97+2*sy|
00000490  29 2a 31 30 32 34 2c 32  33 2e 37 37 2f 28 32 33  |)*1024,23.77/(23|
000004a0  2e 37 37 2b 32 2a 73 78  29 2a 31 32 38 30 2c 77  |.77+2*sx)*1280,w|
000004b0  69 64 74 68 0d 01 a4 ae  20 c8 93 20 c8 90 20 73  |idth.... .. .. s|
000004c0  78 2f 28 32 33 2e 37 37  2b 32 2a 73 78 29 2a 31  |x/(23.77+2*sx)*1|
000004d0  32 38 30 2c 28 39 2e 36  2b 73 79 29 2f 28 31 30  |280,(9.6+sy)/(10|
000004e0  2e 39 37 2b 32 2a 73 79  29 2a 31 30 32 34 2c 32  |.97+2*sy)*1024,2|
000004f0  33 2e 37 37 2f 28 32 33  2e 37 37 2b 32 2a 73 78  |3.77/(23.77+2*sx|
00000500  29 2a 31 32 38 30 2c 77  69 64 74 68 3a c8 93 20  |)*1280,width:.. |
00000510  c8 90 20 73 78 2f 28 32  33 2e 37 37 2b 32 2a 73  |.. sx/(23.77+2*s|
00000520  78 29 2a 31 32 38 30 2c  28 31 30 2e 39 37 2b 73  |x)*1280,(10.97+s|
00000530  79 29 2f 28 31 30 2e 39  37 2b 32 2a 73 79 29 2a  |y)/(10.97+2*sy)*|
00000540  31 30 32 34 2c 32 33 2e  37 37 2f 28 32 33 2e 37  |1024,23.77/(23.7|
00000550  37 2b 32 2a 73 78 29 2a  31 32 38 30 2c 77 69 64  |7+2*sx)*1280,wid|
00000560  74 68 0d 01 ae 5f 20 c8  93 20 c8 90 20 28 73 78  |th..._ .. .. (sx|
00000570  2b 35 2e 34 37 29 2f 28  32 33 2e 37 37 2b 32 2a  |+5.47)/(23.77+2*|
00000580  73 78 29 2a 31 32 38 30  2c 28 73 79 2b 35 2e 34  |sx)*1280,(sy+5.4|
00000590  39 29 2f 28 31 30 2e 39  37 2b 32 2a 73 79 29 2a  |9)/(10.97+2*sy)*|
000005a0  31 30 32 34 2c 31 32 2e  38 2f 28 32 33 2e 37 37  |1024,12.8/(23.77|
000005b0  2b 32 2a 73 78 29 2a 31  32 38 30 2c 77 69 64 74  |+2*sx)*1280,widt|
000005c0  68 0d 01 b8 ae 20 c8 93  20 c8 90 20 73 78 2f 28  |h.... .. .. sx/(|
000005d0  32 33 2e 37 37 2b 32 2a  73 78 29 2a 31 32 38 30  |23.77+2*sx)*1280|
000005e0  2c 73 79 2f 28 31 30 2e  39 37 2b 32 2a 73 79 29  |,sy/(10.97+2*sy)|
000005f0  2a 31 30 32 34 2c 77 69  64 74 68 2c 31 30 2e 39  |*1024,width,10.9|
00000600  37 2f 28 31 30 2e 39 37  2b 32 2a 73 79 29 2a 31  |7/(10.97+2*sy)*1|
00000610  30 32 34 3a c8 93 20 c8  90 20 28 73 78 2b 32 33  |024:.. .. (sx+23|
00000620  2e 37 37 29 2f 28 32 33  2e 37 37 2b 32 2a 73 78  |.77)/(23.77+2*sx|
00000630  29 2a 31 32 38 30 2c 73  79 2f 28 31 30 2e 39 37  |)*1280,sy/(10.97|
00000640  2b 32 2a 73 79 29 2a 31  30 32 34 2c 77 69 64 74  |+2*sy)*1024,widt|
00000650  68 2c 31 30 2e 39 37 2f  28 31 30 2e 39 37 2b 32  |h,10.97/(10.97+2|
00000660  2a 73 79 29 2a 31 30 32  34 2b 77 69 64 74 68 0d  |*sy)*1024+width.|
00000670  01 c2 ba 20 c8 93 20 c8  90 20 28 73 78 2b 35 2e  |... .. .. (sx+5.|
00000680  34 37 29 2f 28 32 33 2e  37 37 2b 32 2a 73 78 29  |47)/(23.77+2*sx)|
00000690  2a 31 32 38 30 2c 28 73  79 2b 31 2e 33 37 29 2f  |*1280,(sy+1.37)/|
000006a0  28 31 30 2e 39 37 2b 32  2a 73 79 29 2a 31 30 32  |(10.97+2*sy)*102|
000006b0  34 2c 77 69 64 74 68 2c  38 2e 32 33 2f 28 31 30  |4,width,8.23/(10|
000006c0  2e 39 37 2b 32 2a 73 79  29 2a 31 30 32 34 3a c8  |.97+2*sy)*1024:.|
000006d0  93 20 c8 90 20 28 73 78  2b 31 38 2e 33 29 2f 28  |. .. (sx+18.3)/(|
000006e0  32 33 2e 37 37 2b 32 2a  73 78 29 2a 31 32 38 30  |23.77+2*sx)*1280|
000006f0  2c 28 73 79 2b 31 2e 33  37 29 2f 28 31 30 2e 39  |,(sy+1.37)/(10.9|
00000700  37 2b 32 2a 73 79 29 2a  31 30 32 34 2c 77 69 64  |7+2*sy)*1024,wid|
00000710  74 68 2c 38 2e 32 33 2f  28 31 30 2e 39 37 2b 32  |th,8.23/(10.97+2|
00000720  2a 73 79 29 2a 31 30 32  34 0d 01 cc 06 20 3a 0d  |*sy)*1024.... :.|
00000730  01 d6 0f 20 f4 20 44 72  61 77 20 6e 65 74 0d 01  |... . Draw net..|
00000740  e0 89 20 e6 30 2c 30 3a  e3 6c 3d 31 30 30 b8 39  |.. .0,0:.l=100.9|
00000750  32 34 88 31 30 3a ec 20  36 34 30 2c 6c 3a df 20  |24.10:. 640,l:. |
00000760  36 38 30 2c 6c 2b 35 30  3a ed 3a e3 6c 3d 30 b8  |680,l+50:.:.l=0.|
00000770  34 30 88 31 30 3a ec 20  36 34 30 2b 6c 2c 31 30  |40.10:. 640+l,10|
00000780  30 2b 6c 3a df 36 34 30  2b 6c 2c 39 32 34 2b 6c  |0+l:.640+l,924+l|
00000790  3a ed 3a e3 6c 3d 30 b8  35 3a ec 36 33 37 2b 6c  |:.:.l=0.5:.637+l|
000007a0  2c 31 30 30 3a df 36 37  37 2b 6c 2c 31 35 30 3a  |,100:.677+l,150:|
000007b0  ec 36 33 37 2b 6c 2c 39  32 34 3a df 36 37 37 2b  |.637+l,924:.677+|
000007c0  6c 2c 39 37 34 3a ed 0d  01 ea 22 20 e6 30 2c 25  |l,974:...." .0,%|
000007d0  31 31 31 31 31 31 3a ec  20 36 38 32 2c 31 34 32  |111111:. 682,142|
000007e0  3a df 36 38 32 2c 39 36  36 0d 01 f4 0e 20 f2 64  |:.682,966.... .d|
000007f0  72 61 77 6d 69 6e 69 0d  01 fe 06 20 e1 0d 02 08  |rawmini.... ....|
00000800  06 20 3a 0d 02 12 1d 20  f4 20 44 72 61 77 20 62  |. :.... . Draw b|
00000810  61 6c 6c 62 6f 74 20 61  6e 64 20 62 61 6c 6c 73  |allbot and balls|
00000820  0d 02 1c 0f 20 dd f2 64  72 61 77 6d 69 6e 69 0d  |.... ..drawmini.|
00000830  02 26 16 20 e6 33 2c 25  30 30 31 30 31 31 3a e3  |.&. .3,%001011:.|
00000840  62 3d 30 b8 34 0d 02 30  42 20 e7 20 62 61 6c 6c  |b=0.4..0B . ball|
00000850  28 62 2c 30 29 3c 3e 30  20 84 20 62 61 6c 6c 28  |(b,0)<>0 . ball(|
00000860  62 2c 31 29 3c 3e 30 20  8c 20 c8 93 20 c8 90 20  |b,1)<>0 . .. .. |
00000870  62 61 6c 6c 28 62 2c 30  29 2c 62 61 6c 6c 28 62  |ball(b,0),ball(b|
00000880  2c 31 29 2c 35 2c 35 0d  02 3a 06 20 ed 0d 02 44  |,1),5,5..:. ...D|
00000890  21 20 e6 33 2c 25 30 30  30 31 31 31 3a c8 93 20  |! .3,%000111:.. |
000008a0  c8 90 20 62 62 78 2c 62  62 79 2c 35 2c 35 0d 02  |.. bbx,bby,5,5..|
000008b0  4e 06 20 e1 0d 02 58 06  20 3a 0d 02 62 2a 20 f4  |N. ...X. :..b* .|
000008c0  20 55 73 65 72 20 69 6e  74 65 72 66 61 63 65 20  | User interface |
000008d0  28 70 75 74 74 69 6e 67  20 62 61 6c 6c 73 20 64  |(putting balls d|
000008e0  6f 77 6e 29 0d 02 6c 0b  20 dd f2 75 73 65 72 0d  |own)..l. ..user.|
000008f0  02 76 0d 20 c8 97 20 78  2c 79 2c 63 0d 02 80 0e  |.v. .. x,y,c....|
00000900  20 e7 20 63 3d 30 20 8c  20 e1 0d 02 8a 61 20 e7  | . c=0 . ....a .|
00000910  20 28 63 20 80 20 34 29  3c 3e 30 20 8c 20 f2 64  | (c . 4)<>0 . .d|
00000920  72 61 77 6d 69 6e 69 3a  62 61 6c 6c 28 63 75 72  |rawmini:ball(cur|
00000930  72 65 6e 74 2c 30 29 3d  78 3a 62 61 6c 6c 28 63  |rent,0)=x:ball(c|
00000940  75 72 72 65 6e 74 2c 31  29 3d 79 3a 63 75 72 72  |urrent,1)=y:curr|
00000950  65 6e 74 3d 28 63 75 72  72 65 6e 74 2b 31 29 83  |ent=(current+1).|
00000960  35 3a f2 64 72 61 77 6d  69 6e 69 0d 02 94 2a 20  |5:.drawmini...* |
00000970  e7 20 28 63 20 80 20 32  29 3c 3e 30 20 8c 20 69  |. (c . 2)<>0 . i|
00000980  64 6c 65 3d a3 3a 73 74  61 67 65 3d 30 3a 73 74  |dle=.:stage=0:st|
00000990  61 72 74 3d 91 0d 02 9e  06 20 f5 0d 02 a8 0d 20  |art=..... ..... |
000009a0  c8 97 20 78 2c 79 2c 63  0d 02 b2 0a 20 fd 20 63  |.. x,y,c.... . c|
000009b0  3d 30 0d 02 bc 06 20 e1  0d 02 c6 06 20 3a 0d 02  |=0.... ..... :..|
000009c0  d0 27 20 f4 20 43 61 6c  63 75 6c 61 74 65 20 62  |.' . Calculate b|
000009d0  61 6c 6c 62 6f 74 27 73  20 6e 65 77 20 70 6f 73  |allbot's new pos|
000009e0  69 74 69 6f 6e 0d 02 da  0d 20 dd f2 6d 6f 76 65  |ition.... ..move|
000009f0  69 74 0d 02 e4 41 20 e7  20 28 6c 65 66 74 20 80  |it...A . (left .|
00000a00  20 66 77 64 29 20 84 20  28 72 69 67 68 74 20 80  | fwd) . (right .|
00000a10  20 72 65 76 65 72 73 65  29 20 8c 20 64 69 72 3d  | reverse) . dir=|
00000a20  64 69 72 2d 32 2e 35 2a  28 31 2d 33 2a 74 75 72  |dir-2.5*(1-3*tur|
00000a30  62 6f 29 0d 02 ee 41 20  e7 20 28 72 69 67 68 74  |bo)...A . (right|
00000a40  20 80 20 66 77 64 29 20  84 20 28 6c 65 66 74 20  | . fwd) . (left |
00000a50  80 20 72 65 76 65 72 73  65 29 20 8c 20 64 69 72  |. reverse) . dir|
00000a60  3d 64 69 72 2b 32 2e 35  2a 28 31 2d 33 2a 74 75  |=dir+2.5*(1-3*tu|
00000a70  72 62 6f 29 0d 02 f8 06  20 3a 0d 03 02 29 20 f4  |rbo).... :...) .|
00000a80  20 47 65 74 20 64 69 72  65 63 74 69 6f 6e 20 69  | Get direction i|
00000a90  6e 20 72 61 6e 67 65 20  30 3c 74 68 65 74 61 3c  |n range 0<theta<|
00000aa0  33 36 30 0d 03 0c 1c 20  f5 20 e7 20 64 69 72 3c  |360.... . . dir<|
00000ab0  30 20 8c 20 64 69 72 3d  64 69 72 2b 33 36 30 0d  |0 . dir=dir+360.|
00000ac0  03 16 1d 20 e7 20 64 69  72 3e 3d 33 36 30 20 8c  |... . dir>=360 .|
00000ad0  20 64 69 72 3d 64 69 72  2d 33 36 30 0d 03 20 17  | dir=dir-360.. .|
00000ae0  20 fd 20 64 69 72 3e 3d  30 20 80 20 64 69 72 3c  | . dir>=0 . dir<|
00000af0  33 36 30 0d 03 2a 06 20  3a 0d 03 34 1c 20 66 72  |360..*. :..4. fr|
00000b00  3d 30 3a e7 20 66 77 64  20 8c 20 66 72 3d 66 72  |=0:. fwd . fr=fr|
00000b10  2b 30 2e 32 35 0d 03 3e  1b 20 e7 20 72 65 76 65  |+0.25..>. . reve|
00000b20  72 73 65 20 8c 20 66 72  3d 66 72 2d 30 2e 32 35  |rse . fr=fr-0.25|
00000b30  0d 03 48 16 20 e7 20 74  75 72 62 6f 20 8c 20 66  |..H. . turbo . f|
00000b40  72 3d 66 72 2a 34 0d 03  52 29 20 f2 64 72 61 77  |r=fr*4..R) .draw|
00000b50  6d 69 6e 69 3a 62 62 78  3d 62 62 78 2b 31 36 2a  |mini:bbx=bbx+16*|
00000b60  b5 28 af 2a 64 69 72 2f  31 38 30 29 2a 66 72 0d  |.(.*dir/180)*fr.|
00000b70  03 5c 1f 20 62 62 79 3d  62 62 79 2b 31 36 2a 9b  |.\. bby=bby+16*.|
00000b80  28 af 2a 64 69 72 2f 31  38 30 29 2a 66 72 0d 03  |(.*dir/180)*fr..|
00000b90  66 58 20 e3 62 61 6c 6c  3d 30 b8 34 3a e7 20 6f  |fX .ball=0.4:. o|
00000ba0  70 65 6e 20 80 20 94 28  62 62 78 2d 62 61 6c 6c  |pen . .(bbx-ball|
00000bb0  28 62 61 6c 6c 2c 30 29  29 3c 31 30 20 80 20 94  |(ball,0))<10 . .|
00000bc0  28 62 62 79 2d 62 61 6c  6c 28 62 61 6c 6c 2c 31  |(bby-ball(ball,1|
00000bd0  29 29 3c 31 30 20 8c 20  62 61 6c 6c 28 62 61 6c  |))<10 . ball(bal|
00000be0  6c 2c 30 29 3d 30 0d 03  70 10 20 ed 3a f2 64 72  |l,0)=0..p. .:.dr|
00000bf0  61 77 6d 69 6e 69 0d 03  7a 06 20 e1 0d 03 84 06  |awmini..z. .....|
00000c00  20 3a 0d 03 8e 73 20 f4  20 43 61 6c 63 75 6c 61  | :...s . Calcula|
00000c10  74 65 20 62 61 6c 6c 62  6f 74 27 73 20 62 61 63  |te ballbot's bac|
00000c20  6b 67 72 6f 75 6e 64 20  65 63 68 6f 20 72 65 61  |kground echo rea|
00000c30  64 69 6e 67 20 28 2d 62  61 6c 6c 73 29 2c 20 75  |ding (-balls), u|
00000c40  73 69 6e 67 20 73 65 76  65 72 61 6c 20 70 6f 69  |sing several poi|
00000c50  6e 74 73 20 74 6f 20 63  68 65 63 6b 20 6f 75 74  |nts to check out|
00000c60  20 77 68 65 72 65 20 6e  65 74 20 70 6f 73 74 73  | where net posts|
00000c70  20 61 72 65 2e 0d 03 98  15 20 dd a4 62 61 63 6b  | are..... ..back|
00000c80  28 78 2c 79 2c 66 72 65  71 29 0d 03 a2 12 20 ea  |(x,y,freq).... .|
00000c90  20 66 72 65 71 61 2c 64  75 6d 6d 79 0d 03 ac 2e  | freqa,dummy....|
00000ca0  20 66 72 65 71 61 3d a4  62 61 63 6b 32 28 78 2c  | freqa=.back2(x,|
00000cb0  79 2c 66 72 65 71 2c 31  30 30 2c 39 32 33 29 3a  |y,freq,100,923):|
00000cc0  66 74 79 70 65 24 3d 66  74 24 0d 03 b6 17 20 e7  |ftype$=ft$.... .|
00000cd0  20 66 74 24 3d 22 55 22  20 8c 20 3d 66 72 65 71  | ft$="U" . =freq|
00000ce0  61 0d 03 c0 49 20 64 75  6d 6d 79 3d a4 62 61 63  |a...I dummy=.bac|
00000cf0  6b 32 28 78 2c 79 2c 66  72 65 71 2c 31 30 30 2c  |k2(x,y,freq,100,|
00000d00  31 32 35 29 3a e7 20 66  74 24 3d 22 4e 22 20 80  |125):. ft$="N" .|
00000d10  20 64 75 6d 6d 79 3c 3d  66 72 65 71 61 20 8c 20  | dummy<=freqa . |
00000d20  66 74 79 70 65 24 3d 22  50 22 0d 03 ca 49 20 64  |ftype$="P"...I d|
00000d30  75 6d 6d 79 3d a4 62 61  63 6b 32 28 78 2c 79 2c  |ummy=.back2(x,y,|
00000d40  66 72 65 71 2c 38 39 38  2c 39 32 33 29 3a e7 20  |freq,898,923):. |
00000d50  66 74 24 3d 22 4e 22 20  80 20 64 75 6d 6d 79 3c  |ft$="N" . dummy<|
00000d60  3d 66 72 65 71 61 20 8c  20 66 74 79 70 65 24 3d  |=freqa . ftype$=|
00000d70  22 50 22 0d 03 d4 0b 20  3d 66 72 65 71 61 0d 03  |"P".... =freqa..|
00000d80  de 06 20 3a 0d 03 e8 27  20 f4 20 43 61 6c 63 75  |.. :...' . Calcu|
00000d90  6c 61 74 65 20 72 65 61  64 69 6e 67 20 66 72 6f  |late reading fro|
00000da0  6d 20 6f 6e 65 20 70 6f  69 6e 74 0d 03 f2 1e 20  |m one point.... |
00000db0  dd a4 62 61 63 6b 32 28  78 2c 79 2c 66 72 65 71  |..back2(x,y,freq|
00000dc0  2c 6d 69 6e 2c 6d 61 78  29 0d 03 fc 44 20 66 74  |,min,max)...D ft|
00000dd0  24 3d 22 55 22 3a f4 20  53 65 74 20 75 70 20 67  |$="U":. Set up g|
00000de0  65 6e 65 72 61 6c 20 76  61 6c 75 65 20 6f 66 20  |eneral value of |
00000df0  66 72 65 71 75 65 6e 63  79 20 74 79 70 65 20 28  |frequency type (|
00000e00  55 4e 49 44 45 4e 54 49  46 49 45 44 29 0d 04 06  |UNIDENTIFIED)...|
00000e10  30 20 f4 20 43 61 6c 63  75 6c 61 74 65 20 41 6e  |0 . Calculate An|
00000e20  67 6c 65 20 6f 66 20 6e  65 74 20 61 73 20 73 65  |gle of net as se|
00000e30  65 6e 20 62 79 20 42 61  6c 6c 62 6f 74 0d 04 10  |en by Ballbot...|
00000e40  0c 20 ea 20 66 72 65 71  61 0d 04 1a 2b 20 6e 65  |. . freqa...+ ne|
00000e50  74 6c 6f 77 3d 28 a4 61  6e 67 6c 65 28 36 34 30  |tlow=(.angle(640|
00000e60  2c 6d 61 78 2c 78 2c 79  29 2d 64 69 72 29 20 83  |,max,x,y)-dir) .|
00000e70  20 33 36 30 0d 04 24 23  20 e7 20 6e 65 74 6c 6f  | 360..$# . netlo|
00000e80  77 3c 30 20 8c 20 6e 65  74 6c 6f 77 3d 6e 65 74  |w<0 . netlow=net|
00000e90  6c 6f 77 2b 33 36 30 0d  04 2e 25 20 e7 20 6e 65  |low+360...% . ne|
00000ea0  74 6c 6f 77 3e 31 38 30  20 8c 20 6e 65 74 6c 6f  |tlow>180 . netlo|
00000eb0  77 3d 6e 65 74 6c 6f 77  2d 33 36 30 0d 04 38 2a  |w=netlow-360..8*|
00000ec0  20 6e 65 74 68 69 3d 28  a4 61 6e 67 6c 65 28 36  | nethi=(.angle(6|
00000ed0  34 30 2c 6d 69 6e 2c 78  2c 79 29 2d 64 69 72 29  |40,min,x,y)-dir)|
00000ee0  20 83 20 33 36 30 0d 04  42 20 20 e7 20 6e 65 74  | . 360..B  . net|
00000ef0  68 69 3c 30 20 8c 20 6e  65 74 68 69 3d 6e 65 74  |hi<0 . nethi=net|
00000f00  68 69 2b 33 36 30 0d 04  4c 22 20 e7 20 6e 65 74  |hi+360..L" . net|
00000f10  68 69 3e 31 38 30 20 8c  20 6e 65 74 68 69 3d 6e  |hi>180 . nethi=n|
00000f20  65 74 68 69 2d 33 36 30  0d 04 56 06 20 3a 0d 04  |ethi-360..V. :..|
00000f30  60 18 20 f4 20 43 61 6c  63 75 6c 61 74 65 20 72  |`. . Calculate r|
00000f40  65 61 64 69 6e 67 0d 04  6a 16 20 66 72 65 71 61  |eading..j. freqa|
00000f50  3d 66 72 65 71 2b b3 28  36 29 2d 33 0d 04 74 8b  |=freq+.(6)-3..t.|
00000f60  20 e7 20 94 28 b5 28 af  2a 64 69 72 2f 31 38 30  | . .(.(.*dir/180|
00000f70  29 29 3e 30 2e 30 31 20  8c 20 e7 20 28 28 6e 65  |))>0.01 . . ((ne|
00000f80  74 6c 6f 77 3c 30 20 80  20 6e 65 74 68 69 3e 30  |tlow<0 . nethi>0|
00000f90  29 20 84 20 28 6e 65 74  68 69 3c 30 20 80 20 6e  |) . (nethi<0 . n|
00000fa0  65 74 6c 6f 77 3e 30 29  29 20 80 20 28 36 34 30  |etlow>0)) . (640|
00000fb0  2d 78 29 2f b5 28 af 2a  64 69 72 2f 31 38 30 29  |-x)/.(.*dir/180)|
00000fc0  3e 30 20 8c 20 66 72 65  71 61 3d 28 36 34 30 2d  |>0 . freqa=(640-|
00000fd0  78 29 2f b5 28 af 2a 64  69 72 2f 31 38 30 29 3a  |x)/.(.*dir/180):|
00000fe0  66 74 24 3d 22 4e 22 0d  04 7e 0b 20 3d 66 72 65  |ft$="N"..~. =fre|
00000ff0  71 61 0d 04 88 06 20 3a  0d 04 92 32 20 f4 20 43  |qa.... :...2 . C|
00001000  61 6c 63 75 6c 61 74 65  20 42 61 6c 6c 62 6f 74  |alculate Ballbot|
00001010  27 73 20 72 65 61 64 69  6e 67 73 20 28 4d 41 49  |'s readings (MAI|
00001020  4e 20 52 4f 55 54 49 4e  45 29 0d 04 9c 06 20 3a  |N ROUTINE).... :|
00001030  0d 04 a6 0c 20 dd f2 73  65 6e 73 65 0d 04 b0 2a  |.... ..sense...*|
00001040  20 f4 20 47 65 74 20 62  61 63 6b 67 72 6f 75 6e  | . Get backgroun|
00001050  64 20 72 65 61 64 69 6e  67 73 20 66 72 6f 6d 20  |d readings from |
00001060  46 4e 62 61 63 6b 0d 04  ba 15 20 66 72 65 71 3d  |FNback.... freq=|
00001070  b3 28 32 35 30 29 2b 31  35 30 30 0d 04 c4 29 20  |.(250)+1500...) |
00001080  66 72 65 71 61 3d a4 62  61 63 6b 28 62 62 78 2c  |freqa=.back(bbx,|
00001090  62 62 79 2c 66 72 65 71  29 3a 66 61 24 3d 66 74  |bby,freq):fa$=ft|
000010a0  79 70 65 24 0d 04 ce 34  20 64 69 72 3d 64 69 72  |ype$...4 dir=dir|
000010b0  2d 33 30 3a 66 72 65 71  62 3d a4 62 61 63 6b 28  |-30:freqb=.back(|
000010c0  62 62 78 2c 62 62 79 2c  66 72 65 71 29 3a 66 62  |bbx,bby,freq):fb|
000010d0  24 3d 66 74 79 70 65 24  0d 04 d8 34 20 64 69 72  |$=ftype$...4 dir|
000010e0  3d 64 69 72 2b 36 30 3a  66 72 65 71 63 3d a4 62  |=dir+60:freqc=.b|
000010f0  61 63 6b 28 62 62 78 2c  62 62 79 2c 66 72 65 71  |ack(bbx,bby,freq|
00001100  29 3a 66 63 24 3d 66 74  79 70 65 24 0d 04 e2 40  |):fc$=ftype$...@|
00001110  20 64 69 72 3d 64 69 72  2d 31 30 35 3a 66 72 65  | dir=dir-105:fre|
00001120  71 64 3d a4 62 61 63 6b  28 62 62 78 2c 62 62 79  |qd=.back(bbx,bby|
00001130  2c 66 72 65 71 29 3a 64  69 72 3d 64 69 72 2b 37  |,freq):dir=dir+7|
00001140  35 3a 66 64 24 3d 66 74  79 70 65 24 0d 04 ec 06  |5:fd$=ftype$....|
00001150  20 3a 0d 04 f6 44 20 f4  20 41 64 64 20 61 6e 79  | :...D . Add any|
00001160  20 72 65 6c 65 76 61 6e  74 20 62 61 6c 6c 73 20  | relevant balls |
00001170  74 6f 20 72 65 61 64 69  6e 67 73 20 28 75 73 69  |to readings (usi|
00001180  6e 67 20 68 61 69 72 79  20 74 72 69 67 6f 6e 6f  |ng hairy trigono|
00001190  6d 65 74 72 79 29 0d 05  00 06 20 3a 0d 05 0a 0e  |metry).... :....|
000011a0  20 e3 62 61 6c 6c 3d 30  b8 34 0d 05 14 34 20 64  | .ball=0.4...4 d|
000011b0  25 3d b6 28 28 62 61 6c  6c 28 62 61 6c 6c 2c 30  |%=.((ball(ball,0|
000011c0  29 2d 62 62 78 29 5e 32  2b 28 62 61 6c 6c 28 62  |)-bbx)^2+(ball(b|
000011d0  61 6c 6c 2c 31 29 2d 62  62 79 29 5e 32 29 0d 05  |all,1)-bby)^2)..|
000011e0  1e 1f 20 e7 20 62 61 6c  6c 28 62 61 6c 6c 2c 30  |.. . ball(ball,0|
000011f0  29 3d 30 20 8c 20 64 25  3d 39 39 39 39 0d 05 28  |)=0 . d%=9999..(|
00001200  34 20 61 3d a4 61 6e 67  6c 65 28 62 61 6c 6c 28  |4 a=.angle(ball(|
00001210  62 61 6c 6c 2c 30 29 2c  62 61 6c 6c 28 62 61 6c  |ball,0),ball(bal|
00001220  6c 2c 31 29 2c 62 62 78  2c 62 62 79 29 2d 64 69  |l,1),bbx,bby)-di|
00001230  72 0d 05 32 2c 20 e7 20  94 28 61 29 3c 31 35 20  |r..2, . .(a)<15 |
00001240  80 20 66 72 65 71 61 3e  64 25 20 8c 20 66 72 65  |. freqa>d% . fre|
00001250  71 61 3d 64 25 3a 66 61  24 3d 22 42 22 0d 05 3c  |qa=d%:fa$="B"..<|
00001260  33 20 e7 20 61 3e 2d 34  36 20 80 20 61 3c 3d 2d  |3 . a>-46 . a<=-|
00001270  31 35 20 80 20 66 72 65  71 62 3e 64 25 20 8c 20  |15 . freqb>d% . |
00001280  66 72 65 71 62 3d 64 25  3a 66 62 24 3d 22 42 22  |freqb=d%:fb$="B"|
00001290  0d 05 46 31 20 e7 20 61  3e 3d 31 35 20 80 20 61  |..F1 . a>=15 . a|
000012a0  3c 34 36 20 80 20 66 72  65 71 63 3e 64 25 20 8c  |<46 . freqc>d% .|
000012b0  20 66 72 65 71 63 3d 64  25 3a 66 63 24 3d 22 42  | freqc=d%:fc$="B|
000012c0  22 0d 05 50 33 20 e7 20  61 3e 2d 39 30 20 80 20  |"..P3 . a>-90 . |
000012d0  61 3c 3d 2d 34 36 20 80  20 66 72 65 71 64 3e 64  |a<=-46 . freqd>d|
000012e0  25 20 8c 20 66 72 65 71  64 3d 64 25 3a 66 64 24  |% . freqd=d%:fd$|
000012f0  3d 22 42 22 0d 05 5a 06  20 ed 0d 05 64 06 20 3a  |="B"..Z. ...d. :|
00001300  0d 05 6e 1b 20 f4 20 55  70 64 61 74 65 20 75 73  |..n. . Update us|
00001310  65 72 20 64 69 73 70 6c  61 79 73 0d 05 78 06 20  |er displays..x. |
00001320  3a 0d 05 82 3b 20 f1 8a  30 2c 30 29 a8 28 28 91  |:...; ..0,0).((.|
00001330  2d 73 74 61 72 74 29 2f  31 32 30 30 30 29 3b 22  |-start)/12000);"|
00001340  3a 22 3b 28 a8 28 28 91  2d 73 74 61 72 74 29 2f  |:";(.((.-start)/|
00001350  32 30 30 29 83 36 30 29  3b 22 20 22 0d 05 8c 3a  |200).60);" "...:|
00001360  20 f1 8a 30 2c 33 31 29  66 64 24 2c 66 62 24 2c  | ..0,31)fd$,fb$,|
00001370  66 61 24 2c 66 63 24 2c  73 74 61 67 65 2c a8 28  |fa$,fc$,stage,.(|
00001380  73 65 61 72 63 68 69 6e  67 29 2c 6c 65 66 74 2c  |searching),left,|
00001390  72 69 67 68 74 3b 0d 05  96 37 20 d4 20 31 2c 2d  |right;...7 . 1,-|
000013a0  31 2c 66 72 65 71 61 2f  34 2c 35 3a d4 20 32 2c  |1,freqa/4,5:. 2,|
000013b0  2d 31 2c 66 72 65 71 62  2f 34 2c 35 3a d4 20 33  |-1,freqb/4,5:. 3|
000013c0  2c 2d 31 2c 66 72 65 71  63 2f 34 2c 35 0d 05 a0  |,-1,freqc/4,5...|
000013d0  06 20 e1 0d 05 aa 05 3a  0d 05 b4 24 20 f4 20 43  |. .....:...$ . C|
000013e0  61 6c 63 75 6c 61 74 65  20 62 65 61 72 69 6e 67  |alculate bearing|
000013f0  20 6f 66 20 42 20 66 72  6f 6d 20 41 0d 05 be 19  | of B from A....|
00001400  20 dd a4 61 6e 67 6c 65  28 78 31 2c 79 31 2c 78  | ..angle(x1,y1,x|
00001410  32 2c 79 32 29 0d 05 c8  34 20 e7 20 79 32 3d 79  |2,y2)...4 . y2=y|
00001420  31 20 8c 20 61 6e 67 3d  39 30 20 8b 20 61 6e 67  |1 . ang=90 . ang|
00001430  3d 31 38 30 2a 99 28 28  78 32 2d 78 31 29 2f 28  |=180*.((x2-x1)/(|
00001440  79 32 2d 79 31 29 29 2f  af 0d 05 d2 1c 20 e7 20  |y2-y1))/..... . |
00001450  28 79 32 3e 79 31 29 20  8c 20 61 6e 67 3d 61 6e  |(y2>y1) . ang=an|
00001460  67 2b 31 38 30 0d 05 dc  1a 20 e7 20 61 6e 67 3c  |g+180.... . ang<|
00001470  30 20 8c 20 61 6e 67 3d  61 6e 67 2b 33 36 30 0d  |0 . ang=ang+360.|
00001480  05 e6 0f 20 3d 61 6e 67  20 83 20 33 36 30 0d 05  |... =ang . 360..|
00001490  f0 06 20 3a 0d 05 fa 2a  20 f4 20 42 41 4c 4c 42  |.. :...* . BALLB|
000014a0  4f 54 20 52 4f 42 4f 54  49 43 20 49 4e 54 45 4c  |OT ROBOTIC INTEL|
000014b0  4c 49 47 45 4e 43 45 20  4d 4f 44 55 4c 45 0d 06  |LIGENCE MODULE..|
000014c0  04 06 20 3a 0d 06 0e 1c  20 dd a4 61 69 28 66 72  |.. :.... ..ai(fr|
000014d0  65 71 61 2c 66 72 65 71  62 2c 66 72 65 71 63 29  |eqa,freqb,freqc)|
000014e0  0d 06 18 39 20 f4 20 41  72 74 69 66 69 63 69 61  |...9 . Artificia|
000014f0  6c 20 69 6e 74 65 6c 6c  69 67 65 6e 63 65 20 72  |l intelligence r|
00001500  6f 75 74 69 6e 65 73 20  28 69 65 2e 20 57 68 61  |outines (ie. Wha|
00001510  74 20 4e 65 78 74 3f 3f  29 0d 06 22 22 20 ea 66  |t Next??).."" .f|
00001520  77 64 2c 72 65 76 65 72  73 65 2c 6c 65 66 74 2c  |wd,reverse,left,|
00001530  72 69 67 68 74 2c 74 75  72 62 6f 0d 06 2c 2b 20  |right,turbo..,+ |
00001540  66 77 64 3d b9 3a 72 65  76 65 72 73 65 3d a3 3a  |fwd=.:reverse=.:|
00001550  6c 65 66 74 3d a3 3a 72  69 67 68 74 3d a3 3a 74  |left=.:right=.:t|
00001560  75 72 62 6f 3d a3 0d 06  36 06 20 3a 0d 06 40 40  |urbo=...6. :..@@|
00001570  20 f4 20 57 68 61 74 20  73 74 61 67 65 20 61 72  | . What stage ar|
00001580  65 20 77 65 20 69 6e 3f  20 48 75 6e 74 20 66 6f  |e we in? Hunt fo|
00001590  72 20 62 61 6c 6c 73 20  6f 72 20 6d 6f 76 65 20  |r balls or move |
000015a0  74 6f 20 6e 65 77 20 61  72 65 61 3f 0d 06 4a 27  |to new area?..J'|
000015b0  20 e7 20 6e 65 61 72 3c  3e 30 20 80 20 73 74 61  | . near<>0 . sta|
000015c0  67 65 3c 38 20 8c 20 f2  64 6f 6e 65 61 72 73 74  |ge<8 . .donearst|
000015d0  75 66 66 0d 06 54 2b 20  e7 20 6e 65 61 72 3d 30  |uff..T+ . near=0|
000015e0  20 80 20 28 73 74 61 67  65 3d 30 20 84 20 73 74  | . (stage=0 . st|
000015f0  61 67 65 3d 32 29 20 8c  20 f2 68 75 6e 74 0d 06  |age=2) . .hunt..|
00001600  5e 2e 20 e7 20 6e 65 61  72 3d 30 20 80 20 28 73  |^. . near=0 . (s|
00001610  74 61 67 65 3d 31 20 84  20 73 74 61 67 65 3d 33  |tage=1 . stage=3|
00001620  29 20 8c 20 f2 6d 6f 76  65 6f 75 74 0d 06 68 1a  |) . .moveout..h.|
00001630  20 e7 20 73 74 61 67 65  3d 34 20 8c 20 f2 72 65  | . stage=4 . .re|
00001640  6c 65 61 73 65 62 0d 06  72 06 20 3a 0d 06 7c 32  |leaseb..r. :..|2|
00001650  20 f4 20 50 72 65 70 61  72 65 20 6f 75 74 70 75  | . Prepare outpu|
00001660  74 20 69 6e 74 6f 20 62  69 6e 61 72 79 20 66 6f  |t into binary fo|
00001670  72 20 74 72 61 6e 73 6d  69 73 73 69 6f 6e 0d 06  |r transmission..|
00001680  86 1f 20 66 65 65 64 3d  30 3a e7 20 66 77 64 20  |.. feed=0:. fwd |
00001690  8c 20 66 65 65 64 3d 66  65 65 64 2b 31 0d 06 90  |. feed=feed+1...|
000016a0  17 20 e7 20 72 65 76 69  6e 67 20 8c 20 74 75 72  |. . reving . tur|
000016b0  62 6f 3d b9 0d 06 9a 1c  20 e7 20 72 65 76 65 72  |bo=..... . rever|
000016c0  73 65 20 8c 20 66 65 65  64 3d 66 65 65 64 2b 32  |se . feed=feed+2|
000016d0  0d 06 a4 19 20 e7 20 6c  65 66 74 20 8c 20 66 65  |.... . left . fe|
000016e0  65 64 3d 66 65 65 64 2b  34 0d 06 ae 1a 20 e7 20  |ed=feed+4.... . |
000016f0  72 69 67 68 74 20 8c 20  66 65 65 64 3d 66 65 65  |right . feed=fee|
00001700  64 2b 38 0d 06 b8 1b 20  e7 20 74 75 72 62 6f 20  |d+8.... . turbo |
00001710  8c 20 66 65 65 64 3d 66  65 65 64 2b 31 36 0d 06  |. feed=feed+16..|
00001720  c2 20 20 e7 20 6f 70 65  6e 63 74 65 72 3e 30 20  |.  . opencter>0 |
00001730  8c 20 66 65 65 64 3d 66  65 65 64 2b 33 32 0d 06  |. feed=feed+32..|
00001740  cc 0a 20 3d 66 65 65 64  0d 06 d6 06 20 3a 0d 06  |.. =feed.... :..|
00001750  e0 28 20 f4 20 50 65 72  66 6f 72 6d 20 61 20 73  |.( . Perform a s|
00001760  77 65 65 70 20 74 6f 20  66 69 6e 64 20 61 6e 79  |weep to find any|
00001770  20 62 61 6c 6c 73 0d 06  ea 0b 20 dd f2 68 75 6e  | balls.... ..hun|
00001780  74 0d 06 f4 23 20 f4 20  57 61 74 63 68 20 6f 75  |t...# . Watch ou|
00001790  74 20 69 66 20 74 6f 6f  20 6e 65 61 72 20 74 6f  |t if too near to|
000017a0  20 6e 65 74 0d 06 fe be  20 e7 28 28 66 72 65 71  | net.... .((freq|
000017b0  61 3c 32 30 80 20 66 61  24 3c 3e 22 42 22 29 84  |a<20. fa$<>"B").|
000017c0  28 66 72 65 71 62 3c 32  30 80 20 66 62 24 3c 3e  |(freqb<20. fb$<>|
000017d0  22 42 22 29 84 28 66 72  65 71 63 3c 32 30 80 20  |"B").(freqc<20. |
000017e0  66 63 24 3c 3e 22 42 22  29 29 84 28 72 65 76 69  |fc$<>"B")).(revi|
000017f0  6e 67 20 80 28 28 66 72  65 71 61 3c 31 35 30 80  |ng .((freqa<150.|
00001800  20 66 61 24 3c 3e 22 42  22 29 84 28 66 72 65 71  | fa$<>"B").(freq|
00001810  62 3c 31 35 30 80 20 66  62 24 3c 3e 22 42 22 29  |b<150. fb$<>"B")|
00001820  84 28 66 72 65 71 63 3c  31 35 30 80 20 66 63 24  |.(freqc<150. fc$|
00001830  3c 3e 22 42 22 29 29 29  8c 72 65 76 69 6e 67 3d  |<>"B"))).reving=|
00001840  b9 3a 72 65 76 65 72 73  65 3d b9 3a 66 77 64 3d  |.:reverse=.:fwd=|
00001850  a3 3a 6c 65 66 74 3d a3  3a 72 69 67 68 74 3d b9  |.:left=.:right=.|
00001860  3a e1 0d 07 08 0d 20 72  65 76 69 6e 67 3d a3 0d  |:..... reving=..|
00001870  07 12 06 20 3a 0d 07 1c  3a 20 f4 20 49 66 20 42  |... :...: . If B|
00001880  61 6c 6c 20 69 73 20 6f  75 74 20 6f 66 20 72 65  |all is out of re|
00001890  61 63 68 20 69 6e 20 74  68 65 20 22 44 22 20 73  |ach in the "D" s|
000018a0  65 63 74 6f 72 2c 20 72  65 76 65 72 73 65 21 0d  |ector, reverse!.|
000018b0  07 26 bf 20 46 44 52 3d  66 72 65 71 64 2a 31 2e  |.&. FDR=freqd*1.|
000018c0  32 35 3a e7 66 72 65 71  64 3c 31 35 30 80 66 64  |25:.freqd<150.fd|
000018d0  24 3d 22 42 22 80 46 44  52 3c 66 72 65 71 61 20  |$="B".FDR<freqa |
000018e0  80 46 44 52 3c 66 72 65  71 62 20 80 46 44 52 3c  |.FDR<freqb .FDR<|
000018f0  66 72 65 71 63 20 80 28  66 61 24 3c 3e 22 42 22  |freqc .(fa$<>"B"|
00001900  84 66 72 65 71 61 3e 31  30 30 29 80 28 66 62 24  |.freqa>100).(fb$|
00001910  3c 3e 22 42 22 84 66 72  65 71 62 3e 31 30 30 29  |<>"B".freqb>100)|
00001920  80 28 66 63 24 3c 3e 22  42 22 84 66 72 65 71 63  |.(fc$<>"B".freqc|
00001930  3e 31 30 30 29 8c 20 74  75 72 62 6f 3d b9 3a 72  |>100). turbo=.:r|
00001940  65 76 65 72 73 65 3d b9  3a 66 77 64 3d a3 3a 72  |everse=.:fwd=.:r|
00001950  69 67 68 74 3d b9 3a 66  61 72 6c 65 66 74 3d 2d  |ight=.:farleft=-|
00001960  36 2a 28 66 72 65 71 64  3e 34 30 29 3a e1 0d 07  |6*(freqd>40):...|
00001970  30 12 20 e7 20 66 61 72  6c 65 66 74 3e 30 20 8c  |0. . farleft>0 .|
00001980  0d 07 3a 37 20 20 66 61  72 6c 65 66 74 3d 66 61  |..:7  farleft=fa|
00001990  72 6c 65 66 74 2d 31 3a  72 65 76 65 72 73 65 3d  |rleft-1:reverse=|
000019a0  b9 3a 66 77 64 3d a3 3a  72 69 67 68 74 3d b9 3a  |.:fwd=.:right=.:|
000019b0  74 75 72 62 6f 3d b9 0d  07 44 33 20 20 e7 20 66  |turbo=...D3  . f|
000019c0  61 24 3d 22 42 22 20 84  20 28 66 64 24 3c 3e 22  |a$="B" . (fd$<>"|
000019d0  42 22 20 80 20 66 62 24  3c 3e 22 42 22 29 20 8c  |B" . fb$<>"B") .|
000019e0  20 66 61 72 6c 65 66 74  3d 30 0d 07 4e 07 20 20  | farleft=0..N.  |
000019f0  e1 0d 07 58 06 20 cd 0d  07 62 06 20 3a 0d 07 6c  |...X. ...b. :..l|
00001a00  1a 20 f4 20 52 6f 74 61  74 65 20 74 6f 20 66 61  |. . Rotate to fa|
00001a10  63 65 20 62 61 6c 6c 0d  07 76 66 20 6f 70 65 6e  |ce ball..vf open|
00001a20  63 74 65 72 3d 2d 35 2a  28 28 28 66 72 65 71 61  |cter=-5*(((freqa|
00001a30  3c 32 30 29 80 66 61 24  3d 22 42 22 29 84 28 28  |<20).fa$="B").((|
00001a40  66 72 65 71 62 3c 32 30  29 80 66 62 24 3d 22 42  |freqb<20).fb$="B|
00001a50  22 29 84 28 28 66 72 65  71 63 3c 32 30 29 80 66  |").((freqc<20).f|
00001a60  63 24 3d 22 42 22 29 84  28 28 66 72 65 71 64 3c  |c$="B").((freqd<|
00001a70  32 30 29 80 66 64 24 3d  22 42 22 29 29 0d 07 80  |20).fd$="B"))...|
00001a80  44 20 e7 20 66 61 24 3d  22 42 22 20 8c 20 74 65  |D . fa$="B" . te|
00001a90  6e 64 69 6e 67 3d 25 30  31 3a 73 65 61 72 63 68  |nding=%01:search|
00001aa0  69 6e 67 3d 73 65 61 72  63 68 69 6e 67 2f 32 3a  |ing=searching/2:|
00001ab0  74 75 72 62 6f 3d 66 72  65 71 61 3e 31 30 30 3a  |turbo=freqa>100:|
00001ac0  e1 0d 07 8a 25 20 e7 20  66 62 24 3d 22 42 22 20  |....% . fb$="B" |
00001ad0  8c 20 74 65 6e 64 69 6e  67 3d 25 31 31 3a 6c 65  |. tending=%11:le|
00001ae0  66 74 3d b9 3a e1 0d 07  94 26 20 e7 20 66 63 24  |ft=.:....& . fc$|
00001af0  3d 22 42 22 20 8c 20 74  65 6e 64 69 6e 67 3d 25  |="B" . tending=%|
00001b00  30 31 3a 72 69 67 68 74  3d b9 3a e1 0d 07 9e 30  |01:right=.:....0|
00001b10  20 f4 20 49 66 20 6e 6f  20 62 61 6c 6c 20 69 6e  | . If no ball in|
00001b20  20 73 69 67 68 74 2c 20  63 6f 6e 74 69 6e 75 65  | sight, continue|
00001b30  20 72 6f 74 61 74 69 6f  6e 2e 2e 2e 0d 07 a8 59  | rotation......Y|
00001b40  20 61 6c 69 67 6e 3d a3  3a 73 65 61 72 63 68 69  | align=.:searchi|
00001b50  6e 67 3d 73 65 61 72 63  68 69 6e 67 2b 31 3a 72  |ng=searching+1:r|
00001b60  65 76 65 72 73 65 3d b9  3a 66 77 64 3d b9 3a e7  |everse=.:fwd=.:.|
00001b70  20 28 74 65 6e 64 69 6e  67 20 80 20 31 29 3c 3e  | (tending . 1)<>|
00001b80  30 20 8c 20 66 77 64 3d  a3 20 8b 20 72 65 76 65  |0 . fwd=. . reve|
00001b90  72 73 65 3d a3 0d 07 aa  2a 20 e7 20 28 74 65 6e  |rse=....* . (ten|
00001ba0  64 69 6e 67 20 80 20 32  29 3c 3e 30 20 8c 20 72  |ding . 2)<>0 . r|
00001bb0  69 67 68 74 3d b9 20 8b  20 6c 65 66 74 3d b9 0d  |ight=. . left=..|
00001bc0  07 ac 2e 20 e7 20 73 65  61 72 63 68 69 6e 67 3d  |... . searching=|
00001bd0  35 20 8c 20 74 65 6e 64  69 6e 67 3d 28 74 65 6e  |5 . tending=(ten|
00001be0  64 69 6e 67 20 82 20 32  29 20 80 20 32 0d 07 ad  |ding . 2) . 2...|
00001bf0  28 20 e7 20 73 65 61 72  63 68 69 6e 67 3e 35 20  |( . searching>5 |
00001c00  8c 20 74 65 6e 64 69 6e  67 3d 74 65 6e 64 69 6e  |. tending=tendin|
00001c10  67 20 80 20 32 0d 07 b2  24 20 e7 20 73 65 61 72  |g . 2...$ . sear|
00001c20  63 68 69 6e 67 3e 31 35  30 20 8c 20 73 74 61 67  |ching>150 . stag|
00001c30  65 3d 73 74 61 67 65 2b  31 0d 07 bc 06 20 e1 0d  |e=stage+1.... ..|
00001c40  07 c6 06 20 3a 0d 07 d0  3c 20 f4 20 46 69 6e 64  |... :...< . Find|
00001c50  20 65 64 67 65 20 6f 66  20 6e 65 74 20 61 6e 64  | edge of net and|
00001c60  20 61 69 6d 20 66 6f 72  20 69 74 20 74 6f 20 6d  | aim for it to m|
00001c70  6f 76 65 20 74 6f 20 6f  74 68 65 72 20 73 69 64  |ove to other sid|
00001c80  65 0d 07 da 0e 20 dd f2  6d 6f 76 65 6f 75 74 0d  |e.... ..moveout.|
00001c90  07 e4 23 20 f4 20 57 61  74 63 68 20 6f 75 74 20  |..# . Watch out |
00001ca0  69 66 20 74 6f 6f 20 6e  65 61 72 20 74 6f 20 6e  |if too near to n|
00001cb0  65 74 0d 07 ee 8e 20 e7  20 28 66 72 65 71 61 3c  |et.... . (freqa<|
00001cc0  33 30 20 84 20 66 72 65  71 62 3c 33 30 20 84 20  |30 . freqb<30 . |
00001cd0  66 72 65 71 63 3c 33 30  29 20 84 20 28 72 65 76  |freqc<30) . (rev|
00001ce0  69 6e 67 20 80 20 28 66  72 65 71 61 3c 31 32 35  |ing . (freqa<125|
00001cf0  20 84 20 66 72 65 71 62  3c 31 32 35 20 84 20 66  | . freqb<125 . f|
00001d00  72 65 71 63 3c 31 32 35  29 29 20 8c 20 72 65 76  |reqc<125)) . rev|
00001d10  69 6e 67 3d b9 3a 66 61  72 6c 65 66 74 3d 30 3a  |ing=.:farleft=0:|
00001d20  72 65 76 65 72 73 65 3d  b9 3a 66 77 64 3d a3 3a  |reverse=.:fwd=.:|
00001d30  6c 65 66 74 3d a3 3a 72  69 67 68 74 3d a3 3a e1  |left=.:right=.:.|
00001d40  0d 07 f8 0d 20 72 65 76  69 6e 67 3d a3 0d 08 02  |.... reving=....|
00001d50  2c 20 f4 20 41 6c 69 67  6e 20 62 61 6c 6c 62 6f  |, . Align ballbo|
00001d60  74 20 74 6f 20 66 61 63  65 20 74 68 65 20 6e 65  |t to face the ne|
00001d70  74 20 70 6f 73 74 2e 2e  2e 0d 08 0c 36 20 e7 20  |t post......6 . |
00001d80  66 72 65 71 64 3c 37 35  20 80 20 66 62 24 3d 22  |freqd<75 . fb$="|
00001d90  4e 22 20 8c 20 66 61 72  6c 65 66 74 3d 35 3a 6c  |N" . farleft=5:l|
00001da0  65 66 74 3d b9 3a 74 75  72 62 6f 3d b9 3a e1 0d  |eft=.:turbo=.:..|
00001db0  08 16 35 20 e7 20 66 61  72 6c 65 66 74 3e 30 20  |..5 . farleft>0 |
00001dc0  8c 20 66 61 72 6c 65 66  74 3d 66 61 72 6c 65 66  |. farleft=farlef|
00001dd0  74 2d 31 3a 6c 65 66 74  3d b9 3a 74 75 72 62 6f  |t-1:left=.:turbo|
00001de0  3d b9 3a e1 0d 08 20 1c  20 e7 20 66 72 65 71 61  |=.:... . . freqa|
00001df0  3c 33 35 30 20 8c 20 72  69 67 68 74 3d b9 3a e1  |<350 . right=.:.|
00001e00  0d 08 2a 37 20 e7 20 66  64 24 3d 22 4e 22 20 80  |..*7 . fd$="N" .|
00001e10  20 66 62 24 3d 22 50 22  20 80 20 66 72 65 71 62  | fb$="P" . freqb|
00001e20  3c 31 35 30 20 8c 20 72  69 67 68 74 3d b9 3a 6e  |<150 . right=.:n|
00001e30  65 61 72 3d 31 3a e1 0d  08 34 34 20 e7 20 66 72  |ear=1:...44 . fr|
00001e40  65 71 61 3c 32 30 30 20  80 20 66 72 65 71 62 3c  |eqa<200 . freqb<|
00001e50  32 30 30 20 80 20 66 72  65 71 63 3c 32 30 30 20  |200 . freqc<200 |
00001e60  8c 20 72 69 67 68 74 3d  b9 3a e1 0d 08 3e 23 20  |. right=.:...># |
00001e70  e7 20 28 66 72 65 71 62  2a 31 2e 35 29 3e 66 72  |. (freqb*1.5)>fr|
00001e80  65 71 63 20 8c 20 6c 65  66 74 3d b9 3a e1 0d 08  |eqc . left=.:...|
00001e90  48 1a 20 e7 20 66 72 65  71 62 3e 31 30 30 20 8c  |H. . freqb>100 .|
00001ea0  20 74 75 72 62 6f 3d b9  0d 08 52 06 20 e1 0d 08  | turbo=...R. ...|
00001eb0  5c 06 20 3a 0d 08 66 47  20 f4 20 4e 65 61 72 6c  |\. :..fG . Nearl|
00001ec0  79 20 74 68 65 72 65 2e  2e 2e 20 4a 75 73 74 20  |y there... Just |
00001ed0  6e 65 65 64 20 61 20 6c  69 74 74 6c 65 20 6e 75  |need a little nu|
00001ee0  64 67 65 20 69 6e 20 74  68 65 20 72 69 67 68 74  |dge in the right|
00001ef0  20 64 69 72 65 63 74 69  6f 6e 2e 0d 08 70 12 20  | direction...p. |
00001f00  dd f2 64 6f 6e 65 61 72  73 74 75 66 66 0d 08 7a  |..donearstuff..z|
00001f10  10 20 6e 65 61 72 3d 6e  65 61 72 2b 31 0d 08 84  |. near=near+1...|
00001f20  19 20 e7 20 6e 65 61 72  3c 38 20 8c 20 72 69 67  |. . near<8 . rig|
00001f30  68 74 3d b9 3a e1 0d 08  8e 0b 20 6c 65 66 74 3d  |ht=.:..... left=|
00001f40  b9 0d 08 98 3b 20 e7 20  6e 65 61 72 3e 31 36 20  |....; . near>16 |
00001f50  8c 20 6e 65 61 72 3d 30  3a 73 74 61 67 65 3d 73  |. near=0:stage=s|
00001f60  74 61 67 65 2b 31 3a 73  65 61 72 63 68 69 6e 67  |tage+1:searching|
00001f70  3d 30 3a 74 65 6e 64 69  6e 67 3d 32 0d 08 a2 06  |=0:tending=2....|
00001f80  20 e1 0d 08 ac 06 20 3a  0d 08 b6 3d 20 f4 20 49  | ..... :...= . I|
00001f90  6e 69 74 69 61 6c 69 73  65 20 42 61 6c 6c 42 6f  |nitialise BallBo|
00001fa0  74 20 76 61 72 69 61 62  6c 65 73 20 61 74 20 74  |t variables at t|
00001fb0  68 65 20 62 65 67 69 6e  6e 69 6e 67 20 6f 66 20  |he beginning of |
00001fc0  61 20 72 75 6e 0d 08 c0  0e 20 dd f2 73 65 74 75  |a run.... ..setu|
00001fd0  70 62 62 0d 08 ca 3f 20  72 65 76 69 6e 67 3d a3  |pbb...? reving=.|
00001fe0  3a 6c 65 66 74 3d a3 3a  72 69 67 68 74 3d a3 3a  |:left=.:right=.:|
00001ff0  66 77 64 3d a3 3a 72 65  76 65 72 73 65 3d a3 3a  |fwd=.:reverse=.:|
00002000  73 65 61 72 63 68 69 6e  67 3d 30 3a 69 64 6c 65  |searching=0:idle|
00002010  3d b9 0d 08 d4 2a 20 6e  65 61 72 3d a3 3a 66 61  |=....* near=.:fa|
00002020  72 6c 65 66 74 3d 30 3a  6f 70 65 6e 63 74 65 72  |rleft=0:opencter|
00002030  3d 30 3a 74 65 6e 64 69  6e 67 3d 32 0d 08 de 06  |=0:tending=2....|
00002040  20 e1 0d 08 e8 06 20 3a  0d 08 f2 0f 20 dd f2 72  | ..... :.... ..r|
00002050  65 6c 65 61 73 65 62 0d  08 fc 2d 20 f4 20 47 6f  |eleaseb...- . Go|
00002060  74 20 61 6c 6c 20 74 68  65 20 62 61 6c 6c 73 2c  |t all the balls,|
00002070  20 6e 6f 77 20 6a 75 73  74 20 64 75 6d 70 20 74  | now just dump t|
00002080  68 65 6d 21 0d 09 06 20  20 6e 65 61 72 3d 6e 65  |hem!...  near=ne|
00002090  61 72 2b 31 3a 72 65 76  65 72 73 65 3d b9 3a 66  |ar+1:reverse=.:f|
000020a0  77 64 3d a3 0d 09 10 1d  20 e7 20 6e 65 61 72 3e  |wd=..... . near>|
000020b0  39 20 8c 20 69 64 6c 65  3d b9 3a 6e 65 61 72 3d  |9 . idle=.:near=|
000020c0  a3 0d 09 1a 06 20 e1 0d  09 24 44 20 f5 3a e3 58  |..... ...$D .:.X|
000020d0  3d 31 b8 31 32 3a ff 22  43 48 41 4e 4e 45 4c 56  |=1.12:."CHANNELV|
000020e0  4f 49 43 45 20 31 20 22  2b c3 58 3a d4 31 2c 2d  |OICE 1 "+.X:.1,-|
000020f0  31 30 2c 35 32 2c 31 30  30 3a e3 52 3d 30 b8 31  |10,52,100:.R=0.1|
00002100  30 30 30 30 3a ed 2c 3a  fd 20 a3 0d 09 2e 06 20  |0000:.,:. ..... |
00002110  3a 0d 09 38 42 20 f4 20  57 68 69 7a 7a 2d 62 61  |:..8B . Whizz-ba|
00002120  63 6b 20 74 6f 20 6c 69  6e 65 20 75 70 20 77 69  |ck to line up wi|
00002130  74 68 20 44 20 2d 20 77  68 61 74 20 69 66 20 77  |th D - what if w|
00002140  68 69 7a 7a 20 62 61 63  6b 20 69 6e 74 6f 20 6e  |hizz back into n|
00002150  65 74 3f 0d 09 42 39 20  f4 20 52 65 76 65 72 73  |et?..B9 . Revers|
00002160  65 20 69 66 20 42 61 6c  6c 42 6f 74 20 6b 6e 6f  |e if BallBot kno|
00002170  77 73 20 74 68 61 74 20  62 61 6c 6c 73 20 61 72  |ws that balls ar|
00002180  65 20 62 65 68 69 6e 64  20 69 74 2e 0d ff        |e behind it...|
0000218e