rem  **********
rem  * RANDOM *
rem  **********
rem  this 'droid moves randomly around the battle field

5   x = random(300)+100:y=random(300)+100: d=dmge: shot=-scan(aim)
    aim = random(360):gosub 200: goto 5

200 xvel = (x-xpos)*3: yvel = (y - ypos)*3
    if shot<=0 then return
    if dmge<>d then xvel=0:yvel=0:return
    if abs(x-xpos)<50 and abs(y-ypos)<50 then xvel=0:yvel=0:return
    goto 200

