home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.whtech.com
/
ftp.whtech.com.tar
/
ftp.whtech.com
/
club100
/
gam
/
boggle.ba
< prev
next >
Wrap
Text File
|
2006-10-19
|
3KB
|
97 lines
1 'Club 100 library - 415/939-1246 BBS 937-5039 NEWSLETTER, 932-8856 VOICE
5 'Word game by Russ Hall
10 CLS:PRINT@55,"= BOGGLE ="
20 FORM=1TO(VAL(RIGHT$(TIME$,2))*VAL(RIGHT$(TIME$,1))):R=RND(1):NEXT
30 DIMG(20),G$(20)
40 PRINT:PRINT" How many want to play";:INPUTX
50 FORB=1TOX
60 PRINT:PRINT" Player's name:";:INPUTA$(B):NEXT
70 GOSUB 1120
80 GOSUB 2212
90 CLS:F=F+1
100 FORB=1TOX
110 PRINT:PRINT"Cumulative score for "A$(B);D(B)
120 PRINT"Round #"F"score for ";A$(B);:INPUTC(B)
130 D(B)=D(B)+C(B)
140 NEXT
145 W=0:TW=0
150 FORB=1TOX-1
160 IFC(B)>C(B+1)THENW$=A$(B):W=C(B)
162 NEXT
165 FORB=1TOX:IFC(B)>WTHENW$=A$(B):W=C(B)
166 NEXT
190 PRINT:PRINT"Winner of round"F"is "W$:PRINT"with"W"points."
200 FORB=1TOX-1
210 IFD(B)>D(B+1)THENTW$=A$(B):TW=D(B)
215 NEXT
220 FORB=1TOX:IFD(B)>TWTHENTW$=A$(B):TW=D(B)
222 NEXT
231 TIE=0
232 FORB=1TOX
233 IFTW=D(B)THENTIE=TIE+1:T$(TIE)=A$(B)
234 NEXT
235 IFTIE<2THEN240
236 PRINT:PRINT"Tie for total of"TW"points between"
237 FORB=1TOTIE:PRINTT$(B)", ";:NEXT
238 PRINT:GOTO245
240 PRINT:PRINT"Cumulative winner is "TW$:PRINT"with"TW"points."
245 PRINT:PRINTTAB(5)"To quit, press <Q>, else";
250 GOSUB11000:GOTO80
1120 FORA=1TO20
1130 G(A)=INT(RND(1)*45)+65
1132 FORB=1TOA-1
1134 IFG(A)=G(B)THENG(A)=G(A)+1
1136 NEXT:NEXT
1140 FORA=1TO20
1145 IFG(A)=81THENG(A+1)=85:GOTO1280
1150 IFG(A)<91THEN1280
1160 IFG(A)<94THENG(A)=69:GOTO1280
1170 IFG(A)<96THENG(A)=65:GOTO1280
1180 IFG(A)<98THENG(A)=73:GOTO1280
1190 IFG(A)<100THENG(A)=79:GOTO1280
1200 IFG(A)<102THENG(A)=83:GOTO1280
1210 IFG(A)=103THENG(A)=85:GOTO1280
1215 IFG(A)=102THENG(A)=65
1220 IFG(A)=104THENG(A)=68
1230 IFG(A)=105THENG(A)=72
1240 IFG(A)=106THENG(A)=77
1250 IFG(A)=107THENG(A)=78
1260 IFG(A)=108THENG(A)=82
1270 IFG(A)=109THENG(A)=84
1275 IFG(A)=110THENG(A)=71
1280 NEXT
1300 FORA=1TO20
1310 G$(A)=CHR$(G(A)):NEXT
1320 RETURN
2212 A=1:CLS
2215 S$=STRING$(9,32):PRINT:PRINT
2220 FORC=1TO4
2230 PRINTS$;
2240 FORB=1TO5
2250 PRINTG$(A);" ";:A=A+1
2260 NEXT:PRINT
2270 NEXT
2280 LINE(48,11)-(112,52),1,B
2290 LINE(46,9)-(114,54),1,B
2300 PRINT@64,"= BOGGLE ="
2305 PRINT@264,"Time remaining";
2310 LINE(148,29)-(198,42),1,B
2315 FOR A=2TO0STEP-1
2320 PRINT@185,A;CHR$(58)
2330 FORB=59TO0STEP-1
2340 PRINT@189,B
2350 FORC=1TO425:NEXT
2360 NEXT:NEXT
2500 BEEP:CLS:PRINT@55,"TIME'S UP!"
2510 PRINT"Total point values as follows:"
2520 PRINTTAB(8)"3-4 letter words:"TAB(27)"1 point"
2530 PRINTTAB(8)"5 letter words:"TAB(27)"2 points"
2540 PRINTTAB(8)"6 letter words:"TAB(27)"3 points"
2550 PRINTTAB(8)"7 letter words:"TAB(27)"5 points"
2560 PRINTTAB(8)"8 letter words:"TAB(27)"7 points";
2570 GOSUB1120
11000 PRINT:PRINTTAB(11)"== HIT ANY KEY ==";
11010 K$=INKEY$:IFK$=""THEN11010
11015 IFK$="Q"ORK$="q"THENMENU
11020 RETURN