8-Bit Software Online Conversion
:0.$.SQU - Listing
10MODE7:VDU23;8202;0;0;0;:PROCinit:PR
OChow:PROCnum:PROCask:MODE2:VDU23;8202;0
;0;0;:X=125:Y=200:T=1:VDU5:g=1:l=1:go=1:
FORE=100 TO800 STEP 25:MOVE E,0:DRAW E,8
00:NEXT:FORE=200 TO 800 STEP 25:MOVE 100
,E:DRAW 800,E:NEXT
20box(g,l)=T :IFY>=800 PROCtitle:PROC
grid
30PROCsquare(X,Y,T):IFX>=700 X=50:Y=Y
+75:l=l+1
40X=X+75:IFT>5 T=0
50IF g>8 g=0
60T=T+1:g=g+1:GOTO20:END
70DEFPROCsquare(X,Y,C):GCOL0,C:MOVEX,
Y:DRAW X+50,Y:DRAW X+50,Y+50:DRAW X,Y+50
:DRAW X,Y:PLOT85,X+50,Y+50:PLOT85,X+50,Y
:GCOL0,0:MOVE X+50,Y+50:DRAW X+50,Y+40:D
RAW X+40,Y+50:DRAW X+50,Y+50 :MOVE X,Y:
DRAW X+10,Y:DRAW X,Y+10:DRAW X,Y:MOVE X+
50,Y:DRAW X+40,Y:DRAW X+50,Y+10:DRAW X+5
0,Y
80MOVE X,Y+50:DRAW X+10,Y+50:DRAW X,Y
+40:DRAW X,Y+50:GCOL0,7:ENDPROC
90DEFPROCgrid:k%=100:FORE%=1TO6:PROCs
quare(k%,925,E%):k%=k%+75:NEXT :VDU5:X=-
450:Y=850 :FORT=1TO9:MOVE X,Y:PRINTT;:X=
X+75:NEXT:X%=-550:Y%=775:FORT=8 TO 1 STE
P-1:MOVEX%,Y%:PRINTT:Y%=Y%-77:NEXT:GCOL0
,6:MOVE0,162:DRAW 1280,162:DRAW 1280,163
:DRAW0,163:MOVE 875,162:DRAW 875,1023 :P
ROCnext:ENDPROC
100DEFPROCnext:IF nm$(2)="ROBOT" s=2
110VDU4:PROCsb:VDU28,0,31,18,27:FORgo=
0TOjh%:PROCsb:PRINT''"PLAYER ";ply;" : "
;nm$(ply):*FX21,0
120INPUT"X-AXIS : "xas:IF xas<=0 OR xa
s>9 GOTO120
130INPUT"Y-AXIS : "yas:IF yas<=0 OR ya
s>8 GOTO130
140 X=50+(xas*(xas*(75/xas))):Y=125+(y
as*(yas*(75/yas))) : box(xas,yas)=box(x
as,yas)+1:C=box(xas,yas):SOUND 1,1,C*10,
10:SOUND 2,1,C*10,8:SOUND 3,1,C*10,6:IFC
>6 C=1:box(xas,yas)=C:GOTO160
150T=T+1
160PROCsquare(X,Y,C):PROCcheck: IF ply
=s ply=0
180ply=ply+1:NEXT:PROCend:ENDPROC
190DEFPROCinit:DIM ch(4),box(9,9),sc(4
),nm$(4),cl(4):i=4:s=4:ply=1 :FORq=1TO4
200v=RND(6):IF v=ch(1) OR v=ch(2) OR v
=ch(3) OR v=ch(4) GOTO200
210cl(q)=v:ch(q)=v:NEXT:ENDPROC
220DEFPROCcheck:FORw%=1TOs:FORy1%=1TO8
:FOR x1%=1 TO 7:IF box(x1%,y1%)=cl(w%) A
ND box(x1%+1,y1%)=cl(w%) AND box(x1%+2,y
1%)=cl(w%) PROCscore(w%)
230NEXT:NEXT:NEXT:FORw%=1TOs:FORx1%=1T
O9:FOR y1%=1 TO 6:IF box(x1%,y1%)=cl(w%)
AND box(x1%,y1%+1)=cl(w%) AND box(x1%,y
1%+2)=cl(w%) PROCscore(w%)
240NEXT:NEXT:NEXT:FORw%=1TOs:FORx1%=1T
O7:FOR y1%=1 TO 6:IF box(x1%,y1%)=cl(w%)
AND box(x1%+1,y1%+1)=cl(w%) AND box(x1%
+2,y1%+2)=cl(w%) PROCscore(w%)
250NEXT:NEXT:NEXT:FORw%=1TOs:FORy1%=1T
O6:FOR x1%=3 TO9:IF box(x1%,y1%)=cl(w%)
AND box(x1%-1,y1%+1)=cl(w%) AND box(x1%-
2,y1%+2)=cl(w%) PROCscore(w%)
260NEXT:NEXT:NEXT:ENDPROC
270DEFPROCscore(w%):sc(w%)=sc(w%)+100:
VDU7:PROCsb:PRINT''"Player ";w%'"Score :
";sc(w%):G$=INKEY$(150):VDU28,0,31,18,27
:ENDPROC
280DEFPROCtitle:GCOL0,6:MOVE 0,900:DRA
W 1280,900:GCOL0,7:ENDPROC
290DEFPROCsb:VDU26:COLOUR 6:PRINT"MOVE
S LEFT: ":VDU11:PRINT"MOVES LEFT:";jh%-
go:COLOUR7 :PRINTTAB(14,2)"PLAYER":t=5:F
ORm=1TOs:d=cl(m):COLOUR d :PRINTTAB(14,t
);nm$(m): IF d=1 PRINTTAB(14,t+1)"RED" E
LSE IF d=2 PRINTTAB(14,t+1)"GREEN" ELSE
IF d=3 PRINTTAB(14,t+1)"YELLOW" ELSE IF
d=4 PRINTTAB(14,t+1)"BLUE"
300 IF d=5 PRINTTAB(14,t+1)"MAGENT" EL
SE IF d=6 PRINTTAB(14,t+1)"CYAN"
310PRINTTAB(14,t+2)"SCORE:":PRINTTAB(1
4,t+3);sc(m):PRINTTAB(14,t+4)"------":t=
t+5:NEXT:COLOUR7:VDU28,0,31,18,27:CLS:EN
DPROC
320DEFPROCask:IF nm$(2)="ROBOT" s=1
330FORn=1TOs:PROCline:VDU132,157,141:P
RINT" name of player ";n;" ";CHR$(156)
:VDU132,157,141:PRINT" NAMe Of plAyer ";
n;" ";CHR$(156)
340PROCline:INPUT" MAXIMUM No.of LETTE
RS = 6...: "nm$(n):IF LEN(nm$(n))>=7 GOT
O 340 ELSE NEXT:ENDPROC
350DEFPROCline:PRINT"
,,,,,,,,,,,,,,,,,,,,,":ENDPROC
360DEFPROCend:VDU22,7:PROCsort:PROClin
e:VDU132,157:PRINT" PLAYER ";CHR$(156)
;:VDU132,157:PRINT" SCORE ";CHR$(156):
PROCline:FORt=1TOs:VDU129,141:PRINTnm$(t
);TAB(16);sc(t)::VDU129,141:PRINTnm$(t);
TAB(16);sc(t):NEXT:PROCline:PRINT" THE
WINNER IS ";nm$(1):END:ENDPROC :END
370DEFPROChow:CLS
380PROCline:VDU132,157:PRINT" HOW MANY
PLAYERS ARE PLAYING (1-4) ";CHR$(156):P
ROCline:GT$=GET$:s=VAL(GT$):IF s<=1 PROC
mes ELSE IF s>4 CLS:GOTO380
390ENDPROC
400DEFPROCmes:PROCline:VDU132,157:PRIN
T" THIS GAME NEEDS MORE THAN 1 PLAYER ";
CHR$(156):PROCline:GT$=GET$:PROChow:ENDP
ROC
410DEFPROCnum:CLS
420PROCline:VDU132,157:PRINT" INPUT TH
E TOTAL NUMBER OF GOES ";CHR$(156):V
DU132,157:PRINT" BETWEEN 10 - 99
";CHR$(156):PROCline:INPUT"
"jh%:IF jh%<10 OR jh%>99 CLS:GOTO420 ELS
E ENDPROC
430DEFPROCsort:FORl%=1TOs^2:FORv%=1TOs
-1:IF sc(v%)<sc(v%+1) sz=sc(v%+1):sz$=nm
$(v%+1):sc(v%+1)=sc(v%):nm$(v%+1)=nm$(v%
):sc(v%)=sz:nm$(v%)=sz$
440NEXT:NEXT:ENDPROC