home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / gam / boggle.ba < prev    next >
Text File  |  2006-10-19  |  3KB  |  97 lines

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