-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbloobers.bas
62 lines (62 loc) · 1.87 KB
/
bloobers.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
2 REM # BLOOBERS
4 REM # PCW SEPT 1980
6 REM # 06/03/1981
100 P=C:T=R:S=RND(2)
110 H=40:V=14
120 TP=53260+INT(22-H/2)+64*INT(7-V/2)
130 P2=TP+H+1:P3=TP+64*V+64:P4=TP+65+H+V*64
170 SS=H*V/1.6:GOSUB1000:DIMC(3),D(3,1)
210 FORF=0TO3:READC(F),D(F,0),D(F,1):NEXT
250 DATA221,1,64,222,64,-1,223,-1,-64,220,-64,1
290 DIMP(SS),R(SS),CC(SS),T(SS)
300 PRINTCHR$(12)
310 FORF=TPTOP2:POKEF,187:NEXT
320 FORF=TPTOP3STEP64:POKEF,187:NEXT
330 FORF=P2TOP4STEP64:POKEF,187:NEXT
340 FORF=P3TOP4:POKEF,187:NEXT
400 C=INT(RND(1)*4)
410 R=INT(RND(1)+.5)
420 P=TP+INT(RND(1)*(H-2))+64*INT(RND(1)*(V-2))+130
430 IFPEEK(P)<>32THEN420
440 IFPEEK(P+D(C,0))<>32ORPEEK(P+D(C,1))<>32THEN420
450 S=0:T=0
500 POKEP,C(C):P(S)=P:T(S)=T:R(S)=R:CC(S)=C
510 S=S+1:P=P+D(C,R)
520 IFPEEK(P)<>32THEN600
530 T=INT(RND(1)+1.5)
540 IFR=0THEN570
550 C=C-T:IFC<0THENC=C+4
560 GOTO580
570 C=C+T:IFC>3THENC=C-4
580 IFT=2THENR=1-R
590 GOTO500
600 IFP=P(0)THEN700
610 POKE530,1:POKE57088,253:IFPEEK(57088)=239THEN800
615 POKE530,0
620 S=S-1:P=P(S)
630 IFT(S)=0THEN690
640 R=1-R(S):IFR=1THEN670
650 C=CC(S)-1:IFC<0THENC=C+4
660 GOTO680
670 C=CC(S)+1:IFC>3THENC=C-4
680 T=0:IFPEEK(P+D(C,R))=32THEN500
690 POKEP,32:GOTO610
700 T=CC(0)-C:IFT=0THEN610
710 IFR=0AND(T=-1ORT=3)THEN610
720 IFR=1AND(T=1ORT=-3)THEN610
750 T=TI:P=0
800 S=S-1:POKEP(S),32
820 IFS=0THEN400
830 IFP=0THEN800
834 POKE530,1:POKE57088,253:IFPEEK(57088)=239THEN800
836 POKE530,0
840 P=P(S):R=R(S):C=CC(S):T=1:GOTO500
1000 PRINTCHR$(12)TAB(15)CHR$(234)CHR$(235);
1010 PRINT" BLOOBERS "CHR$(234)CHR$(235)
1020 PRINT:PRINT" Bloobers randomly generates patterns"
1030 PRINT"on the screen .":PRINT
1040 PRINT" If you get bored , press the space bar ,"
1050 PRINT"and the pattern will backtrack until you"
1060 PRINT"take your finger off.":PRINT:PRINT:PRINT
1070 PRINT"Press any key to start."
1080 POKE11,0:POKE12,253:X=USR(X):RETURN