home *** CD-ROM | disk | FTP | other *** search
/ Rockford Magazine / Rockford_Magazine_022_19xx_-_de_Disk_2_of_4_Side_B.d64 / kalah_commo_rof (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  12KB  |  410 lines

  1. 1 goto910
  2. 2 print"X[169][141][169][141]x{$60} [234][255][169][255][133][145]l4[234]X[169]1[141][169][234][141]x{$60} 
  3. 3 [153]"Xstepginputstopstepinputonx{$60} (NULL)(NULL)step(NULL)inputlistlx(NULL)Xstepuinputstopstep(NULL)inputonx{$60}    
  4. 4 print"XHHH[170]H[168]HHHHHHH[152]h[138]hx{$60}    
  5. 5 [153]"HHHHHHH{$60}  
  6. 6 print"[160][255][200][132][251][169][216][133][252] [241][183][138][162][160][255][200][145][251][136][208][251][230][252][202][208][246]{$60}   
  7. 7 [153]"newclose(NULL)left$>(NULL)on(NULL)let(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)mid$(NULL)(NULL){$60}  
  8. 35 ifuw=0thensysuu,15
  9. 40 pokeuc,0:pokeun,0:ur$="":ui$="":iful=0thenul=39
  10. 45 getui$:ifui$=""then45
  11. 50 ua=asc(ui$):ur=len(ur$):ifua=13andur>0thenpokeuc,1:print" [157]";:goto70
  12. 55 ifua=20thenon-(ur=0)goto45:ur$=left$(ur$,ur-1):print"[157]  [157][157]";:goto45
  13. 60 ifur=ulthen45
  14. 65 gosub95:ur$=ur$+ui$:printui$;:goto45
  15. 70 ifur$=ux$thenprint"[157] ";:goto145
  16. 75 forui=urto1step-1:ifmid$(ur$,ui,1)=" "thennext
  17. 80 ur$=left$(ur$,ui):print:return
  18. 95 iflen(us$)=0then110
  19. 100 forui=1tolen(us$):ifui$<>mid$(us$,ui,1)thennext:ui$=""
  20. 105 return
  21. 110 ifua=46thenreturn
  22. 115 ifua=32andur<>0thenreturn
  23. 120 ifua>47andua<58thenreturn
  24. 125 ifua>64andua<91thenreturn
  25. 130 ifua<193orua>218thenui$="":return
  26. 135 ifpeek(ut)=uu%thenui$=chr$(ua-128)
  27. 140 return
  28. 145 gosub170:poke251,0:poke252,us/256:poke253,0:poke254,uf:sysuv
  29. 150 uz=1:uv%=peek(ut):goto300
  30. 155 uz=0:us$=uj$:ug$=uk$:ut$=ul$:up=uj:ul=uk:print"[147]";:ifuw=0thenpokeuy,6:pokeux,14
  31. 160 pokeut,uv%:poke251,0:poke252,uf:poke253,0:poke254,us/256:sysuv:ifuw=0thensysuu,15
  32. 165 pokeu1,u1%:pokeu2,u2%:pokeu3,u3%-1:pokeu4,u4%:goto35
  33. 170 u1%=peek(u1):u2%=peek(u2):u3%=peek(u3):u4%=peek(u4)
  34. 175 uj$=us$:uk$=ug$:ul$=ut$:uj=up:uk=ul:return
  35. 300 print"[147]":pokeut,uu%:ifuw=0thenpokeuy,12:pokeux,6
  36. 305 print"                m e n u"
  37. 310 print"    --------------------------------"
  38. 315 print"       1.   begin kalah"
  39. 320 print"       2.   instructions"
  40. 325 print"       3.   documentation       "
  41. 330 print"       4.   quit"
  42. 335 print"    --------------------------------"
  43. 340 print"       press a number key (1-4) ";
  44. 345 ul=1:us$="1234"
  45. 347 gosub35:us$=""
  46. 350 onval(ur$)gosub1000,400,500,390
  47. 355 goto300
  48. 370 ifuz=1thensysup%:goto155
  49. 375 return
  50. 390 sysue:print"[154][147]":ifuw=0thenpokeuy,6:pokeux,14:sysuu,14
  51. 395 clr:end
  52. 400 print"[147]":pokeut,ul%:ifuw=0thenpokeuy,11:pokeux,12
  53. 405 ut$=" [203]alah":uh=1:up=0:ug$="[201]nstructions":gosub850
  54. 412 print" [201]n this game you start with a certain"
  55. 413 print" number of beans in each pit.  [212]he"
  56. 414 print" object of the game is to put as many"
  57. 416 print" beans as possible into your collection"
  58. 418 print" pit.  [217]our collection pit is the one"
  59. 420 print" on the right.  [193]ll the pits on the"
  60. 422 print" the bottom row are yours, the others"
  61. 424 print" are the computer's."
  62. 425 uh=1:gosub835:gosub850
  63. 426 print" [197]ach time you pass your collection"
  64. 428 print" pit or stop on it, you gain one"
  65. 429 print" point.  [212]he best strategy is to try"
  66. 431 print" to stop right on your collection":print" pit."
  67. 432 print" [207]nce you get better, you may"
  68. 433 print" practice capturing the computer's"
  69. 434 print" beans.  [212]his can be done only when"
  70. 436 print" the pit you wish to capture has two"
  71. 438 print" or less beans in it."
  72. 439 uh=1:gosub 835:gosub 850
  73. 440 print" [212]he actual capturing is done when"
  74. 442 print" you move your beans so they land on"
  75. 444 print" the computer's side of the board."
  76. 445 print" [212][200][201][211][160][208][201][212][160][205][213][211][212][160][200][193][214][197][160][212][215][207][160][207][210][160][204][197][211][211][160][194][197][193][206][211]"
  77. 446 print" [201][206][160][201][212][160][207][210] [207][210][160][217][207][213][210][160][194][197][193][206][211][160][215][201][204][204][160][194][197][195][207][205][197]"
  78. 448 print" [212][200][197] [195][207][205][208][213][212][197][210]'[211] [208][207][211][211][197][211][211][201][207][206]."
  79. 455 uh=1:gosub835:gosub850
  80. 460 print" [206]ote:
  81. 475 [153]" right$f at any time you wish to return"
  82. 480 [153]" to the (NULL)val(NULL)(NULL) press 'h' (NULL)val(NULL)(NULL)(NULL)(NULL)."
  83. 485 [141]835
  84. 490 [139]uz[178]1[167][158]up%:[137]155
  85. 495 [142]
  86. 500 [153]"load":[151]ut,ul%:[139]uw[178]0[167][151]uy,2:[151]ux,10
  87. 501 ut$[178]" (NULL)alah":uh[178]1:up[178]0:ug$[178]"str$ocumentation":[141]850
  88. 502 [153]"     (NULL)o the best of our knowledge,"
  89. 503 [153]"     this program is in the public"
  90. 504 [153]"     domain.  right$f this is not true,"
  91. 505 [153]"     please contact:"
  92. 506 [153]"      len(NULL)(NULL)(NULL)(NULL)str$(NULL)(NULL)valclosepeek(NULL)(NULL)right$(NULL)val(NULL)(NULL)close(NULL)atnlenleft$right$(NULL)val(NULL)"
  93. 507 [153]"          3370 (NULL)harmacy atnve.
  94. 508 print"          [193]gincourt, [207]ntario"
  95. 509 print"          [195]anada, [205]1[215] 2[203]4"
  96. 510 print"          (416) 499-4292"
  97. 511 uh=1:gosub835:gosub850
  98. 512 print"      [208]rogram [206]ame: [203]alah
  99. 513 [153]"      (NULL)ritten by  : peekill ascinzer"
  100. 514 [153]"      (NULL)evised by  : (NULL)eter (NULL)agsdale"
  101. 515 [153]"      (NULL)his program will run on any
  102. 516 print"         [194][193][211][201][195][160]2.0 [208][197][212] [195]omputer
  103. 517 [153]"         peekatn(NULL)right$len 4.0 (NULL)val(NULL)closelenomputer
  104. 518 print"         8032 [195][194][205] [195]omputer
  105. 519 [153]"         lenommodore 64 lenomputer
  106. 585 gosub835
  107. 590 ifuz=1thensysup%:goto155
  108. 595 return
  109. 700 printuc$"[147]before running this program on an 8032
  110. 705 [153]"      load the 'cbm 4032' program":[128]
  111. 800 [153]"load";:[151]ut,uu%:[139]uw[178]0[167][151]uy,1:[151]ux,14
  112. 801 [129]i[178]1[164]38:[153]" wait";:[130]
  113. 802 [129]i[178]1[164]22:[153]"cmd wait";:[130]
  114. 803 [129]i[178]1[164]37:[153]"cmdcmd wait";:[130]
  115. 804 [129]i[178]1[164]22:[153]"oncmd wait";:[130]
  116. 805 [153]"step  wait
  117. 806 print" [146]   [146][169]
  118. 807 [153]" wait  tab((NULL)wait o m m o d o r e
  119. 808 print"[223]  [146]
  120. 809 [153]"educational
  121. 810 print"software
  122. 811 [153]"1983
  123. 812 printleft$(ud$,24);"press space bar or wait[146]"uc$:ui=0
  124. 813 getui$:ifui$<>" "thenui=ui+1:ifui<250then813
  125. 814 goto300
  126. 835 pokeun,0:printleft$(ud$,24);"press space bar to continue[146]"
  127. 840 getui$:ifui$<>" "then840
  128. 845 return
  129. 850 up=up+1:print"[147]"left$(ut$+up$,21);right$(up$+ug$+str$(up),18)
  130. 855 print" --------------------------------------"
  131. 860 ifuh=0thenprintleft$(ud$,24);left$(up$,7);"help - press   h <return>"
  132. 865 uh=0:print"":return
  133. 875 printleft$(ud$,24);"           one moment please...     ":return
  134. 900 ux$="h":us=32768:u1=196:u2=197:u3=198:u4=216:uc=167:ub=1024:ud=1084:ue=1105
  135. 901 ut=59468:uu%=12:ul%=14:up%=1158:un=158:poke50003,0:uw=peek(50003):uf=peek(53)
  136. 902 ifuw=0thenus=1024:u1=209:u2=210:u3=211:u4=214:uc=204:ub=2048:ux=53280:ud=2064
  137. 903 ifuw=0thenut=53272:uu%=21:ul%=23:up%=2151:un=198:uy=53281:uu=2199:ue=2087
  138. 904 uc$=chr$(155):uv=1214:ifuw=0thenuf=196:uv=2238
  139. 905 ud$="":up$="                                      "
  140. 907 dim board%(3,14),l1%(6),l2%(6,6),         pit%(14,2),i(3),m%(6)
  141. 909 return
  142. 910 gosub900:print"[147]":print"[160]":rem shifted space
  143. 915 ifpeek(us+40)<>96then700
  144. 920 if(fre(0)-(sgn(fre(0))<0)*65536)>500then935
  145. 925 printuc$"[147]this machine does not have enough"
  146. 930 print"memory to run this program !":sysue:end
  147. 935 print"[147]"uc$:ifuw=0then965
  148. 940 ifuf=60oruf=108oruf=124then950
  149. 945 poke52,0:poke53,uf-4:clr:gosub900
  150. 950 ifuw=160thenpoke1103,88:poke1104,228:poke1107,85:poke1111,228:goto965
  151. 955 ifuw<>1thenprint"[147]this pgm will not work on this machine!":sysue:end
  152. 960 poke1103,49:poke1104,230:poke1107,46:poke1111,230:goto965
  153. 965 sysud
  154. 970 gosub800:goto300
  155. 1000 ifuz=1thensysup%:sysup%:uz=0
  156. 1001 print"[147]"uc$;:restore:ifuw=0thenpokeuy,9:pokeux,5
  157. 1005 ut$=" kalah":up=0
  158. 1030 rem
  159. 1040 rem pit location data
  160. 1050 data 30,11,25,11,20,11,15,11,10,11,5,11,1,15,5,17,10,17,15,17,20,17
  161. 1060 data 25,17,30,17,35,15
  162. 1070 for i= 1 to 14
  163. 1080 read pit%(i,1):read pit%(i,2):next
  164. 1090 rem---main calling routine----
  165. 1100 gosub 1250:rem initialize
  166. 1110 gosub 1410:rem instructions
  167. 1120 gosub 1650:rem draw board
  168. 1130 if p$="c" then 1190
  169. 1140 gosub 1950:rem get human's move
  170. 1150 if a$="r" then gosub 3120:goto 1230
  171. 1160 if a$="t" then gosub 3210:goto 1140
  172. 1170 l=0:gosub 2090:rem display move
  173. 1180 if w$<>"n" then 1220
  174. 1190 gosub 2680:rem find computer move
  175. 1200 l=0:gosub 2090:rem display move
  176. 1210 if w$="n" then 1140
  177. 1220 gosub 3120:rem win message
  178. 1230 if ur$="y" then 1100
  179. 1240 print"[147]":return
  180. 1250 rem---initialize---
  181. 1260 m=rnd(-ti)
  182. 1270 p$="":w$="":nm=6
  183. 1280 blank$="                                       "
  184. 1290 beans$="[209][209][209][209][157][157][157][157][209][209][209][209][157][157][157][157][209][209][209][209]"
  185. 1300 erase$="    [157][157][157][157]    [157][157][157][157]    "
  186. 1310 inf=30000:l=0
  187. 1320 bo%(0,7)=0:bo%(0,14)=0
  188. 1330 return
  189. 1340 rem----move cursor to x,y---
  190. 1350 poke u4,y-1:print:printtab(x);:return
  191. 1410 rem---instructions----
  192. 1420 poke ut,uu%
  193. 1460 rem---input # of beans & level--
  194. 1465 up=0:ug$="      intro[146]":gosub850
  195. 1470 print" how many beans per pit[160](3[160]makes a"
  196. 1471 print" good beginner's game) ?   [157][157]";
  197. 1480 ul=2:us$="h0123456789"
  198. 1490 gosub 35
  199. 1500 if val(ur$)>15 then print"[145][145][145][145]":goto1470
  200. 1540 nb=val(ur$)
  201. 1550 print" how hard do you want the game to be?"
  202. 1560 printtab(5)"0 = random play
  203. 1570 [153][163]5)"1 = beginner"
  204. 1580 [153][163]5)"2 = intermediate":[153][163]5)"3 = advanced"
  205. 1585 [153][163]5)"option> ";
  206. 1590 ul[178]1:us$[178]"h0123"
  207. 1600 [141]35
  208. 1610 level[178][197](ur$)
  209. 1620 [153]:[153]" do you want to go first? ";:ul[178]1:us$[178]"ynh"
  210. 1630 [141] 35:[139] ur$[178]"n" [167] p$[178]"c"
  211. 1640 [151] ut,uu%:[142]
  212. 1650 [143]---draw board----
  213. 1660 [129] i[178]1 [164] 6
  214. 1670 bo%(0,i)[178]nb:bo%(0,i[170]7)[178]nb
  215. 1680 [130] i
  216. 1690 [143]---board w/o beans---
  217. 1700 up[178]level[171]1:ug$[178]"computer levelwait":[141]850
  218. 1710 [153]"   i'm playing at level"level""
  219. 1720 [153]" stepclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclose(NULL)"
  220. 1730 [153]"stepcloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclosecloseclose  closecloseclosecloseclosecloseclosecloseclose(NULL)"
  221. 1740 [153]" waitstep (NULL) waitstep  (NULL) waitstep  (NULL) waitstepcloseclose(NULL) waitstep  (NULL) waitstepcloseclose(NULL) waitstep  (NULL) waitstep (NULL) "
  222. 1750 [129] i[178] 1 [164] 3
  223. 1760 [153]" wait    wait     wait     wait     wait     wait     wait     wait    "
  224. 1770 [130] i
  225. 1780 [153]" wait    (NULL)wait  step (NULL)wait  step (NULL)wait  stepclose(NULL)wait  stepclose(NULL)wait  step (NULL)wait  step wait    "
  226. 1790 [153]" wait                                  wait    "
  227. 1800 [153]" wait    waitstep  (NULL) waitstep  (NULL) waitstepcloseclose(NULL) waitstep  (NULL) waitstepcloseclose(NULL) waitstep  (NULL) wait    "
  228. 1810 [129] i[178] 1 [164] 3
  229. 1820 [153]" wait    wait     wait     wait     wait     wait     wait     wait    "
  230. 1830 [130] i
  231. 1840 [153]" (NULL)wait step (NULL)wait  step (NULL)wait  step (NULL)wait  stepclose(NULL)wait  stepclose(NULL)wait  step (NULL)wait  step (NULL)wait step "
  232. 1850 [153]"(NULL)      1    2    3    4    5    6     waitstep"
  233. 1860 [153]" (NULL)                                   waitstep"
  234. 1870 [143]--put beans in pits----
  235. 1880 [129] i[178] 1 [164] 6
  236. 1890 pit[178]i
  237. 1900 [141]2580:[143] beans
  238. 1910 pit[178]i[170]7
  239. 1920 [141] 2580
  240. 1930 [130] i
  241. 1940 [142]
  242. 1950 [143]---human's move----
  243. 1960 x[178]0:y[178]6:[141] 1340
  244. 1970 [153]blank$:[141] 1340
  245. 1980 [153]"   your move (1 to 6) ";:ul[178]1:us$[178]"123456rth"
  246. 1990 [141]35
  247. 2000 [139] ur$[178]"r" [167] 2080
  248. 2010 [139] ur$[178]"t" [167] 2080
  249. 2030 m[178][197](ur$)[170]7
  250. 2040 [139] bo%(0,m)[179][177]0 [167] 2080
  251. 2050 [153]"   empty pit, try again";:t[178]ti
  252. 2060 [139] ti[179]t[170]90 [167] 2060
  253. 2065 [153]"on":[153]"                        on"
  254. 2070 [137] 1960
  255. 2080 [142]
  256. 2090 [143]---display move---
  257. 2100 [139] l[178]0 [167] pit[178]m:[141] 3480:[137] 2140
  258. 2110 [129] i[178]1 [164] 14
  259. 2120 bo%(l,i)[178]bo%(l[171]1,i):[130] i
  260. 2130 m[178]i(l)
  261. 2140 pit[178]m:cap[178]0:hnd[178]bo%(l,m):bo%(l,m)[178]0
  262. 2150 [139] l[178]0 [167] [141] 2580
  263. 2160 ar[178]0:[139] (pit[179]7 [175] pit[170]hnd[177]13) [176] (pit[177]7 [175] pit[170]hnd[177]20) [167] ar[178]1
  264. 2170 [129] i[178]1 [164] hnd
  265. 2180 pit[178]pit[170]1
  266. 2190 [139] m[179]7 [175] pit[178]14 [167] 2180
  267. 2200 [139] m[177]7 [175] pit[178]7 [167] 2180
  268. 2210 [139] pit [178]15 [167] pit[178]1
  269. 2220 bo%(l,pit)[178]bo%(l,pit)[170]1
  270. 2230 [139] l[178]0 [167] [141] 2580
  271. 2240 [130] i
  272. 2250 [139] ar[178]0 [167] 2310
  273. 2260 [139] m[179]7 [175] pit[177]6 [167] 2310
  274. 2270 [139] m[177]7 [175] (pit[179]7 [176] pit[178]14) [167] 2310
  275. 2280 hnd[178]bo%(l,pit):bo%(l,pit)[178]0
  276. 2290 [139] l[178]0 [167] [141] 3480:[141] 2580
  277. 2300 [137] 2160
  278. 2310 [143]---check for capture---
  279. 2320 [139] m[179]7 [167] k[178]7
  280. 2330 [139] m[177]7 [167] k[178]14
  281. 2340 [139] m[179]7 [175] pit [179]8 [167] 2420
  282. 2350 [139] m[177]7 [175] pit [177]7 [167] 2420
  283. 2360 [139] bo%(l,pit)[179]2 [176] bo%(l,pit)[177]3 [167]2420
  284. 2370 cap[178]cap[170]bo%(l,pit):bo%(l,pit)[178]0
  285. 2380 [139] l[178]0 [167] [141] 3480:[141] 2580
  286. 2390 pit[178]pit[171]1
  287. 2400 [139] pit[178]7 [176] pit[178]0 [167] 2420
  288. 2410 [137] 2360
  289. 2420 pit[178]k:bo%(l,k)[178]bo%(l,k)[170]cap
  290. 2430 [139] l[178]0 [167] [141] 2580
  291. 2440 [141] 2460
  292. 2450 [142]
  293. 2460 [143]---check for win---
  294. 2470 [139] k[178]7 [167] k[178]8:k1[178]1:k2[178]7
  295. 2480 [139] k[178]14 [167] k[178]1:k1[178]8:k2[178]14
  296. 2490 w$[178]"y"
  297. 2500 nm[178]0
  298. 2510 [129] i[178]k [164] k[170]5
  299. 2520 [139] bo%(l,i)[179][177]0 [167] w$[178]"n":nm[178]nm[170]1
  300. 2530 [130] i
  301. 2540 [139] w$[178]"n" [167] 2570
  302. 2550 [129] i[178]k1 [164] k1[170]5
  303. 2560 bo%(l,k2)[178]bo%(l,k2)[170]bo%(l,i):[130] i
  304. 2570 [142]
  305. 2580 [143]---update pit----
  306. 2590 x[178]pit%(pit,1):y[178]pit%(pit,2)
  307. 2600 [141] 1340
  308. 2610 n[178]bo%(0,pit)
  309. 2620 [139] pit[179][177]7 [175] pit[179][177]14 [167] [153]erase$:[141] 1340
  310. 2630 [139] n[177]12 [176] pit[178]7 [176] pit[178]14 [167] [153]""n:[137] 2670
  311. 2640 [139] n[178]0 [167] 2670
  312. 2650 b[178]n[170][181]((n[171]1)[173]4)[172]5
  313. 2660 [153][200](beans$,b)
  314. 2670 [142]
  315. 2680 [143]---find computer move---
  316. 2690 [141] 3030:[143] initialize
  317. 2700 [139] level[178]0 [167] 2940
  318. 2710 [139] nm[178]1 [167] 2940
  319. 2720 [129] i1[178]6 [164] 1 [169] [171]1
  320. 2740 i(1)[178]i1: l[178]1:[141] 2090:[141]2460
  321. 2750 [139] hnd[178]0 [167] l1%(i1)[178][171]inf:[137] 2930
  322. 2760 [139] level[178]1 [176] w$[178]"y" [167] [141] 3320:[137] 2930
  323. 2770 f2[178]0
  324. 2780 [129] i2[178]6 [164] 1 [169] [171]1:i(2)[178]i2[170]7
  325. 2800 [139] f2[178]1 [167] 2920
  326. 2810 l[178]2:[141] 2090
  327. 2820 [139] hnd[178]0 [167] l2%(i1,i2)[178]inf: [137] 2920
  328. 2830 [139] level[178]2 [176] w$[178]"y" [167] [141] 3370:[137] 2920
  329. 2840 f3[178]0
  330. 2850 [129] i3[178]6 [164] 1 [169] [171]1:i(3)[178]i3
  331. 2870 [139] f3[178]1 [167] 2910
  332. 2880 l[178]3:[141] 2090
  333. 2890 [139] hnd[178]0 [167] 2910
  334. 2900 [141] 3440
  335. 2910 [130] i3:[141] 3600
  336. 2920 [130] i2:[141] 3570
  337. 2930 [130] i1
  338. 2940 max[178]l1%(1):m%(1)[178]1:c[178]1
  339. 2950 [129] i[178]2 [164] 6
  340. 2960 [139] l1%(i)[177]max [167] max[178]l1%(i):m%(1)[178]i:c[178]1
  341. 2970 [139] l1%(i)[178]max [167] c[178]c[170]1:m%(c)[178]i
  342. 2980 [130] i
  343. 2990 m[178][181]([187](1)[172]c)[170]1
  344. 3000 m[178]m%(m)
  345. 3010 [139] bo%(0,m)[178]0 [167] 2990
  346. 3020 [142]
  347. 3030 [143]---initialize tree---
  348. 3040 l0[178][171]inf
  349. 3050 [129] i1[178]1 [164] 6
  350. 3060 l1%(i1)[178]inf
  351. 3070 [129] i2[178]1 [164] 6
  352. 3080 l2%(i1,i2)[178][171]inf
  353. 3090 [130] i2: [130] i1
  354. 3100 [142]
  355. 3110 [139] m[177]7 [167] k[178]14
  356. 3120 [143]--a win!---
  357. 3130 scre [178] bo%(0,7)[171]bo%(0,14)
  358. 3140 [153]""
  359. 3150 [139] scre[177]0 [167] [153]"  i win by"scre"points!
  360. 3160 if scre<0 then print"   drats! you win by"abs(scre)"points!"
  361. 3170 if scre=0 then print"  what do you know, a tie!
  362. 3180 [153]"                            cmdcmdcmdcmdcmdcmdcmdcmdcmdcmdcmdcmdcmdcmdcmdcmdcmdcmdcmdcmdcmdcmdcmdcmdcmdplay again? ";
  363. 3190 ul[178]1:us$[178]"ynh":[141]35
  364. 3200 [142]
  365. 3210 [143]---diagnostic routine---
  366. 3220 [153]"load"
  367. 3230 [153]:[153]"l0="l0
  368. 3240 [153]"level 1 tree
  369. 3250 for i= 1 to 6:printl1%(i);:next i
  370. 3260 if level=1 then 3300
  371. 3270 print:print"level 2 tree
  372. 3280 [129] i[178]1 [164] 6:[129] j[178]1 [164] 6
  373. 3290 [153]l2%(i,j);:[130] j:[153]:[130] i
  374. 3300 [141] 1360
  375. 3310 [141] 1690:[142]
  376. 3320 [143]---level=1----
  377. 3330 e[178]bo%(l,7)[171]bo%(l,14)
  378. 3340 [139] hnd[178]0 [167] e[178][171]inf:[143] not legal move
  379. 3350 l1%(i(1))[178]e
  380. 3360 [142]
  381. 3370 [143]---level 2---
  382. 3380 e[178]bo%(l,7)[171]bo%(l,14)
  383. 3390 [139] hnd[178]0 [167] e[178]inf
  384. 3400 l2%(i(1),i(2)[171]7)[178]e
  385. 3410 [139] e[179]l1%(i(1))[167] l1%(i(1))[178]e
  386. 3420 [139] l1%(i(1))[179]l0 [167] f2[178]1
  387. 3430 [142]
  388. 3440 [143]---level 3---
  389. 3450 e[178]bo%(l,7)[171]bo%(l,14)
  390. 3460 [139] e[177]l2%(i(1),i(2)[171]7) [167] l2%(i(1),i(2)[171]7)[178]e:[139] e[177][178]l1%(i(1))[167] f3[178]1
  391. 3470 [142]
  392. 3480 [143]---blink move---
  393. 3490 d[178]pit%(pit,2)[172]40[170]pit%(pit,1)[170]us
  394. 3495 [137]3560
  395. 3500 [129] i[178]0 [164] 2
  396. 3510 [129] j [178] 0 [164] 3
  397. 3520 d1[178][194](d[170]j[170]40[172]i):[139] d1[177]128 [167] 3550
  398. 3530 [151] d[170]j[170]i[172]40,d1[170]128
  399. 3540 [130] j:[130] i
  400. 3550 [129] i[178]1 [164] 500:[130] i
  401. 3560 [142]
  402. 3570 [143] moving up from level 2
  403. 3580 [139] l1%(i(1))[177]l0 [167] l0[178]l1%(i(1))
  404. 3590 [142]
  405. 3600 [143] moving up from level 3
  406. 3610 [139] l2%(i(1),i(2)[171]7)[177][178]l1%(i(1)) [167]      3640
  407. 3620 l1%(i(1))[178]l2%(i(1),i(2)[171]7)
  408. 3630 [139] l1%(i(1))[179] l0 [167] f2[178]1
  409. 3640 [142]
  410.