10 X = 20:Y = 20: FOR I = 0 TO 10: HOME : GR : FOR J = 0 TO 15: COLOR= J: HLIN J *2 +2,J *2 +4 AT 39: NEXT J:A = INT( RND(1) *39):B = INT( RND(1) *39): FOR J = 1 TO 1000:T = T +1:XI = ( PDL(0) >200) -( PDL(0) <75):YI = ( PDL(1) >200) -( PDL(1) <75): IF (A = X) AND (Y = B) THEN PRINT CHR$(7):J = 1000
20 X = X +XI -(X = 39) +((X = 0) AND (XI <1)):Y = Y +YI -(Y = 38) +((Y = 0) AND (YI <1)): COLOR= 15 - INT((((( ABS(A -X)) ^2) +(( ABS(B -Y)) ^2)) ^.5)/3.7): PLOT X,Y: VTAB 21: HTAB 1: PRINT "FAR" TAB( 36)"NEAR" CHR$(13) CHR$(13)"YOU FOUND ";I;"-SCORE IS ";T;: NEXT J,I