home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 60 / 060.d81 / bytes (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  6KB  |  211 lines

  1. 1 remsave"r.minnie.v4.1",8
  2. 2 goto 400
  3. 3 rem ========raspberry========
  4. 4 :
  5. 5 r=54272:poker+6,240:poker+1,4:poker+5,0:poker+4,33:poker+24,15
  6. 6 forz=1024to512step-8:poker+1,z/256:poker,zand255:next:poker+4,0:return
  7. 7 :
  8. 8 rem==========fanfare=========
  9. 9 :
  10. 10 t=87:n$="251331421502421502"
  11. 11 s=54272:pokes+6,96:pokes+24,15
  12. 12 fori=1to18step3
  13. 13 pokes+1,val(mid$(n$,i,2)):pokes+4,33
  14. 14 forj=1tot*val(mid$(n$,i+2,1)):next
  15. 15 pokes+4,0:next:return
  16. 16 :
  17. 17 rem ======creates screen save
  18. 18 :
  19. 20 for i=828to972:reada:x=x+a:pokei,a:next
  20. 22 data169,000,133,251,133,253,141
  21. 23 data055,003,141,057,003,141,059
  22. 24 data003,162,000,160,000,177,251
  23. 25 data145,253,200,192,000,208,247
  24. 26 data230,252,230,254,232,224,004
  25. 27 data208,238,173,056,003,133,252
  26. 28 data173,058,003,133,254,238,059
  27. 29 data003,174,059,003,224,002,208
  28. 30 data214,096,169,004,133,252,169
  29. 31 data192,133,254,169,216,141,056
  30. 32 data003,169,196,141,058,003,076
  31. 33 data060,003,169,192,133,252,169
  32. 34 data004,133,254,169,196,141,056
  33. 35 data003,169,216,141,058,003,076
  34. 36 data060,003,169,004,133,252,169
  35. 37 data200,133,254,169,216,141,056
  36. 38 data003,169,204,141,058,003,076
  37. 39 data060,003,169,200,133,252,169
  38. 40 data004,133,254,169,204,141,056
  39. 41 data003,169,216,141,058,003,076
  40. 42 data060,003,000,000,000
  41. 43 dimch$(11):fori=1to9:ch$(i)=str$(i):next:ch$(10)="h":ch$(11)="q":return
  42. 47 :
  43. 48 rem==========again?==============
  44. 49 :
  45. 50 x=15:y=10:w$=" again? [157][157][157][157][157][157][157][157] (y/n)  ":gosub66:goto62
  46. 54 :
  47. 55 rem==========any key-get a$=========
  48. 56 :
  49. 58 x=13:y=24:w$=" any key [145]":gosub66
  50. 59 :
  51. 60 rem============get a$===========
  52. 61 :
  53. 62 geta$:ifa$=""then 62:return
  54. 63 :
  55. 64 rem=======print at=============
  56. 65 :
  57. 66 poke783,peek(783)and254:poke782,x:poke781,y:sys65520:printw$
  58. 68 poke783,peek(783)or1:return
  59. 106 :
  60. 107 rem===dim,define,once only stuff===
  61. 109 :
  62. 111 nc=52:dims(nc),d$(14),va$(13),b(9,13):z9=0
  63. 112 fori=0to3:reads$(i):readco$(i):next
  64. 113 fori=0to12:readva$(i):next
  65. 115 data"[216]","[144]","[218]","","[211]","","[193]","[144]",2,3,4,5,6,7,8,9,10,j,q,k,a
  66. 116 data2,5,10,5,18,5,26,5,2,14,10,14,18,14,26,14,34,7
  67. 117 for i=1 to 9:readx(i):ready(i):next
  68. 118 pu$=" pick up? ":dr$="   drop?    "
  69. 119 c$="[158][176][192][192][192][192][174][157][157][157][157][157][157][221]    [221][157][157][157][157][157][157][221]    [221][157][157][157][157][157][157][221]    [221]"
  70. 120 c$=c$+     "[157][157][157][157][157][157][221]    [221][157][157][157][157][157][157][221]    [221][157][157][157][157][157][157][173][192][192][192][192][189]"+"[145][145][145][145][145][157][157][157][157][157]"
  71. 121 b$=c$+"[158][166][166][166][166][157][157][157][157][166][166][166][166][157][157][157][157][166][166][166][166][157][157][157][157][166][166][166][166][157][157][157][157][166][166][166][166]"
  72. 122 bl$="      [157][157][157][157][157][157]      [157][157][157][157][157][157]      [157][157][157][157][157][157]      [157][157][157][157][157][157]      [157][157][157][157][157][157]"
  73. 123 bl$=bl$+"      [157][157][157][157][157][157]      [157][157][157][157][157][157]      "
  74. 125 rem========shuffle & deal======
  75. 126 :
  76. 127 forj=0tonc-1:s(j)=j:next
  77. 128 forj=0tonc-2:j%=j+(rnd(0)*(nc-j))
  78. 129 temp=s(j):s(j)=s(j%):s(j%)=temp:next:fori=1to9:c(i)=0:next
  79. 130 k=0:fori=5to8:forj=1to10:b(i,j)=s(k):k=k+1:c(i)=c(i)+1:next:next
  80. 131 for j=1to 12:b(9,j)=s(k):k=k+1:c(9)=c(9)+1:next:return
  81. 137 :
  82. 138 rem ======suits,values,graphics===
  83. 139 :
  84. 140 su=(int(b(i,c(i))/13)):t=13*int(b(i,c(i))/13)
  85. 142 de$=co$(su)+va$(b(i,c(i))-t)
  86. 144 df$=de$+s$(su):df$=c$+df$:x=x(i):y=y(i):w$=df$
  87. 146 if c(i)=0thenw$=bl$
  88. 147 ifi=9andpd=2thenw$=b$
  89. 148 goto 66
  90. 207 :
  91. 208 rem======get pick/drop======
  92. 209 :
  93. 210 geta$:if a$=""then210
  94. 212 for i=1to11:ifa$=right$(ch$(i),1)then 216
  95. 214 next
  96. 215 goto210
  97. 216 return
  98. 219 :
  99. 220 rem=====help screen=====
  100. 222 print"[147]":printtab(4)"[164][175][185] mindless minnie's mania [185][175][164]":print
  101. 223 print
  102. 224 print"  the object of the game is to remove   all 12 cards from pile 9."
  103. 226 print
  104. 228 print"  cards may be played on any empty spaceor on stacks 1-8 if the ";
  105. 232 print"top card has thesame value.  on 5-9 a card can also be  played";
  106. 236 print" if the top card has a value one  larger.";
  107. 237 print"  cards may be played from one   pile to";
  108. 238 print" another.":print
  109. 240 print"  aces are high only and suits are not  important.";
  110. 242 print"  when the cards are dealt    there are ten";
  111. 244 print" cards in piles 5-9. ";
  112. 245 print" no   pile can contain more than 13 cards."
  113. 247 print
  114. 248 print"  the program does not decide when you "
  115. 250 print"lose, so type q if you want to give up."
  116. 252 print"also type q to return to loadstar."
  117. 300 sys886:z9=1:return
  118. 397 :
  119. 398 rem========start of program=======
  120. 399 :
  121. 400 z9=0:poke53280,5:poke53281,5:       printchr$(8);chr$(142):print"[147]"
  122. 401 r$="             ":printr$"[176][192][192][192][192][192][192][192][192][192][192][192][192][174]"
  123. 402 printr$"[221]            [221]"
  124. 403 printr$"[221]  mindless  [221]"
  125. 404 printr$"[221]            [221]"
  126. 405 printr$"[221]  minnie's  [221]"
  127. 406 printr$"[221]            [221]"
  128. 407 printr$"[221]   mania    [221]"
  129. 408 printr$"[221]            [221]"
  130. 409 printr$"[173][192][192][192][192][192][192][192][192][192][192][192][192][189]"
  131. 410 gosub20:rem==load screen switch====
  132. 420 print"[147]"
  133. 421 printr$"[176][192][192][192][192][192][192][192][192][192][192][192][192][174]"
  134. 422 printr$"[221]            [221]"
  135. 423 printr$"[221]   a game   [221]"
  136. 424 printr$"[221]            [221]"
  137. 425 printr$"[221]     of     [221]"
  138. 426 printr$"[221]            [221]"
  139. 427 printr$"[221]  solitaire [221]"
  140. 428 printr$"[221]            [221]"
  141. 429 printr$"[173][192][192][192][192][192][192][192][192][192][192][192][192][189]"
  142. 430 gosub111: rem first deal
  143. 440 print"[147]"
  144. 441 printr$"[176][192][192][192][192][192][192][192][192][192][192][192][192][174]"
  145. 442 printr$"[221]            [221]"
  146. 443 printr$"[221]    by      [221]"
  147. 444 printr$"[221]            [221]"
  148. 445 printr$"[221]  maurice   [221]"
  149. 446 printr$"[221]            [221]"
  150. 447 printr$"[221]   jones    [221]"
  151. 448 printr$"[221]            [221]"
  152. 449 printr$"[173][192][192][192][192][192][192][192][192][192][192][192][192][189]"
  153. 450 :
  154. 455 gosub 127: rem== only for delay==
  155. 457 :
  156. 458 rem =====playing board=============
  157. 459 :
  158. 460 print"[147]        mindless minnie's mania "
  159. 461 print"    1       2       3       4       9"
  160. 462 print"    5       6       7       8 "
  161. 464 x=34:y=7:w$=b$:gosub66:fori=5to8:       gosub140:next
  162. 466 x=32:y=22:w$=" h-help [157][157][157][157][157][157][157][157] q-quit [145]":gosub66
  163. 467 :
  164. 468 rem========pickup card=============
  165. 469 :
  166. 470 x=12:y=23:w$=pu$:gosub66:gosub210
  167. 472 sg=0:pd=1:onigoto474,474,474,474,474,474,474,474,700,990,993
  168. 474 if c(i)=0then gosub 5:gosub210:goto472
  169. 476 m=b(i,c(i)):c(i)=c(i)-1:tm=i:gosub140
  170. 477 rem========drop card=============
  171. 478 x=12:y=23:w$=dr$:gosub66:gosub210
  172. 480 pd=2:onigoto482,482,482,482,482,482,482,482,482,990,993
  173. 482 ifc(i)=13ori=9 then660
  174. 500 np=0:t5=b(i,c(i))-13*int(b(i,c(i))/13):t6=m-13*int(m/13)
  175. 510 ift5=t6then600
  176. 520 ifi>4andt5=t6+1 then 600
  177. 530 ifc(i)=0then600
  178. 540 goto660
  179. 600 iftm=9then 630
  180. 610 c(i)=c(i)+1:b(i,c(i))=m:gosub140:ifc(9)=0then800
  181. 620 goto470
  182. 630 tm=i:i=9:gosub140:i=tm:goto610
  183. 660 gosub5:i=tm:c(i)=c(i)+1:gosub140:goto470
  184. 700 m=b(i,c(i)):gosub140:c(i)=c(i)-1:tm=i:  sg=1:goto478
  185. 797 :
  186. 798 rem========win screen============
  187. 799 :
  188. 800 w$=bl$:x=34:y=7:gosub66:gosub10:w$="   you win!!!  "
  189. 802 x=3:y=1:fori=1to22:gosub66:x=x+1:y=y+1:next:goto993
  190. 967 :
  191. 980 x=5:y=23:w$="are you sure? (y/n)":gosub66:gosub62
  192. 982 if a$="y"then60000
  193. 983 ifa$<>"n"then980
  194. 984 x=5:y=23:w$="                     ":gosub66:onpdgoto470,478
  195. 987 :
  196. 988 rem========display help screen====
  197. 989 :
  198. 990 sys928:if z9=0thengosub222
  199. 991 :
  200. 992 sys907:gosub58:sys949:gosub210:onpdgoto472,480
  201. 993 gosub50:rem== play again?==========
  202. 995 ifa$="n"then60000
  203. 997 if a$="y"thenprint"[147]          dealing .  .  . "
  204. 998 gosub128:goto460
  205. 999 gosub 62:goto995
  206. 60000 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
  207. 60010 if er<>63 then print"[147]":end
  208. 60020 a$="hello connect":q$=chr$(34)
  209. 60030 poke646,peek(53281):print"[1