home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1988 July
/
1988-07.d64
/
scrambler
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
5KB
|
198 lines
5 poke 53280,0:poke 53281,0:print"[147][155]please wait..."
10 s=54272
20 open 1,8,8,"scrambler highs,s,w":close 1:open 1,8,15:input#1,a,b$
30 if b$<>"file exists" then close 1:gosub 1880
40 close 1
50 dim w$(200)
60 dim dc$(13),al(26)
70 for i=1 to 13:read dc$(i):next i
80 poke 53280,0:poke 53281,0:print"[147]"
90 gosub 1950
100 print"[158][213][195][195][203] [155][213][195][195][201] [156][213][201][213][201] ";
110 print" [150][201] [153][213][195][195][201][158][202][195][195][201] [155][171]";
120 print"C[178]K [156]BJKB [150]B ";
130 print" [153][171][195][178][203][158][213][195][195][203][213][195][195][201] [155][203] [202][203][213][195][195][201] [156][203] ";
140 print" J [176]CCI[150][173]CCI[159]UCCK [153]K JK B";
150 print" [171]CC[179] [171]CC[179] ";
160 print" [159][171]C JCCK K ";
170 print" [202] [173][195][195][203] [159][202][195][195][201] ";
180 gosub 1950
190 printspc(4)"[152][213][196][201] copyright 1988"
200 printspc(4)"[199]c[200] compute! publications inc."
210 printspc(4)"[202][198][203] all rights reserved"
220 printspc(3)"number of players (1 - 4) 1[157][157][157]";:input np
230 if np<1 or np>4 then print"[145][145]":goto220
240 for i=1 to np
250 printspc(3)"player";i;", your name [157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]";
260 input p$(i)
270 if p$(i)="" then p$(i)="player "+str$(i)
280 if len(p$(i))>10 then p$(i)=left$(p$(i),10)
290 print"[145][145]";:next i
300 printspc(3)"game type-words, points (w,p)? ";
310 get a$
320 if a$<>"w" and a$<>"p" then print"[145][145]":goto 300
330 print a$:gt$=a$
340 printspc(3)"timer length (1,3,5,7) 3[157][157][157]";:input tl$
350 if tl$<>"1" and tl$<>"3" and tl$<>"5" and tl$<>"7" then print"[145][145]";:goto 340
360 tl=val(tl$)
370 sp$=" "
380 v0$=chr$(0)
390 for pl=1 to np
400 tm=tl*600:nm=0:sc=0
410 gosub 1350
420 print"[147]"
430 poke 53280,12:poke 53281,0:poke 646,12
440 for d=55296 to 55303:poke d,11:poke d+32,11
450 poke d-54272,160:poke d-54240,160:next
460 for m=56256 to 56295:poke m,11:next:for m=56274 to 56276:poke m,6:next m
470 for m=56285 to 56294:poke m,6:next m
480 ford=55296 to 56256 step 40:poke d,11:poke d+39,11:poke d-54272,160
490 poke d-54233,160:next
500 for d=1984 to 2017:poke d,160:next
510 for d=2019 to 2022:poke d,48:next
520 for m=0 to 5:poke 2013+m,asc(mid$("score"+chr$(122),m+1,1))-64:next m
530 print"":for x=1 to 23:print"";:next
540 print""p$(pl)"";
550 for x=1 to 8:print"";:next
560 for x=1 to pl
570 if x>1 then printspc(9)p$(x-1);"'s score was ";sc(x-1);"":poke 198,0
580 next x
590 print"":printspc(5)" press any key to start "
600 gosub 1930
610 gosub 1860
620 print"[151] [152] ";
630 for i=1 to 13:print mid$(ps$,i,1);" ";:next i
640 for i=1 to 26:poke 49152+i,0:next i
650 for i=1 to 13
660 n=asc(mid$(ps$,i,1))-64
670 poke 49152+n,peek(49152+n)+1
680 next i:print:print:print"";
690 print"";
700 nm=nm+1:wd$=""
710 print nm;
720 for i=49153 to 49178:poke 100+i,peek(i):next i
730 print"[155][175][157]";
740 get a$:tm=tm-.6:if ss<>int(tm/10) then ss=int(tm/10):gosub 1690
750 if ss<=0 then gosub 1570:gosub 1630:goto 940
760 if int(ss)=20 then poke 53280,2
770 if a$=chr$(20) then if wd$<>"" then print" [157][157] [157][175][157]";:gosub 1660
780 if a$=chr$(13) then 870
790 if a$<"a" or a$>"z" then 740
800 tm=tm-2
810 a=asc(a$)+49188:if peek(a)=0 then 740
820 gosub 1510
830 print a$;
840 wd$=wd$+a$
850 poke a,peek(a)-1
860 goto 730
870 if wd$="" then 790
880 fl=1:if nm=1 then 910
890 for i=1 to nm-1:if wd$=w$(i) then fl=0
900 next i
910 if fl=1 then w$(nm)=wd$:gosub 1570:gosub 1390:goto 690
920 for i=1 to 2+len(wd$+str$(nm)):print" [157][157]";:next i:nm=nm-1
930 gosub 1630:print"";:goto 690
940 sc(pl)=sc:poke 53280,12:print:print"any deletions?"
950 gosub 1930
960 if a$="n" then 990
970 if a$<>"y" then 950
980 gosub 1730
990 next pl
1000 print"[147]":print:if np=1 then 1070
1010 print"the scores:":print
1020 hs=0:for i=1 to np:print p$(i),sc(i)
1030 if sc(i)>hs then wn=i:hs=sc(i)
1040 next i:print
1050 print"the winner is ";p$(wn)
1060 goto 1080
1070 print"[147]your score is ";sc(1):hs=sc(1):print""
1080 open 1,8,2,"scrambler highs,s,r":for i=1 to 4:for j=1 to 2:input#1,hs(i,j)
1090 next j:next i:close 1
1100 i=int(tl/2)+1:j=(0-(gt$="w"))+1
1110 if hs>hs(i,j) then hs(i,j)=hs:gosub 1880
1120 print"high scores:"
1130 print:print"","points","words":print"[196][196][196][196][196][196][196][196][196][196][196]"
1140 for i=1 to 4:print i*2-1,;:print"[157][157][157][157][157][157][157]min. ";:for j=1 to 2
1150 print hs(i,j),:nextj:print:next i
1160 print"play again? same / new / quit"
1170 gosub 1930
1180 if a$="s" then 390
1190 if a$="n" then goto 80
1200 if a$="q" then print"[147]":end
1210 goto 1170
1220 data bowyol
1230 data tikrbh
1240 data aeaeae
1250 data fplhbn
1260 data finutp
1270 data ocompw
1280 data vqysws
1290 data pqvwai
1300 data sihruf
1310 data kdgjmc
1320 data eaeaea
1330 data zqxevj
1340 data sumrgi
1350 ps$=""
1360 for i=1 to 13:ps$=ps$+mid$(dc$(i),int(rnd(0)*6+1),1)
1370 next i
1380 return
1390 print" ";:poke 783,1:sys 65520
1400 if peek(782)>28 then print:print"";:poke 783,1:sys 65520
1410 if peek(781)>22 then gosub 1860:print"";
1420 nl=len(wd$):if nl>5 then nl=6
1430 nl=nl-(nl>3)-(nl>4)-(nl>5)
1440 if gt$="p" then sc=sc+nl
1450 if gt$="w" then sc=sc+1
1460 sc$=str$(sc)
1470 sc$=right$(sc$,len(sc$)-1)
1480 if len(sc$)<4 then sc$="0"+sc$:goto 1480
1490 for i=1 to len(sc$):poke 2018+i,asc(mid$(sc$,i,1)):next i
1500 return
1510 poke s+24,11
1520 poke s+3,8:poke s+5,0:poke s+6,240
1530 poke s,47:poke s+1,65
1540 poke s+4,65
1550 poke s+4,64:poke s+24,0
1560 return
1570 poke s+24,11
1580 poke s+1,130
1590 poke s+5,9:poke s+15,30
1600 poke s+4,21
1610 for t=1to 75:next:poke s+4,20
1620 poke 54273,0:poke 54272,0:return
1630 poke s+24,10:poke s+5,128:poke s+6,248
1640 poke s+1,5:poke s+4,33:for b3=1 to 119:next:poke s+1,0:poke s+24,0
1650 poke 54273,0:poke 54272,0:return
1660 a=asc(right$(wd$,1))-64:poke 49252+a,peek(49252+a)+1
1670 wd$=left$(wd$,len(wd$)-1)
1680 return
1690 ss$=str$(ss):ss$=right$(ss$,len(ss$)-1)
1700 if len(ss$)<3 then ss$=" "+ss$:goto 1700
1710 for i=1 to 3:poke 2001+i,asc(mid$(ss$,i,1)):next i
1720 return
1730 gosub 1860
1740 sc=sc(pl)
1750 for i=1 to nm-1:print"";w$(i);" "
1760 print"is this word correct? (y/n)"
1770 gosub 1930
1780 if a$="n" then wd$=w$(i):gosub 1810
1790 next i:sc(pl)=sc
1800 return
1810 nl=len(wd$):if nl>5 then nl=6
1820 nl=nl-(nl>3)-(nl>4)-(nl>5)
1830 if gt$="p" then sc=sc-nl
1840 if gt$="w" then sc=sc-1
1850 return
1860 print"":fori=1to22:print" ":nexti
1870 return
1880 open1,8,15,"s0:scrambler highs":close 1
1890 print"writing new hi score"
1900 open 1,8,8,"scrambler highs,s,w":for i=1 to 4:for j=1 to 2:print#1,hs(i,j)
1910 next j:next i
1920 close 1:open 1,8,15:input#1,a,b$:close 1:return
1930 get a$:if a$="" then 1930
1940 return
1950 for d=1 to 40:print"[195]";:next
1960 return