home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1985 May / 1985-05.d64 / charlemagne (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  5KB  |  146 lines

  1. 10 poke36879,8:print"":cv=33792:sq=4519
  2. 20 er$="                     ":mu=36878:pokemu,15
  3. 30 fm$=""
  4. 40 printchr$(8):gosub810:rem titles
  5. 50 print"[147]# of players (1-6)";:forz=1to3:pokemu-2,230:gosub1090:next
  6. 60 inputnp$:np=val(np$):ifnp<1ornp>6then50
  7. 70 diml$(19):  rem l$ dim for length of longest word;s$ - number of words
  8. 80 dim di$(9,6),wo$(80),s$(30) :forn=1to9:forr=1to6:reada$:di$(n,r)=a$:next:next
  9. 90 pl=1:forn=1to30:reada$:s$(n)=a$:next:a$=""
  10. 100 forji=1to6:hc(ji)=1.41:next:rem handicap score
  11. 110 forr=1tonp:q=1
  12. 120 forz=1to3:pokemu-3,230:pokemu-2,215:gosub1090:next
  13. 130 print"   hit '_' to quit."
  14. 140 print""spc(7)"player"pl:print"  do you want to use     d[146]ice or w[146]ords?";
  15. 150 get q$:if q$="" then150
  16. 160 q$=left$(q$,1):ifq$="d"thenl=9:gosub650
  17. 170 if q$="w" then gosub770
  18. 180 ifq$<>"w"andq$<>"d"andq$<>"_"then150
  19. 190 ifq$="_"thengoto490
  20. 200 print"time:[177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177]"
  21. 210 print"     ";:forn=1tol:printl$(n);:next:print
  22. 220 poke161,0:print"";
  23. 230 k=peek(161)
  24. 240 pokesq+k,160:pokesq+k+cv,1:if k>23 then poke 36879,10
  25. 250 getl$:gosub1230:ifl$=chr$(13)thengosub400:l$="":goto300
  26. 260 ifl$=chr$(20)theniflen(a$)>0thena$=left$(a$,len(a$)-1):iflen(a$)=0thena$=""
  27. 270 poke 36879,8
  28. 280 ifl$=chr$(19)thenl$=""
  29. 290 printl$;:gosub1180:ifl$<>""thenpokemu-2,210:forn=1to10:next:gosub1110
  30. 295 if l$=chr$(20) then 310
  31. 300 a$=a$+l$
  32. 310 ifk<>27thengoto230
  33. 320 forz=1to2:pokemu-2,180:pokemu-3,145:gosub1100:next
  34. 330 poke 198,0:printfm$;er$;fm$;"challenges(y/n)?"
  35. 340 getc$:ifc$="" then340
  36. 350 ifc$="n"thengosub450:goto380
  37. 360 ifc$="y"thengoto550
  38. 370 goto330
  39. 380 pl=pl+1:ifpl>npthenpl=1
  40. 390 nextr:goto110
  41. 400 rem
  42. 410 wo$(q)=a$:q=q+1:a$=""
  43. 420 print " ";
  44. 430 forr=72to90:pokemu-2,r:pokemu-3,r*2:next:gosub1110
  45. 440 return
  46. 450 rem score display
  47. 460 forn=1toq:j=len(wo$(n)):if j=0 then480
  48. 470 sc(pl)=sc(pl)+int(hc(pl)^j)
  49. 480 next:forn=1toq:wo$(n)="":next
  50. 490 print"[147] word search scores:"
  51. 500 forr=1tonp
  52. 510 print"player"r"  "sc(r)
  53. 520 next:ifq$="_"thenprint"that's all, folks![144]":end
  54. 530 return
  55. 540 forn=1to3000:next:return
  56. 550 printfm$;er$
  57. 560 printfm$;"which word";:inputch$
  58. 570 er$=er$+"     ":print fm$;"";er$;fm$;"";er$
  59. 580 er$="                     "
  60. 590 printfm$;:input"chal.correct(y/n)";y$:y$=left$(y$,1):ify$<>"y"andy$<>"n"then590
  61. 600 ify$="n"thenprintfm$+"";er$:goto330
  62. 610 forqq=234to0step-2:pokemu-2,qq:pokemu-3,qq:next:gosub1110
  63. 620 forn=1toq:ifch$=wo$(n)thenwo$(n)="":
  64. 630 next:printfm$+"";er$:goto330
  65. 640 end
  66. 650 print"[147]"spc(7)"player"pl"[146]"
  67. 660 print"your dice rolls:"
  68. 670 forn=1to9:l$(n)=di$(n,rnd(.)*6+1)
  69. 680 next:ld=9
  70. 690 gosub700:return
  71. 700 for c1=1 to 9:if l$(c1)="q" then gosub720
  72. 710 next:return
  73. 720 for c2=1 to 9:if l$(c2)="u" then return
  74. 730 next
  75. 740 if c1<3 then c3=c1+2:goto760
  76. 750 c3=c1-2
  77. 760 l$(c3)="u":return
  78. 770 print"[147]"spc(7)"player"pl"[146]":a=rnd(.)*30+1
  79. 780 print"your word is:
  80. 790 [129]n[178]1[164][195](s$(a)):l$(n)[178][202](s$(a),n,1):[130]
  81. 800 l[178][195](s$(a)):ld[178]l:[142]
  82. 810 [153]"load charlemagne's sword":[151]mu[171]2,178:[151]mu[171]3,195
  83. 820 [141]1090:[151]mu[171]2,224:[151]mu[171]3,247:[141]1090:[151]mu[171]2,168:[151]mu[171]3,178:[141]1090
  84. 830 [151]mu[171]2,239:[151]mu[171]3,139:[141]1090:[151]mu[171]2,225:[151]mu[171]3,236:[141]1100
  85. 840 [129]q[178]245[164]234[169][171][181]([187](.)[172]8[170]2):[151]mu[171]2,q::[130]:[141]1090
  86. 850 t$[178]" word search"
  87. 860 [153]"          or":[141]1120:[153]:[153]"            ";
  88. 870 [129]r[178]1[164][195](t$):t2$[178][202](t$,r,1)
  89. 880 [139][198](t2$)[177]64[167][151]4430[170]r,[198](t2$)[171]64:[151]4430[170]r[170]cv,3:[141]1130:[130]
  90. 890 [139][198](t2$)[179]65[167][151]4430[170]r,[198](t2$):[151]4430[170]r[170]cv,3:[141]1130:[130]
  91. 900 [141]1090
  92. 910 [141]1120:[133]"loadinstructions <y/n>";r$
  93. 920 [139] r$[178]"y" [167]940
  94. 930 [142]
  95. 940 [153]"load word search wait":[153]"instructions:wait":[141]1120
  96. 950 [153]"load":[141]1330
  97. 960 [153]" make as many words":[153]:[153]" as possible from":[153]
  98. 970 [153]" the letters shown":[153]:[153]" at the top of the
  99. 980 print:print" screen. select 'dice'":print" (random letters)
  100. 990 [153]:[153]" or 'words' (from "
  101. 1000 [153]:[153]" the computer's":[153]:[153]" vocabulary).
  102. 1010 print:print"       <more>":gosub1280:gosub1330
  103. 1020 print"[147] any word can be":print:print" challenged after"
  104. 1030 print:print" the player has":print:print" completed his turn."
  105. 1040 print:print" scoring is based on":print:print" the number of"
  106. 1050 print:print" letters in each":print:print" word. longer words"
  107. 1060 print:print " score more points."
  108. 1070 print"      <return>[146]"
  109. 1080 gosub1300:pokemu-2,0:pokemu-3,0:pokemu,15:return
  110. 1090 forn=1to500:next:gosub1110:return
  111. 1100 forn=1to1000:next:gosub1110:return
  112. 1110 pokemu-2,0:pokemu-3,0:return
  113. 1120 forn=1to1500:next:return
  114. 1130 forq=4144to4156:ifpeek(q)=asc(t2$)-64thenpokeq,peek(q)+128:pokemu-2,asc(t2$)+150
  115. 1140 ifpeek(q)=asc(t2$)thenpokeq,peek(q)+128:pokemu-2,asc(t2$)+150
  116. 1150 next
  117. 1160 forn=1to200:next
  118. 1170 print" charlemagne's sword":return
  119. 1180 rem check for correct letters
  120. 1190 if l$=chr$(20) then return
  121. 1200 forxj=1 to ld:if l$=l$(xj) then1220
  122. 1210 next:if l$<>"" then print"[157] [157]";:l$=""
  123. 1220 return
  124. 1230 if l$=""then l$="":return
  125. 1240 if l$="[145]"then l$="":return
  126. 1250 if l$="[157]"then l$="":return
  127. 1260 ifl$=""then l$="":return
  128. 1270 return
  129. 1280 get r$:if r$="" then1280
  130. 1290 return
  131. 1300 get r$:if r$="" then1300
  132. 1310 if r$<> chr$(13) then1300
  133. 1320 return
  134. 1330 poke mu-2,229:for dy=15 to 0 step-1:pokemu,dy:forty=1 to 75:next:next:return
  135. 1340 data a,e,i,o,u,e,l,r,h,q,t,d
  136. 1350 data w,y,p,s,f,g,h,j,k,z,x,c
  137. 1360 data v,b,n,m,l,t,r,n,p,e,s,d
  138. 1370 data a,e,i,o,u,y
  139. 1380 data r,t,n,f,a,l,e,i,p,h,d,s
  140. 1390 data elephant,construction,viability,turncoat,vegetable,lightpost
  141. 1400 data mineral,walnetto,roosevelt,composition,declaration,independence
  142. 1410 data specific,undetermined,laughable,vacillate,stalactite,facetiously
  143. 1420 data civilization,barbarians,carnivore,strangled,collection,philharmonic
  144. 1430 data congealed,liquefied,translucent,unscrupulous,terpsichore,prehistoric
  145. 1440 rem 30 words
  146.