rem **********
rem * BOTTOM *
rem **********
rem This robot moves to the bottom and moves left to right

rem goto bottom
10 if ypos<470 then yvel=(470-ypos)*10:goto 10
   yvel = 0
rem move left
20 aim = 1
30 xvel = -70:if xpos<55 then 40
   gosub 100:goto 30
rem move right
40 aim = 359
50 xvel = 70: if xpos>445 then 20
   gosub 100:goto 50
rem scan and fire
100 rng = scan(0):if rng>0 then return
    xvel = 0
110 shot=-rng
120 rng = scan(0):if rng>0 then return
    if shot>0 then 120
130 goto 110
