home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 19 / 019.d81 / one (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  16KB  |  486 lines

  1. 2 ifa=.thena=1:ba=36173:pokeba+1079,4:poke54296,0:poke56,141:clr:a=1:load"shuffle",8,1
  2. 4 ifa=1thena=2:qw=rnd(-ti):ch=.:m1=.:load"clear it!",8,1
  3. 6 ifa=2thena=3:gosub866:load"entertainer",8,1
  4. 8 l=49152:ba=36173:a=.
  5. 10 poke53281,0:poke53280,.:poke49,peek(47):poke50,peek(48):dimsc$(112),cc$(36),mc$(36),a$(15)
  6. 12 rem
  7. 14 r$="[167]   [165][146][157][157][157][157][157]":b$=" [164][164][164] [146][157][157][157][157][157]"+r$+r$+r$+" [163][163][163] [157][157][157][157][157][145][145][145][145][145]
  8. 16 l$[178]"":z$[178]"cmdcmdcmdcmdcmdcmdcmdcmdcmdcmdcmd"
  9. 17 cn[178].:cl$[178]"wait":[129]hg[178]1[164]50:cl$[178]cl$[170]"    ":[130]:[141]1000
  10. 18 [139][194](1079[170]ba)[178]4[167][151]54296,15:[158]ba[170]155:[151]ba[170]1079,0       
  11. 19 [137]30
  12. 20 [143]"tantantantantantantantantantantantantantantantantantantantantantantantantantantantantan
  13. 22 rem"265: shuffling #1
  14. 24 [143]"tantantantantantantantantantantantantantantantantantantantantantantantantantantantantan
  15. 26 rem
  16. 28 goto1000
  17. 30 cn=.:print"[147]dealing...":fork=1to7
  18. 32 cn=cn+1:cc$(k)=sc$(cn):cn=cn+1:mc$(k)=sc$(cn):sc$(cn)="":next
  19. 34 print"[147]";:nm=7:nc=7:cn=cn+1:cp$=sc$(cn):sc$(cn)="":gosub96:goto624
  20. 36 rem"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]
  21. 38 [143] 300:    print hand
  22. 40 dc[178].:[143]"tantantantantantantantantantantantantantantantantantantantantantantantantantantantantantan
  23. 42 poke198,0:goto60:ifnm>36thennm=35:mc$(36)=""
  24. 44 ifnm<36thenic=1
  25. 46 ifnm<19thenic=2
  26. 48 ifnm<13thenic=3
  27. 50 ifnm<10thenic=4
  28. 52 ifnm<8thenic=5
  29. 54 ifnm<7thenic=6
  30. 56 ifcn=106thengosub26
  31. 58 print"";:forh=1tonm:printmc$(h)"[145][145][145][157][157][157][157]";left$(l$,ic);:nexth
  32. 60 print"[155][146]                                  "
  33. 62 print"[155][146]computer has"nc"cards left.       "
  34. 64 ifnc>1thenpokeba+1079,0
  35. 66 print"[146] use left cursor key to move arrow (^)."
  36. 68 ifnc=1thenpokeba+1079,3
  37. 70 print"press return to play card or to  execute";
  38. 72 print"     function arrow is pointing to."
  39. 74 ifdc=.thenprint"                                    draw";:goto78
  40. 76 print"                                    pass";
  41. 78 print"^[157]";:x=1:cl=1
  42. 80 geta$:ifa$=""then80
  43. 82 ifa$=""andcl<nmandx+ic<37thenprint" [157]";left$(l$,ic);:x=x+ic:print"^[157]";:cl=cl+1:goto80
  44. 84 ifa$=""andx<37thenprint" [157]";:forz=xto36:print"";:next:print"^[157]";:x=37:cl=cl+1:goto80
  45. 86 ifa$=""andx=>37thenx=1:cl=1:print" [157]^[157]";:goto80
  46. 88 ifa$=chr$(13)andcl<=nmthenprint" [157]";:tc$=mc$(cl):gosub118:ifco<>0then132
  47. 90 ifa$=chr$(13)andcl>nmthenprint" [157]";:goto708
  48. 92 rem
  49. 94 print"^[157]";:goto80
  50. 96 rem"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]
  51. 98 [143]"print deck of cards
  52. 100 print"";cp$"[145][145][145][151]"+b$+"[151]![146]";
  53. 102 ifleft$(cp$,1)<>"[151]"thenxc$=left$(cp$,1):goto106
  54. 104 xc$=wc$
  55. 106 print""left$(xc$,1)"    [157][187][146]";
  56. 108 ifleft$(cp$,1)<>"[151]"thenwc$=left$(cp$,1)
  57. 110 return
  58. 112 rem"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]
  59. 114 [143]"check play
  60. 116 rem"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]
  61. 118 [139][200](tc$,1)[178][200](cp$,1)[176][202](tc$,71,1)[178][202](cp$,71,1)[167]co[178]1:[142]
  62. 120 [139][200](tc$,1)[178]"poke"[167]co[178]1:[142]
  63. 122 [139][200](tc$,1)[178]wc$[167]co[178]1:[142]
  64. 124 co[178].:[142]
  65. 126 [143]"tantantantantantantantantantantantantantantantantantantantantantantantantantantantantan
  66. 128 rem"play routine for player
  67. 130 [143]"tantantantantantantantantantantantantantantantantantantantantantantantantantantantantan
  68. 132 cp$=tc$:gosub96:q=.:mc$(cl)=""
  69. 134 forj=1tonm:q=q+1:ifmc$(j)=""thenq=q-1:next:nm=nm-1:goto138
  70. 136 mc$(q)=mc$(j):next:nm=nm-1
  71. 138 gosub848:ifnm=.thengosub888:poke198,0:goto144
  72. 140 goto168
  73. 142 pokeba+1079,0:goto168
  74. 144 print"[147]";:gosub812:gosub96:print"you won!!!!":input"play again";a$
  75. 146 ifleft$(a$,1)="y"then8
  76. 148 goto780
  77. 150 q=.:gosub768
  78. 152 forj=1tonc:ifcc$(j)=""thennext:nc=q:goto156
  79. 154 q=q+1:cc$(q)=cc$(j):next:nc=q
  80. 156 ifnc=.thengosub902:poke198,0:goto162
  81. 158 ifnc=1thenpokeba+1079,3:return
  82. 160 pokeba+1079,0:return
  83. 162 print"[147]";:gosub826:gosub96:print"i won!!!!":input"play again";a$
  84. 164 ifleft$(a$,1)="y"then8
  85. 166 goto780
  86. 168 rem"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]
  87. 170 [143]"check card
  88. 172 rem"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]
  89. 174 [139][197]([202](cp$,71,1))[177]0[176][202](cp$,71,1)[178]"0"[167]210
  90. 176 [139][200](cp$,1)[178]"poke"[167]184
  91. 178 [139][202](cp$,71,1)[178]"s"[167]dc[178].:[137]42
  92. 180 [139][202](cp$,71,1)[178]"r"[167]dc[178].:[137]42
  93. 182 [129]kk[178]1[164]2:nc[178]nc[170]1:cn[178]cn[170]1:cc$(nc)[178]sc$(cn):sc$(cn)[178]"":[130]:dc[178].:[137]42
  94. 184 [143]"tantantantantantantantantantantantantantantantantantantantantantantantantantantantantan
  95. 186 rem"wild card from player
  96. 188 [143]"tantantantantantantantantantantantantantantantantantantantantantantantantantantantantan
  97. 190 df=.:ifmid$(cp$,71,1)<>"!"then194
  98. 192 df=1:forkk=1to4:nc=nc+1:cn=cn+1:cc$(nc)=sc$(cn):sc$(cn)="":next
  99. 194 input"[146]red/blue/yellow/green";v$:print""
  100. 196 ifleft$(v$,1)="r"thenwc$="":goto204
  101. 198 ifleft$(v$,1)="b"thenwc$="":goto204
  102. 200 ifleft$(v$,1)="y"thenwc$="[158]":goto204
  103. 202 ifleft$(v$,1)="g"thenwc$="":goto204
  104. 204 print"[146]                              ";:gosub96
  105. 206 dc=.:ifdf=1thendf=.:goto42
  106. 208 df=.:goto210
  107. 210 rem"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]
  108. 212 [143]"computers turn
  109. 214 rem"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]
  110. 216 [143]"c(1)=red
  111. 218 rem"c(2)=grn
  112. 220 [143]"c(3)=blu
  113. 222 gosub616:dc=.:rem"c(4)=yel                                wd  =wild
  114. 224 ok[178].:ga[178].:xv[178].:[129]i[178]1[164]4:c(i)[178].:[130]:wd[178].:wf[178].
  115. 226 [129]y[178]1[164]nc:fg$[178][200](cc$(y),1):[139]fg$[178]""[167]c(1)[178]c(1)[170]1:[130]:[137]246
  116. 228 [139]fg$[178]""[167]c(2)[178]c(2)[170]1:[130]:[137]246
  117. 230 [139]fg$[178]""[167]c(3)[178]c(3)[170]1:[130]:[137]246
  118. 232 [139]fg$[178]"sys"[167]c(4)[178]c(4)[170]1:[130]:[137]246
  119. 234 [139][202](cc$(y),71,1)[178]"!"[167]wf[178]wf[170]1:[130]:[137]246
  120. 236 [139][202](cc$(y),71,1)[178]"w"[167]wd[178]wd[170]1:[130]:[137]246
  121. 238 [144]
  122. 240 [143]"tantantantantantantantantantantantantantantantantantantantantantantantantantantantantantan
  123. 242 rem"pick frequency
  124. 244 [143]"tantantantantantantantantantantantantantantantantantantantantantantantantantantantantantan
  125. 246 fork=1to4:d(k)=c(k):next:n=4:m=n
  126. 248 m=int(m/2):ifm=.then262
  127. 250 j=1:k=n-m
  128. 252 i=j
  129. 254 l=i+m:cm=cm+1:ifd(i)<d(l)then258
  130. 256 t=d(i):d(i)=d(l):d(l)=t:sw=sw+1:i=i-m:ifi>1then254
  131. 258 j=j+1:ifj>kthen248
  132. 260 goto252
  133. 262 fork1=1to4:ifc(k1)<>d(4)thennext
  134. 264 c1=k1:k1=5:next:fork1=1to4:ifc(k1)<>d(3)thennext
  135. 266 c2=k1:k1=5:next:fork1=1to4:ifc(k1)<>d(2)thennext
  136. 268 c3=k1:k1=5:next:fork1=1to4:ifc(k1)<>d(1)thennext
  137. 270 c4=k1:k1=5:next
  138. 272 ifnm<3andwf>0then484
  139. 274 ifnc<3andwf>0then484
  140. 276 ifnm<2andwd>0then500
  141. 278 onc1goto280,340,382,422
  142. 280 rem"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]
  143. 282 [143]"can play red?
  144. 284 rem"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]
  145. 286 rc$[178]""
  146. 288 [129]y[178]1[164]nc:[139][202](cc$(y),71,1)[