home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1985 July / 1985-07.d64 / sleuth (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  4KB  |  119 lines

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