Bounce

Date: 198x
Type: Program
Platform(s): TS 2068

Bounced the line off the sides the selected number of times.

Appears on

One of a series of library tapes. Programs on these tapes were renamed to a number series. This tape contained programs 20001 to 20050. These tapes were compiled by Tony Willing.

Gallery

Bounce

Source Code

    5 REM  bounce
   10 BORDER 2: CLS 
   20 LET x=INT (RND*50)+1
   30 LET y=INT (RND*50)+1
   40 LET c=1
   50 LET d=1
   60 LET t=0
   70 PRINT "How many bounces";
   80 INPUT b
   85 CLS 
   90 IF x+d>255 THEN BEEP .1,1: GO SUB 200
  100 IF x+d<0 THEN BEEP .1,2: GO SUB 200
  110 IF y+c>175 THEN BEEP .1,4: GO SUB 230
  120 IF y+c<0 THEN BEEP .1,5: GO SUB 230
  130 LET x=x+d
  140 LET y=y+c
  150 PLOT x,y
  160 IF t<b THEN GO TO 90
  170 STOP 
  200 LET d=-d
  210 LET t=t+1
  220 RETURN 
  230 LET c=-c
  240 LET t=t+1
  250 RETURN 

People

No people associated with this content.

Scroll to Top