home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1985 May
/
1985-05.d64
/
charlemagne
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
5KB
|
146 lines
10 poke36879,8:print"":cv=33792:sq=4519
20 er$=" ":mu=36878:pokemu,15
30 fm$=""
40 printchr$(8):gosub810:rem titles
50 print"[147]# of players (1-6)";:forz=1to3:pokemu-2,230:gosub1090:next
60 inputnp$:np=val(np$):ifnp<1ornp>6then50
70 diml$(19): rem l$ dim for length of longest word;s$ - number of words
80 dim di$(9,6),wo$(80),s$(30) :forn=1to9:forr=1to6:reada$:di$(n,r)=a$:next:next
90 pl=1:forn=1to30:reada$:s$(n)=a$:next:a$=""
100 forji=1to6:hc(ji)=1.41:next:rem handicap score
110 forr=1tonp:q=1
120 forz=1to3:pokemu-3,230:pokemu-2,215:gosub1090:next
130 print" hit '_' to quit."
140 print""spc(7)"player"pl:print" do you want to use d[146]ice or w[146]ords?";
150 get q$:if q$="" then150
160 q$=left$(q$,1):ifq$="d"thenl=9:gosub650
170 if q$="w" then gosub770
180 ifq$<>"w"andq$<>"d"andq$<>"_"then150
190 ifq$="_"thengoto490
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]"
210 print" ";:forn=1tol:printl$(n);:next:print
220 poke161,0:print"";
230 k=peek(161)
240 pokesq+k,160:pokesq+k+cv,1:if k>23 then poke 36879,10
250 getl$:gosub1230:ifl$=chr$(13)thengosub400:l$="":goto300
260 ifl$=chr$(20)theniflen(a$)>0thena$=left$(a$,len(a$)-1):iflen(a$)=0thena$=""
270 poke 36879,8
280 ifl$=chr$(19)thenl$=""
290 printl$;:gosub1180:ifl$<>""thenpokemu-2,210:forn=1to10:next:gosub1110
295 if l$=chr$(20) then 310
300 a$=a$+l$
310 ifk<>27thengoto230
320 forz=1to2:pokemu-2,180:pokemu-3,145:gosub1100:next
330 poke 198,0:printfm$;er$;fm$;"challenges(y/n)?"
340 getc$:ifc$="" then340
350 ifc$="n"thengosub450:goto380
360 ifc$="y"thengoto550
370 goto330
380 pl=pl+1:ifpl>npthenpl=1
390 nextr:goto110
400 rem
410 wo$(q)=a$:q=q+1:a$=""
420 print " ";
430 forr=72to90:pokemu-2,r:pokemu-3,r*2:next:gosub1110
440 return
450 rem score display
460 forn=1toq:j=len(wo$(n)):if j=0 then480
470 sc(pl)=sc(pl)+int(hc(pl)^j)
480 next:forn=1toq:wo$(n)="":next
490 print"[147] word search scores:"
500 forr=1tonp
510 print"player"r" "sc(r)
520 next:ifq$="_"thenprint"that's all, folks![144]":end
530 return
540 forn=1to3000:next:return
550 printfm$;er$
560 printfm$;"which word";:inputch$
570 er$=er$+" ":print fm$;"";er$;fm$;"";er$
580 er$=" "
590 printfm$;:input"chal.correct(y/n)";y$:y$=left$(y$,1):ify$<>"y"andy$<>"n"then590
600 ify$="n"thenprintfm$+"";er$:goto330
610 forqq=234to0step-2:pokemu-2,qq:pokemu-3,qq:next:gosub1110
620 forn=1toq:ifch$=wo$(n)thenwo$(n)="":
630 next:printfm$+"";er$:goto330
640 end
650 print"[147]"spc(7)"player"pl"[146]"
660 print"your dice rolls:"
670 forn=1to9:l$(n)=di$(n,rnd(.)*6+1)
680 next:ld=9
690 gosub700:return
700 for c1=1 to 9:if l$(c1)="q" then gosub720
710 next:return
720 for c2=1 to 9:if l$(c2)="u" then return
730 next
740 if c1<3 then c3=c1+2:goto760
750 c3=c1-2
760 l$(c3)="u":return
770 print"[147]"spc(7)"player"pl"[146]":a=rnd(.)*30+1
780 print"your word is:
790 [129]n[178]1[164][195](s$(a)):l$(n)[178][202](s$(a),n,1):[130]
800 l[178][195](s$(a)):ld[178]l:[142]
810 [153]"load charlemagne's sword":[151]mu[171]2,178:[151]mu[171]3,195
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
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
840 [129]q[178]245[164]234[169][171][181]([187](.)[172]8[170]2):[151]mu[171]2,q::[130]:[141]1090
850 t$[178]" word search"
860 [153]" or":[141]1120:[153]:[153]" ";
870 [129]r[178]1[164][195](t$):t2$[178][202](t$,r,1)
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]
890 [139][198](t2$)[179]65[167][151]4430[170]r,[198](t2$):[151]4430[170]r[170]cv,3:[141]1130:[130]
900 [141]1090
910 [141]1120:[133]"loadinstructions <y/n>";r$
920 [139] r$[178]"y" [167]940
930 [142]
940 [153]"load word search wait":[153]"instructions:wait":[141]1120
950 [153]"load":[141]1330
960 [153]" make as many words":[153]:[153]" as possible from":[153]
970 [153]" the letters shown":[153]:[153]" at the top of the
980 print:print" screen. select 'dice'":print" (random letters)
990 [153]:[153]" or 'words' (from "
1000 [153]:[153]" the computer's":[153]:[153]" vocabulary).
1010 print:print" <more>":gosub1280:gosub1330
1020 print"[147] any word can be":print:print" challenged after"
1030 print:print" the player has":print:print" completed his turn."
1040 print:print" scoring is based on":print:print" the number of"
1050 print:print" letters in each":print:print" word. longer words"
1060 print:print " score more points."
1070 print" <return>[146]"
1080 gosub1300:pokemu-2,0:pokemu-3,0:pokemu,15:return
1090 forn=1to500:next:gosub1110:return
1100 forn=1to1000:next:gosub1110:return
1110 pokemu-2,0:pokemu-3,0:return
1120 forn=1to1500:next:return
1130 forq=4144to4156:ifpeek(q)=asc(t2$)-64thenpokeq,peek(q)+128:pokemu-2,asc(t2$)+150
1140 ifpeek(q)=asc(t2$)thenpokeq,peek(q)+128:pokemu-2,asc(t2$)+150
1150 next
1160 forn=1to200:next
1170 print" charlemagne's sword":return
1180 rem check for correct letters
1190 if l$=chr$(20) then return
1200 forxj=1 to ld:if l$=l$(xj) then1220
1210 next:if l$<>"" then print"[157] [157]";:l$=""
1220 return
1230 if l$=""then l$="":return
1240 if l$="[145]"then l$="":return
1250 if l$="[157]"then l$="":return
1260 ifl$=""then l$="":return
1270 return
1280 get r$:if r$="" then1280
1290 return
1300 get r$:if r$="" then1300
1310 if r$<> chr$(13) then1300
1320 return
1330 poke mu-2,229:for dy=15 to 0 step-1:pokemu,dy:forty=1 to 75:next:next:return
1340 data a,e,i,o,u,e,l,r,h,q,t,d
1350 data w,y,p,s,f,g,h,j,k,z,x,c
1360 data v,b,n,m,l,t,r,n,p,e,s,d
1370 data a,e,i,o,u,y
1380 data r,t,n,f,a,l,e,i,p,h,d,s
1390 data elephant,construction,viability,turncoat,vegetable,lightpost
1400 data mineral,walnetto,roosevelt,composition,declaration,independence
1410 data specific,undetermined,laughable,vacillate,stalactite,facetiously
1420 data civilization,barbarians,carnivore,strangled,collection,philharmonic
1430 data congealed,liquefied,translucent,unscrupulous,terpsichore,prehistoric
1440 rem 30 words