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