home *** CD-ROM | disk | FTP | other *** search
/ Tiger Disk 21 / Tiger_Disk_021_19xx_Tiger-Crew-Disk_de_Side_C.d64 / 5.c64 (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  4KB  |  96 lines

  1. 0 printchr$(142):poke45,025:poke46,24:clr
  2. 1 poke53281,0:poke53280,14:goto1000
  3. 5 forq=1to50:next:return
  4. 6 printmid$(" o[152]x",s*2,2);:return
  5. 7 pokex,230:forq=1to400:next:pokex,0:return
  6. 8 poke198,0:wait198,1:geta$:aa=asc(a$):return
  7. 9 p=.:forf=.to3:d=d(f):r=.:k=j:forq=1to8:k=k+d:ifl(k)=sthenr=r+1:next
  8. 20 k=j:forq=1to8:k=k-d:ifl(k)=sthenr=r+1:next
  9. 25 p=p+p(r):ifr>2thenw=d
  10. 29 nextf:return
  11. 30 print"":return
  12. 40 gosub30:print"";:forq=1toj-t*int(j/t):print"";:next
  13. 42 forq=1tojstept:print"[145][145]";:next:return
  14. 50 gosub30:forao=1to2:print"                                        ":next:return
  15. 55 gosub50:gosub30:return
  16. 80 restore:forq=1to4:readw(q):w(9-q)=w(q):next:data1,1.05,1.10,1.2:return
  17. 100 form=1to8:v(m)=-b:j=n(m):ifj>ethen130
  18. 105 gosub40:print"[159]?";
  19. 110 s=c:gosub9:a=p:s=h:gosub9:v(m)=(a+p*g)*w(m):j=j+t:ifj>ethen120
  20. 115 gosub9:ifp>bthenifa<bthenv(m)=.
  21. 120 print"[157][153]+";
  22. 130 next
  23. 180 p=v(1):q=1:form=2to8:ifv(m)>pthenp=v(m):q=m
  24. 190 next:m=q:gosub30:gosub7:print"i chose"m:j=n(m):s=c:gosub9
  25. 200 l(j)=c:n(m)=n(m)+t:gosub40:print"o";:v%=200:gosub10000
  26. 210 ifp>=bthengosub55:print"i win!":t0=t0+1:goto900
  27. 220 n=n+1:ifn>63then850
  28. 300 s=2:gosub30:print"[153]your move?   [157][157][157]";:goto410
  29. 340 ifp>=bthengosub30:print"you win":tx=tx+1:goto900
  30. 345 goto445
  31. 400 gosub30:print"[153]";:gosub6:print"'s move?   [157][157][157]";
  32. 410 poke198,0:wait198,1:geta$:m=val(a$):ifm<1orm>8then410
  33. 420 ifn(m)>ethen410
  34. 425 printm;:v%=100:gosub10000
  35. 430 j=n(m):l(j)=s:n(m)=n(m)+t:gosub40:gosub6:gosub9:gosub50
  36. 435 ify=0then340
  37. 440 ifp>=bthengosub30:print"";:gosub6:print" wins!";:goto460
  38. 445 n=n+1:ifn>63then850
  39. 450 ify=0then100
  40. 455 goto500
  41. 460 ifs=1thent0=t0+1:goto900
  42. 465 tx=tx+1:goto900
  43. 500 s=s+1:ifs>2thens=1
  44. 520 goto400
  45. 850 gosub50:gosub30:print"stalemate!":goto960
  46. 900 gosub4000:k=j:forz=1to8:ifl(j)=sthengosub40:print""mid$(" o[152]x",s*2,2);:j=j+w:next
  47. 910 j=k:forz=1to8:ifl(j)=sthengosub40:print""mid$(" o[152]x",s*2,2);:j=j-w:next
  48. 920 v%=10:forz=1to20:gosub10000:next
  49. 950 gosub30:print"ready? [y]          ";
  50. 960 geta$:ifa$<>"y"then960
  51. 970 goto1100
  52. 1000 dimd(3),l(99):t=10:c=1:h=2:e=88:gosub80
  53. 1070 forq=0to3:readp(q):next:data1,50,500,1e5:b=p(3):forq=4to8:p(q)=b:next
  54. 1080 forq=0to3:readd(q):next:data1,11,10,9
  55. 1090 poke36878,15:x=36876:poke36879,79
  56. 1100 gosub6000
  57. 1110 print"try to get four in a row before your
  58. 1120 [153]"opponent does.  your piece goes to the
  59. 1122 print"lowest position in the column you pick.
  60. 1140 n[178]0:[153]"want to play me? ycmd";
  61. 1141 [141]8:[139]a$[178]"y"[176]aa[178]13[167]a$[178]"y":y[178]0
  62. 1142 [153]a$
  63. 1143 [139]a$[178]"n"[167]y[178]1:[137]2000
  64. 1144 [139]a$[179][177]"y"[167]1141
  65. 1150 y[178]0:n[178]0:[153]"would you like to go first? ncmd";
  66. 1151 [141]8:[139]a$[178]"n"[176]aa[178]13[167]a$[178]"n"
  67. 1152 [153]a$:b$[178]a$
  68. 1153 [139]a$[179][177]"y"[167][139]a$[179][177]"n"[167]1151
  69. 1160 [141]80:[153]"how hard (1-4)? 4cmd";
  70. 1170 [141]8:[139]aa[178]13[167]a$[178]"4"
  71. 1175 m[178][197](a$):[139]m[179]1[176]m[177]4[167]1170
  72. 1176 [153]a$
  73. 1180 u[178]m:[153]a$:g[178][171]5[172](m[178]3)[171].8[172](m[178]4):[139]m[178]1[167][129]q[178]1[164]8:w(q)[178]1:[130]
  74. 2000 [153]"loadprint":[129]q[178]1[164]8:[153]"     +   +   +   +   +   +   +   +":[130]
  75. 2010 [153]"cont     -   -   -   -   -   -   -   -"
  76. 2015 [153]"     1   2   3   4   5   6   7   8"
  77. 2020 [129]q[178]11[164]e:l(q)[178].:[130]:[129]q[178]1[164]8:n(q)[178]q[170]t:[130]
  78. 2030 [141]4000:[139][194](657)[178]0[167][162]:
  79. 2998 [139]y[167]500
  80. 2999 [139]b$[178]"y"[167]300
  81. 3000 [137]100
  82. 4000 [153]""[163]10)"list   x:"tx[163]25)"o:"t0
  83. 4002 [139]y[178]0[167][153]"list"[163]21)[201]([196](u),1)"wait"
  84. 4004 [142]
  85. 6000 [153]"load":x[178]12
  86. 6100 [153][163]x)"for(NULL)                (NULL)"
  87. 6110 [153][163]x)" waitsys (NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL) for "
  88. 6120 [153][163]x)" waitclr g e t  f o u r for "
  89. 6130 [153][163]x)" waitsys usrusrusrusrusrusrusrusrusrusrusrusrusrusr for "
  90. 6140 [153][163]x)"for(NULL)                (NULL)"
  91. 6200 [153]"print#    copyright (c) 1982 bruce robinson"
  92. 6210 x[178]13:[153][163]x)"victory software":[153][163]x)"paoli, pa  19301"
  93. 6999 x[178]0:[142]
  94. 10000 vo[178]54296:[151]vo,15:a8[178]54272:[151]a8,40:[151]a8[170]1,40:[151]a8[170]5,15:[151]a8[170]6,240
  95. 10002 [151]a8[170]4,17:[129]em[178]1[164]v%:[130]:[151]a8[170]4,16:[151]vo,0:[142]
  96.