home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1994 September
/
1994-09b.d64
/
ketchem
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
6KB
|
160 lines
1 rem copyright 1994 - compute publications intl ltd - all rights reserved
2 poke52,48:poke56,48:clr:poke56334,peek(56334)and254:poke1,peek(1)and251
3 fori=0to511:pokei+12288,peek(i+53248):next:poke1,peek(1)or4
4 poke56334,peek(56334)or1
5 poke53272,(peek(53272)and240)+12
6 fori=12576to12599:readd:pokei,d:next:poke53280,10:poke53281,11
7 a$="$$$$$$$ $$$$$$$$$$$$$$$$$ $$$$"
8 b$="$$$$$^[144]$$$$$$$ $$$$$$$$$^[144]$$$$$$"
9 c$="$$^[144]$$$$$$$$$$$$^[144]$ $$$$$$$$$$$$"
10 d$="$$$$$$$$$$$^[144]$$$$$$$$$$$$$^[144]$$$$"
11 e$=""
12 f$=" "
13 goto136
14 print"[147]do you want to play against the "
15 print:print" computer or another human ? (c/h)"
16 get ch$:if ch$=""then16
17 if ch$="c"then cc=1:pt$="computer":goto19
18 if ch$<>"h"then16
19 if q$="y" and cc=1 then25
20 if q$="y" then23
21 print:print" "chr$(37);:print" what is player one's name"
22 print:input" (seven letters or less)";po$:ifcc=1 then25
23 print:print" "chr$(38);:print" what is player two's name"
24 print:input" (seven letters or less)";pt$
25 poke53281,11:print"[147][144]start"
26 print"[144]"a$""spc(10)b$""spc(10)c$""spc(10)d$
27 printe$"[145][145]"spc(32)"finish
28 [151] 1039,37:[151]55311,1:[153]""[166]17)po$
29 [151] 1119,38:[151]55391,6:[153] [166]57) pt$
30 cm[178]54272:mm[178]1188:nn[178]1188:sn[178]54272:[129]ns[178]sn[164]sn[170]23:[151]ns,0:[130]:[151]sn[170]24,15
31 [151]1188,38:[151]1188[170]cm,1:[151]1188,37
32 [141]129
33 [151]53281,13:[151]53280,10:[151]sn[170]4,0:[141]134
34 [151]1347,62:[151]1347[170]cm,2:[151]1507,62:[151]1507[170]cm,2:[151]1667,62
35 [151]1667[170]cm,2
36 [141]148:f[178][181]([187](.)[172]9):ff[178][181]([187](.)[172]9[170]1)
37 [153]e$"stop "po$": astopdd or sstopubtract "f","ff
38 [161] cl$:[139] cl$[179][177]""[167]38
39 [129]q[178]1[164]500
40 [161]as$:[139]as$[178]"a"[167]44
41 [139]as$[178]"s"[167]45
42 [130]
43 m[178][181]([187](.)[172]9):[137]48
44 m[178](f[170]ff)[171]1:[137]48
45 [139]f[177]ff[167]m[178](f[171]ff)[171]1:[137]48
46 [139]ff[177]f[167]m[178](ff[171]f)[171]1:[137]48
47 [139] ff[178]f [167] m[178]0:[137]72
48 [129]i[178]mm[164]mm[170]m:[151]i,37:[151]i[170]cm,1:[129]w[178]1[164]250:[130]:[141]110:[151]i,32
49 [151]nn,38:[151]nn[170]cm,6
50 [139]i[178]1218[167]m[178]((mm[170]m)[171]1218):mm[178]1348:[137]48
51 [139]i[178]1378[167]m[178]((mm[170]m)[171]1378):mm[178]1508:[137]48
52 [139]i[178]1538[167]m[178]((mm[170]m)[171]1538):mm[178]1668:[137]48
53 [139]i[178]1698[167] wi$[178]po$:[137]118
54 [130]:mm[178]i:[151]i,37:[151]i[170]cm,1
55 [139]mm[178]1196[167][141]114:[141]68:[137]65
56 [139]mm[178]1214[167][141]114:[141]68:[137]65
57 [139]mm[178]1362[167][141]114:[141]68:[137]65
58 [139]mm[178]1526[167][141]114: [141]68:[137]65
59 [139]mm[178]1354[167][141]125:[141]70:[137]65
60 [139]mm[178]1372[167][141]125:[141]70:[137]65
61 [139]mm[178]1524[167][141]125:[141]70:[137]65
62 [139]mm[178]1511[167][141]125:[141]70:[137]65
63 [139]mm[178]1694[167][141]125:[141]70:[137]65
64 [139]mm[178]1680[167][141]125:[141]70
65 [139] i[178]nn [167] nn[178]1188:[141]129:[151]1188,38:[151]1188[170]cm,6
66 [139] mm[178]nn [167] nn[178]1188:[141]129:[151]1188,38:[151]1188[170]cm,6
67 [137]72
68 [151]mm,32:[129]d[178]1[164]4:mm[178]mm[170]40:[151]mm,37:[151]mm[170]cm,1:[129]w[178]1[164]250:[130]
69 [151]mm,32:[130]:[151]mm,37:[151]mm[170]cm,1:[142]
70 [151]mm,32:[129]d[178]1[164]4:mm[178]mm[171]40:[151]mm,37:[151]mm[170]cm,1:[129]w[178]1[164]250:[130]
71 [151]mm,32:[130]:[151]mm,37:[151]mm[170]cm,1:[151]mm[170]40,36:[151](mm[170]40)[170]cm,0:[142]
72 [151]53281,14:[151]sn[170]4,0:[141]134
73 [141]148:[139] cc[178]1 [167] n[178][181]([187](.)[172]15):[141]133:[137]86
74 [141]148:f[178][181]([187](.)[172]9):ff[178][181]([187](.)[172]9[170]1)
75 [153]e$" "pt$": add or subtract "f","ff
76 [161]cl$:[139] cl$[179][177]""[167]76
77 [129] q[178]1 [164] 500
78 [161]as$:[139]as$[178]"a"[167]82
79 [139]as$[178]"s"[167]83
80 [130]
81 n[178][181]([187](.)[172]9):[137]86
82 n[178](f[170]ff)[171]1:[137]86
83 [139]f[177]ff[167]n[178](f[171]ff)[171]1:[137]86
84 [139]ff[177]f[167]n[178](ff[171]f)[171]1:[137]86
85 [139] ff[178]f [167] n[178]0:[137]33
86 [129]h[178]nn[164]nn[170]n:[151]h,38:[151]h[170]cm,6:[129]w[178]1[164]250:[130]:[141]110:[151]h,32
87 [151]mm,37:[151]mm[170]cm,1
88 [139]h[178]1218[167]n[178]((nn[170]n)[171]1218):nn[178]1348:[137]86
89 [139]h[178]1378[167]n[178]((nn[170]n)[171]1378):nn[178]1508:[137]86
90 [139]h[178]1538[167]n[178]((nn[170]n)[171]1538):nn[178]1668:[137]86
91 [139]h[178]1698[167] wi$[178]pt$:[137]118
92 [130]:nn[178]h:[151]h,38:[151]h[170]cm,6
93 [139]nn[178]1196[167][141]114:[141]106:[137]103
94 [139]nn[178]1214[167][141]114:[141]106:[137]103
95 [139]nn[178]1362[167][141]114:[141]106:[137]103
96 [139]nn[178]1526[167][141]114:[141]106:[137]103
97 [139]nn[178]1354[167][141]125:[141]108:[137]103
98 [139]nn[178]1372[167][141]125:[141]108:[137]103
99 [139]nn[178]1524[167][141]125: [141]108:[137]103
100 [139]nn[178]1511[167][141]125: [141]108:[137]103
101 [139]nn[178]1694[167][141]125:[141]108:[137]103
102 [139]nn[178]1680[167][141]125:[141]108
103 [139]h[178]mm [167] mm[178]1188:[141]129:[151]1188,37:[151]1188[170]cm,1
104 [139] nn[178]mm [167] mm[178]1188:[141]129:[151]1188,37:[151]1188[170]cm,1
105 [137]33
106 [151]nn,32:[129]d[178]1[164]4:nn[178]nn[170]40:[151]nn,38:[151]nn[170]cm,6:[129]w[178]1[164]250:[130]
107 [151]nn,32:[130]:[151]nn,38:[151]nn[170]cm,6:[142]
108 [151]nn,32:[129]d[178]1[164]4:nn[178]nn[171]40:[151]nn,38:[151]nn[170]cm,6:[129]w[178]1[164]250:[130]
109 [151]nn,32:[130]:[151]nn,38:[151]nn[170]cm,6:[151]nn[170]40,36:[151](nn[170]40)[170]cm,0:[142]
110 [151]sn[170]24,15:[151]sn[170]4,17:[129]sd[178]38[164]149[169]82:[151]sn[170]1,sd:[130]
111 [129]se[178]38[164]149[169]82:[151]sn,sd:[130]
112 [129]sd[178]149[164]38[169][171]82:[151]sn[170]1,sd:[130]
113 [129]se[178]149[164]38[169][171]82:[151]sn,se:[130]:[151]sn[170]24,0:[142]
114 [151]sn[170]24,15:[151]sn[170]4,17:[129]sd[178]49[164]126[169]2:[151]sn[170]1,sd:[130]
115 [129]se[178]49[164]126[169]2:[151]sn,se:[130]
116 [129]sd[178]126[164]49[169][171]2:[151]sn[170]1,sd:[130]
117 [129]se[178]126[164]49[169][171]2:[151]sn,se:[130]:[142]
118 [153]"load"[166]12)"the winner is ";:[141]149:[141]157
119 [153]"loadstop"[166]255)wi$
120 [151]53281,1:[129]en[178]1[164]3000:[130]:[151]53281,0:[153]""
121 cc[178]0:[153]:[153]"load would you like to try again (y/n)
122 get q$:if q$=""then122
123 ifq$="n"then end
124 goto14
125 pokesn+24,15:pokesn+4,17:forsd=150to50step-2:pokesn+1,sd:next
126 forse=150to50step-2:pokesn,se:next
127 forsd=50to150step2:pokesn+1,sd:next
128 forse=50to150step2:pokesn,se:next:return
129 pokesn+24,15:pokesn+5,8:pokesn+6,255:pokesn+4,23:forsd=1to3:f1=10
130 forse=1to6:f2=30:pokesn+1,f1:forsf=1to3:pokesn+15,f2:f2=f2/1.2:nextsf
131 f1=f1*1.5:nextse:forsg=1to8:pokesn+1,f1:pokesn+15,5:forvv=1to5:nextvv
132 f1=f1/1.5:nextsg:nextsd:pokesn+24,0:return
133 ifcc=1thenprinte$;f$:printspc(2)f$;e$spc(13)"[144]computer moves "n+1:return
134 printe$spc(2)f$
135 printspc(14)f$:return
136 print"[147][155] the object of [144]ketchem[155] is to beat your opponent to the ";
137 print" finish. each turn, you determine the number of spaces you"
138 print" will advance by comparing two numbers and deciding whether to";
139 print" add or subtract them. by choosing carefully you may be able to";
140 print" land on holes, avoid arrows, or send your opponent back to start."
141 print:print" if you land on a hole in the path, you drop through to the";
142 print" next level. if you land on an arrow, you are sent back a level";
143 print". if you land on your opponent, he is sent back to start."
144 print""spc(13)"[144]go ketchem!!!"
145 print" hit any key to continue"
146 get cl$:if cl$=""then146
147 goto14
148 for dy=1 to 1000:next:return
149 sn=54272:pokesn+24,15:pokesn+4,17
150 pokesn+1,25:pokesn,30:pokesn+8,18:pokesn+7,209:forsf=1to200:next
151 pokesn+1,33:pokesn,135:pokesn+8,25:pokesn+7,30:forsf=1to200:next
152 pokesn+1,42:pokesn,62:pokesn+8,31:pokesn+7,165:forsf=1to200:next
153 pokesn+1,50:pokesn