REM bounce



SCREEN 9

rl = 640
 dl = 300

sp = .05
DO
ke$ = INKEY$





 IF r = 0 THEN x = x + sp: IF x > (rl) THEN r = 1
 IF r = 1 THEN x = x - sp: IF x < 1 THEN r = 0
  IF d = 0 THEN y = y + sp: IF y > (dl) THEN d = 1
  IF d = 1 THEN y = y - sp: IF y < 1 THEN d = 0
  c = c + 1: IF c > 15 THEN c = 0


CIRCLE (x, y), 30, c
 CIRCLE (x1, y1), 30, 0
  x1 = x: y1 = y









LOOP UNTIL ke$ = CHR$(27)

