home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1985 May
/
1985-05.d64
/
charlemagne_64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
5KB
|
140 lines
10 poke53281,0:print"[155]":c=54272:sq=1912
20 mu=54272:forn=mutomu+24:poken,0:next:pokemu+24,15:pokemu+5,129:pokemu+6,129
30 pokemu+12,129:pokemu+13,129:pokemu+4,65:pokemu+2,200:pokemu+11,33
40 printchr$(8):poke53280,0:gosub820:rem titles
50 print"[147] number of players (1-6)";:forz=1to3:pokemu+8,30:gosub1060: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 for ji=1 to 6:hc(ji)=1.41:next:rem handicap score
110 er$=" "
120 forr=1tonp:q=1
130 forz=1to3:pokemu+8,30:pokemu+1,15:gosub1060:next
140 print" hit '_' to quit"
150 print""spc(14)"player"pl:print" do you want to use d[146]ice or w[146]ords";
160 inputq$:q$=left$(q$,1):ifq$="d"thenl=9:gosub640:
170 ifq$="w"then gosub780
180 ifq$<>"w"andq$<>"d"andq$<>"_"thenprint"[145][145][145][145][145][145]":goto150
190 ifq$="_"thengoto480
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+c,1:if k>23 then poke 53280,2
250 getl$:gosub1210:ifl$=chr$(13)thengosub400:l$="":goto300
260 ifl$=chr$(20)theniflen(a$)>0thena$=left$(a$,len(a$)-1):iflen(a$)=0thena$=""
270 poke53280,0
280 ifl$=chr$(19)thenl$=""
290 printl$;:gosub1160:ifl$<>""thenpokemu+1,10:forn=1to10:next:gosub1080
295 if l$=chr$(20) then 310
300 a$=a$+l$
310 ifk<>27then230
320 forz=1to2:pokemu+1,80:pokemu+8,45:gosub1070:next
330 print" ";er$
340 poke 198,0:print" any challenges (y/n)? "
350 getc$:ifc$<>"y"andc$<>"n"then350
360 ifc$="n"thengosub440
370 ifc$="y"thengoto540
380 pl=pl+1:ifpl>npthenpl=1
390 nextr:goto120
400 wo$(q)=a$:q=q+1:a$=""
410 print " ";
420 forr=12to30:pokemu+1,r:pokemu+8,r*2:next:gosub1080
430 return
440 rem score display
450 forn=1toq:j=len(wo$(n)):if len(wo$(n))=0 then470
460 sc(pl)=sc(pl)+int(hc(pl)^j)
470 next:forn=1toq:wo$(n)="":next
480 print"[147] word search scores:"
490 forr=1tonp
500 print" player"r" "sc(r)
510 next:ifq$="_"thenprint" that's all, folks![144]":end
520 return
530 forn=1to3000:next:return
540 rem challenge
550 print" which word [157][157][157][157][157][157][157][157][157][157][157]";
560 inputch$
570 print"[145]is challenge correct (y/n)?"
575 get r$:if r$="" then 575
578 y$=r$
580 if y$<>"y"andy$<>"n" then570
590 ify$="n"thenprint"[145] ":goto340
600 forqq=75to0step-2:pokemu+1,qq:pokemu+8,qq:next:gosub1080
610 forn=1toq:ifch$=wo$(n)thenwo$(n)="":
620 next:print"[145] ":goto340
630 end
640 print"[147]"spc(14)"player"pl
650 print" your dice roll:
660 [153]" ";:[129]n[178]1[164]9:l$(n)[178]di$(n,[187](.)[172]6[170]1)
670 [130]:ld[178]9
680 [141]690:[142]
690 [129] c1[178]1 [164] 9:[139] l$(c1)[178]"q" [167] [141]710
700 [130]:[142]
710 [129] c2[178]1 [164] 9:[139] l$(c2)[178]"u" [167] [142]
720 [130]
730 [139] c1[179]3 [167] c3[178]c1[170]2:[137]750
740 c3[178]c1[171]2
750 l$(c3)[178]"u":[142]
760 [161]r$:[139]r$[178]"" [167]760
770 [142]
780 [153]"load"[166]14)"player"pl:a[178][187](.)[172]30[170]1
790 [153]" your word is:
800 print" ";:forn=1tolen(s$(a)):l$(n)=mid$(s$(a),n,1):next
810 l=len(s$(a)):ld=l:return
820 print"[147] charlemagne's[160]sword":pokemu+1,15:pokemu+8,30
830 gosub1060:pokemu+1,22:pokemu+8,25:gosub1060:pokemu+1,8:pokemu+8,16
840 gosub1060
850 pokemu+1,15:pokemu+8,27:gosub1060:pokemu+1,15:pokemu+8,30:gosub1070
860 forq=180to63step-int(rnd(.)*8+2):pokemu+1,q::next:gosub1060
870 t$=" word search "
880 print" or":gosub1090:print:print" ";
890 forr=1tolen(t$):t2$=mid$(t$,r,1)
900 ifasc(t2$)>64thenpoke1636+r,asc(t2$)-64:poke1636+r+54272,1:gosub1100:next
910 ifasc(t2$)<65thenpoke1636+r,asc(t2$):poke1636+r+54272,1:gosub1100:next
920 gosub1060
930 gosub1090:print"[147] word search instructions "
940 print" make as many words as possible from
950 [153]" the letters shown at the top of the
960 print" screen. select 'dice' (random
970 [153]" letters) or 'words' (from the
980 print" computer's vocabulary).
990 [153]" any word can be challenged by an
1000 print" opponent after the player has
1010 [153]" completed his turn. scoring is based
1020 print" on the number of letters in each
1030 [153]" word. longer words score more points.
1040 print" hit space to continue
1050 [151]198,0:[146]197,33:[161]zz$:[142]
1060 [129]n[178]1[164]500:[130]:[141]1080:[142]
1070 [129]n[178]1[164]1000:[130]:[141]1080:[142]
1080 [151]mu[170]1,0:[151]mu[170]8,0:[142]
1090 [129]n[178]1[164]1500:[130]:[142]
1100 [129]q[178]1194[164]1212
1110 [139][194](q)[178][198](t2$)[171]64[167][151]q,[194](q)[170]128:[151]mu[170]1,[198](t2$)
1120 [139][194](q)[178][198](t2$)[167][151]q,[194](q)[170]128:[151]mu[170]1,[198](t2$)
1130 [130]
1140 [129]n[178]1[164]200:[130]
1150 [153]" charlemagne's sword":[142]
1160 [143] check for correct letters
1170 [139]l$[178][199](20)[167][142]
1180 [129]xj[178]1 [164] ld:[139] l$[178]l$(xj) [167]1200
1190 [130]:[139] l$[179][177]"" [167] [153]"cmd cmd";:l$[178]""
1200 [142]
1210 [139] l$[178]""[167] l$[178]"":[142]
1220 [139] l$[178]"on"[167] l$[178]"":[142]
1230 [139] l$[178]"cmd"[167] l$[178]"":[142]
1240 [139] l$[178]""[167] l$[178]"":[142]
1250 [142]
1260 [131] a,e,i,o,u,e,l,r,h,q,t,d
1270 [131] w,y,p,s,f,g,h,j,k,z,x,c
1280 [131] v,b,n,m,l,t,r,n,p,e,s,d
1290 [131] a,e,i,o,u,y
1300 [131] r,t,n,f,a,l,e,i,p,h,d,s
1310 [131] elephant,construction,viability,turncoat,vegetable,lightpost
1320 [131] mineral,walnetto,roosevelt,composition,declaration,independence
1330 [131] specific,undetermined,laughable,vacillate,stalactite,facetiously
1340 [131] civilization,barbarians,carnivore,strangled,collection,philharmonic
1350 [131] congealed,liquefied,translucent,unscrupulous,terpsichore,prehistoric
1360 [143] 30 words