This works in Clock Signal, with an Apple ][ and 16-sector Drive.
4 POKE -16368,0: POKE -16298,0: TEXT : CALL -936
5 GOSUB 400
10 GR : COLOR= 15
20 FOR I=1 TO 300: PLOT RND (36)+2, RND (28)+11: NEXT I
21 FOR I=1 TO 20
22 X= RND (40):Y= RND (40): IF SCRN(X,Y)=0 THEN 22
23 PLOT X,Y:Y=Y+1: IF Y>39 THEN 25: IF SCRN(X,Y)#0 THEN 25: GOTO 23
25 NEXT I
30 Y=0:X=19
31 IF SCRN(X,0)#0 THEN 30
32 C=8
33 IF PEEK (-16384)=155 THEN 390
35 HX=X:HY=Y
40 IF SCRN(X,Y+1)=0 THEN 100
41 FOR Q=1 TO 2
45 A= PEEK (-16336)+ PEEK (-16336)
46 NEXT Q
50 IF X=0 OR X=39 THEN 30
60 IF SCRN(X-1,Y)#0 AND SCRN(X+1,Y)#0 THEN 30
70 DX=1: IF RND (2)=1 THEN DX=-1
75 IF SCRN(X+DX,Y)#0 THEN 70
80 GOTO 300
100 IF Y=39 THEN 41:Y=Y+1
110 COLOR= 0: PLOT HX,HY:HX=X:HY=Y: COLOR= C: PLOT X,Y: GOTO 40
300 X=X+DX: COLOR= 0: PLOT HX,HY:HX=X:HY=Y
310 COLOR= C: PLOT X,Y
311 IF Y=39 THEN 320
315 IF SCRN(X,Y+1)=0 THEN 40
320 IF X=0 OR X=39 THEN 30
330 IF SCRN(X+DX,Y)#0 THEN 30
350 GOTO 300
390 POKE -16368,0: POKE -16298,0: TEXT : CALL -936: VTAB 10: TAB 10: PRINT "* * * THE END * * *": END
400 CALL -936: VTAB 5: PRINT " BIT BUCKET"
410 PRINT : PRINT : PRINT " AUTHOR UNKNOWN": PRINT
420 PRINT " THIS PROGRAM GENERATES A RANDOM "
430 PRINT "MAZE AND THEN FILLS THIS MAZE WITH"
440 PRINT "ONE BIT AT A TIME.."
450 VTAB 21: PRINT "PRESS 'ESC' TO END"
460 PRINT "PRESS THE SPACE BAR TO CONTINUE..."
470 IF PEEK (-16384)=155 THEN 390
480 IF PEEK (-16384)<>160 THEN 450
490 POKE -16368,0: CALL -936: RETURN
500 REM
510 REM GIVEN TO APPLE CORE OF SAN FRANCISCO FOR USE OF MEMBERS BY AUTHOR... 520 REM
530 REM LAST MOD. JULY 1979
540 REM
550 REM ' BIT BUCKET '
560 END
73 ve3myz JamesHi James,
Maybe this from "THE MATHEMATICS TEACHER" Nov 1983. If you want the Full Article email me and i will email the Three Pages.The version I was looking for started with a pattern of "pegs." The random falling bits then had a 50 50 chance of choosing a right or left downward path at each "peg". The end result was a randomly generated pyramid - an approximate Gaussian curve.Sorry about the confusion. Apparently, my sought after version did not come from Apple Core. After a thousand years, my memory was a little foggy about this. It may have come from "Apple Pugetsound Program Library Exchange (A.P.P.L.E.)." I searched the https://www.callapple.org/ website without success in finding "Bit Bucket."
Thanks again for your help.
Tom K.
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 915 |
Nodes: | 10 (2 / 8) |
Uptime: | 44:08:59 |
Calls: | 12,170 |
Calls today: | 2 |
Files: | 186,521 |
Messages: | 2,234,544 |