home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1985 July
/
1985-07.d64
/
sleuth
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
4KB
|
119 lines
1 poke56,40:clr:fora=679to729:readb:pokea,b:next
2 data 173,136,2,9,128,168
3 data 169,0,170,148,217,24
4 data 105,40,144,1,200,232
5 data 224,26,208,243,169,255
6 data 149,217,169,0,133,251
7 data 169,216,133,252,162,3
8 data 160,0,169,6,145,251
9 data 200,208,251,230,252,202,16,242,96
10 gosub540
15 z=20:z1=53281:z2=6:z3=1:z4=54296:z5=54280:s2=54273:z6=53280:g1=54276
20 g2=54283:s3=54272:fora=54272to54296:pokea,0:next:poke54277,25:poke54284,29
25 print"[147]":dima(5,4):goto80
30 gosub415
35 cl=0:forj=0to3:fori=0to4:a(i,j)=0:next:next:pokez1,z3
36 gosub 540:fora=0to4:c(a)=0:next
40 print"[147]one evening, while on holiday at lord
45 [153]"crumbly's mansion you hear a shot and
50 print"find lord crumbly dead"
55 print"the other people here are"
60 fori=0to4:printtab(5)a$(i):nexti
65 print:print"how quickly can you solve the murder?"
70 print"who had motive,weapon and opportunity?":poke198,0
75 print"hit any key";:wait198,1:poke198,0:print"[147]":goto95
80 print"[147]":a$(0)="maid whiggins[146]":a$(1)="[144]sir chauncy[146]"
85 a$(2)="[156]madam larue[146]":a$(3)="butler snipe[146]"
90 a$(4)="professor bard[146]":a$(5)="[159]lord crumbly[146]":goto30
95 i=int(rnd(1)*5):lr(i)=1:i=int(rnd(1)*5)
100 forj=0to3:a(i,j)=1:next
105 forj=0to2:c=0
110 fori=0to4
115 ifa(i,3)=1then145
120 ifc=2then145
125 ifj=0then135
130 k=j-1:ifa(i,k)=1then145
135 ifrnd(1)>.5thena(i,j)=1
140 ifa(i,j)=1thenc=c+1
145 nexti
150 nextj
155 cl=cl+1:w=int(rnd(1)*5):y=int(rnd(1)*3):uv=int(rnd(1)*3)+1
160 vv=int(rnd(1)*3)+1:x=int(rnd(1)*5):ifx=wthen160
165 poke204,1:print"[147]one of the suspects is a compulsive liar[146]"
170 print:print"during questioning:":print
175 printa$(w)" says:":print
180 ony+1goto185,225,265
185 ifa(x,y)=0then215
190 iflr(w)=1then220
195 onuvgoto200,205,210
200 printa$(5):print"was blackmailing":printa$(x):goto305
205 printa$(x):print" hated":printa$(5):goto305
210 printa$(5):print"secretly killed":printa$(x);"'s lover":goto305
215 iflr(w)=1then195
220 printa$(x):print"had no motive ":goto305
225 ifa(x,y)=0then255
230 iflr(w)=1then260
235 onuvgoto240,245,250
240 printa$(x):print"carries a gun":goto305
245 print"a gun was kept in":printa$(x);"'s room":goto305
250 printa$(x):print"just bought a gun":goto305
255 iflr(w)=1then235
260 printa$(x):print"had no access to a gun":goto305
265 ifa(x,y)=0then295
270 iflr(w)=1then300
275 onvvgoto280,285,290
280 printa$(x):print"went to bed very early":goto305
285 printa$(x):print"had not been seen since dinner":goto305
290 printa$(x):print" was by":printa$(5);"'s room just before the shot":goto305
295 iflr(w)=1then275
300 printa$(x):print"was with someone when the shot was fired":goto305
305 print"your options are:":print:print"(1)grill suspects"
310 print"(2)make accusation"
315 geta$:ifa$="1"then155
320 ifa$>chr$(132)anda$<chr$(137)then485
325 ifa$<>"2"then315
330 print"[147]who did it?":print
335 fori=0to4:printi"[157]) ";a$(i):print:next:poke198,0
337 getk$:ifasc(k$+chr$(0))<48orasc(k$+chr$(0))>52then337
340 k=val(k$):ifa(k,3)=1then380
345 print"[147]after"cl"clues you":print"have accused the wrong person"
350 print"before you can correct your mistake, you are framed for the murder"
355 pokes2+3,15:fori=0to60:pokes2+2,128:next:pokes2+2,0
360 print:fori=0to4:ifa(i,3)<>1then370
365 printa$(i):a(i,3)=0
370 next
375 print"was the murderer!":goto390
380 print"[147]"a$(k)" did it!":print"you caught the killer after";cl;"clues."
385 a(k,3)=0:pokes2+3,15:n=195:forj=1to4:n=n+10
390 fori=0to4:iflr(i)<>1then400
395 print:printa$(i):print"was the liar.":lr(i)=0
400 next
405 input"another case (y/n)";q$:ifq$="y"then35
410 end
415 print"[147][144]"spc(z-6)"s l e u t h":pokez1,z2:pokez4,15:pokez6,0
420 print""spc(z-10);:forq=1to4:readn,p:pokes2,n:pokes3,p:pokeg1,32:pokeg1,33
425 fori=1to800:next:next:a$="[213][174][176][196][201][157][157][157][157][157][202][189][173][198][203]"
430 readn,p:pokes2,n:pokes3,p:pokeg1,32:pokeg1,33:fori=1to1300:next:forq=1to4
435 readn,p:pokes2,n:pokes3,p:pokeg1,32:pokeg1,33:fori=1to300:next:next:n=185
440 forj=1to4:readn,p:pokes2,n:pokes3,p:pokeg1,32:pokeg1,33
445 printa$;:ifj=2thenprint"[145][145][145][145][145][145]";
450 fork=1to800:next:next
455 pokes2,0:pokez5,220:pokeg2,128:pokeg2,129:l=16
460 ifl=0then470
465 l=l-1:pokez4,l:fori=1to30:next:goto460
470 pokez5,0:return
475 data4,48,4,251,6,71,8,97,6,167,6,71,5,152,4,251,4,180,4,48
480 data 4,251,6,71,8,97
485 s=asc(a$)-121:gosub530
490 poke214,c(s-12):printchr$(13)"[145]";
495 poke204,0:wait198,255:geta$
500 ifa$="_"then520
505 ifa$>chr$(132)anda$<chr$(137)then535
510 poke205,3:wait207,1:printa$;:ifpeek(214)=24thenprint"[145]";
515 goto495
520 c(s-12)=peek(214):wait205,3:wait207,1:poke204,1:s=1:poke648,4:print"[147]"
525 gosub530:goto165
530 poke53272,peek(53272)and15ors*16:poke648,s*4:sys679:return
535 wait205,3:wait207,1:poke204,1:c(s-12)=peek(214):goto485
540 fors=12to15:gosub530:print"[147]":next:s=1:gosub530:print"[147]":return