home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Brotikasten
/
BROTCD01.iso
/
c128
/
c137.d64
/
comp-u-tare
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1995-08-09
|
10KB
|
310 lines
5 POKE49152,0
10 RE$(0)=" ":RE$(1)="3 [214][197][210][211][201][207][206][211]" :RR=0:J=5:PP=0
15 VR$(0)=" ":VR$(1)="[214][197][210][211][201][207][206]"
20 SS$="A23456789TJQK":KN=0
25 LT$=""
30 WN$(0)=" YOU WIN "
35 WN$(1)="[144] HIT A KEY "
40 WN$(2)=" YOU WON BY CHEATING "
45 WN$(4)=" [144]STANDARD PLAY "
50 WN$(5)="[144]LAS VEGAS STYLE "
55 R$="[218][211][193][216]":D$=""
60 IFYY=0THENGOSUB1500:T=TI+180
65 IF T>TI THEN65
70 POKEV+21,0:PRINT"[147]"
75 DEFFNF(X)=X-INT(X)
80 DEFFNA(X)=INT(FNF(X/13)*13)
85 DIMA%(51),F%(6,6),D%(6,12),O(6,1),SH%(51)
90 O(1,0)=1:O(2,0)=2:O(3,0)=3:O(4,0)=4:O(5,0)=5:O(6,0)=6
95 GOSUB695:PRINT"[147]":A=RND(-TI):GOSUB1290:POKE53280,1
100 IF PEEK(49152)=255 THEN FORX=0TO51:A%(X)=PEEK(49153+X):NEXTX:GOTO110
105 GOSUB270
110 Z=0:FORX=1TO6:FORY=1TOX:F%(X,Y)=A%(Z):Z=Z+1:NEXTY:NEXTX:H$=" "
115 FORX=0TO6:D%(X,0)=A%(Z):Z=Z+1:NEXTX:FORX=28TO51:H$=H$+CHR$(A%(X)):NEXTX
120 FORX=0TO6:E%(X)=1:NEXTX
125 PRINT"[147]":POKE53272,21
130 REM SET UP CARDS FACE DOWN/ 7PILES
135 PRINT"[145] 1 2 3 4 5 6 7"
140 PRINT"":FORX=1TO6:FORY=XTO6:PRINTTAB(Y*5)"[207][169][223][208] [157][157][157]";
145 NEXTY:PRINT:NEXTX
150 FORX=0TO6:F%(X,0)=X:NEXTX:FORB=21TO27:C=A%(B):P1=0:P2=0:P3=0:P=B-21
155 GOSUB285:NEXTB:HP=0:CH=0:CD=24
160 IFCD=0GOTO175
165 HP=HP+3:IFHP-3=CDGOTO885
170 IFHP>CDGOTO265
175 OO=O(1,0)+O(2,0)+O(3,0)+O(4,0)+O(5,0)+O(6,0)+CD:IFOO<1ANDUU=0THEN1305
180 F=0:P=9:P2=0:C=ASC(MID$(H$,HP+1)):GOSUB285
185 REM KEYBOARD INPUT
190 GETI$
195 PRINTLEFT$(D$,23)LEFT$(LT$,27)"";
200 PRINTWN;:IFUU=1ANDWN>51THEN 1305
205 IFI$="" THEN 1460
210 IFI$="F"ORI$="[136]"ORI$="N"GOTO915
215 IFI$="H"ANDFNA(C)=1GOTO505
220 IFI$="[140]"THEN 1465
225 IFI$="[138]"GOTO525
230 IFI$="H"GOTO545
235 IFI$>"0"ANDI$<"8"GOTO565
240 IFI$="[137]"THEN1690
245 IFI$="A"ANDFGOTO930
250 IFI$="C"GOTO1135
255 IFI$="[139]"THENRR=1:GOTO1345
260 GOTO190
265 HP=CD:GOTO175
270 A$=" ":FORX=1TO52:A$=A$+CHR$(X):NEXTX:A$=A$+" ":C=52
275 FORX=0TO51:Z=INT(RND(1)*C+1):A%(X)=ASC(MID$(A$,Z+1)):POKE49153+X,A%(X)
280 A$=LEFT$(A$,Z)+RIGHT$(A$,C-Z+1):C=C-1:NEXT:RETURN
285 CT=INT((C-1)/13):CN=C-CT*13:IFP>6GOTO335
290 D=1+F%(P,0)-P3+5*P1:L=P*5:IFP2GOTO330
295 IFP1THENPRINTLEFT$(D$,D)TAB(L+3)"^^^^"
300 ZZ$="":IF CT>1 THEN ZZ$="[144]"
305 PRINTLEFT$(D$,D+1)TAB(L+3);ZZ$;"[169][163][163][223]"
310 GOSUB470:PRINTTAB(L)ZZ$;"[165] ";
315 PRINTA$;ZZ$;"[167][157][157][157]":PRINTTAB(L+3);ZZ$"[165]"MID$(R$,CT+1,1)" [167]"
320 PRINTTAB(L+3);ZZ$"[223][146][164][164][169][146]":PRINTTAB(L+3)" "
325 RETURN
330 PRINTLEFT$(D$,D-P1+1);:FORX=1TO5:PRINTTAB(L+3)" ":NEXTX:RETURN
335 IFP=7GOTO425
340 PRINTLEFT$(D$,18)TAB(14)"[144]MOVE:"
345 PRINTLEFT$(D$,20)TAB(12)"[145][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]
350 [153][163]12)"(null) # OF CARDS ="CD"CMD "[163]31)"(null)"
355 [153][163]12)"(null) STOP# INTO HAND ="HP"CMD "[163]31)"(null)"
360 [139]GT[179][177]3[167][153][163]12)"(null) CHANGES ="CH" (null)"
365 [139]GT[178]3[167][153][163]12)"(null) NO CHANGES **** (null)"
370 [153][163]12)"(null) POINT CARDS = (null)"
375 [153][163]12)"/TANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANTANEXP
380 IFLEN(H$)=1THENHP=0:CD=0:RETURN
385 REM SET UP CARDS WHEN FLIPED
390 PRINTLEFT$(D$,25)"[144]VERSION #";PEEK(49210);"[145][145]"
395 GOSUB470:PRINTLEFT$(D$,20)TAB(33);ZZ$;"[169][163][163][223]"
400 IFP2GOTO420
405 PRINTTAB(33);ZZ$"[165] "A$"[167]"
410 PRINTTAB(33);ZZ$"[165]"MID$(R$,CT+1,1)" [167]":PRINTTAB(33);ZZ$"[223][146][164][164][169]"
415 RETURN
420 PRINT"[145]";:FORX=1TO4:PRINTTAB(33)" ":NEXTX:RETURN
425 L=1-6*(FNF(CT/2)<>0)
430 D=15-5*(CT>1)
435 IFP2=0GOTO465
440 REM SET CARDS GOING TO ACE STACKS
445 GOSUB470:PRINTLEFT$(D$,D)TAB(L);ZZ$;"[169][163][163][223]":WN=WN+1: REM ACES HERE ******
450 PRINTTAB(L);ZZ$;"[165] "A$"[167]"
455 PRINTTAB(L);ZZ$;"[165]"MID$(R$,CT+1,1)" [167]":PRINTTAB(L);ZZ$;"[223][146][164][164][169]"
460 RETURN
465 PRINTLEFT$(D$,D);:FORX=1TO4:PRINTTAB(L)" ":NEXTX:RETURN
470 IFCN=1GOTO485
475 IFCN>9GOTO490
480 A$=STR$(CN):A$=RIGHT$(A$,1):GOTO495
485 A$="A":GOTO495
490 B$="TJQK":A$=MID$(B$,CN-9,1)
495 ZZ$="":IFCT>1THEN ZZ$="[144]"
500 RETURN
505 PRINTLEFT$(D$,19)"[145]"TAB(19)"[144] H-A"
510 P=9:P2=1:GOSUB285:P=7:C=ASC(MID$(H$,HP+1)):GOSUB285:Q%(CT)=Q%(CT)+1
515 CD=CD-1:B$=LEFT$(H$,HP)+MID$(H$,HP+2):H$=B$:B$="":HP=HP-1:IFHP=0GOTO160
520 GOTO170
525 IFGT<>1GOTO175
530 IFCH=3GOTO190
535 B$=" "+MID$(H$,3)+MID$(H$,2,1):CH=CH+1:HP=0:H$=B$:B$=""
540 P=8:P2=1:GOSUB285:GOTO160
545 IFCD=0GOTO190
550 F=8
555 PRINTLEFT$(D$,19)"[144][145]"TAB(19)" ":PRINT"[145]"TAB(20)I$"[144]-":IFF<>8GOTO1010
560 GOTO190
565 IFFTHEN585
570 F=VAL(I$):IFE%(F-1)=0THEN1135
575 K=D%(F-1,E%(F-1)-1):IFFNA(K)<>1GOTO555
580 PRINTLEFT$(D$,19)TAB(20)"[145][144]"I$"-A":GOTO930
585 G=VAL(I$)
590 IFF=8THEN1105
595 GOTO1040
600 IFE%(G-1)=0GOTO1125
605 T1=D%(F-1,E%(F-1)-1):T2=D%(G-1,E%(G-1)-1):T3=T1+.1:T4=T2+.1
610 T3=FNA(T3):T4=FNA(T4):T3=T3-13*(T3=0)
615 T4=T4-13*(T4=0):IFT3+1<>T4GOTO1135
620 IFT1>26ANDT2>26ORT1<27ANDT2<27GOTO1135
625 PRINTLEFT$(D$,19)"[145][144]"TAB(22)I$:IFF=8GOTO900
630 S=D%(F-1,E%(F-1)-1)
635 E%(F-1)=E%(F-1)-1:P=F-1:P2=1:P1=-(E%(P)>0)
640 P3=0:GOSUB285:P=G-1:P1=1:GOSUB285
645 C=S:P2=0:P=G-1:P1=-1*(E%(G-1)>0):GOSUB285
650 E%(G-1)=E%(G-1)+1:D%(G-1,E%(G-1)-1)=S
655 IFE%(F-1)>1GOTO685
660 IFE%(F-1)=1GOTO175
665 IFF%(F-1,0)=0GOTO175
670 P=F-1:C=F%(F-1,F%(F-1,0)):P3=1:P2=0:P1=0:GOSUB285:F%(F-1,0)=F%(F-1,0)-1
675 O(F-1,0)=F%(F-1,0)
680 E%(F-1)=1:D%(F-1,0)=C:GOTO175
685 P=F-1:C=D%(F-1,E%(F-1)-1):P3=0:P2=0:P1=1:GOSUB285
690 E%(F-1)=E%(F-1)-1:GOTO175
695 IF PEEK(49152)=255 THENRETURN
700 POKE53280,6:POKE53281,1:POKE646,0
705 POKE53272,23
710 POKE53272,23:PRINT"[147]"
715 PRINT"[195][207][205][208]-[213]-[212][193][201][210][197]"
720 FORX=1TO40:PRINT"[178]";:NEXTX
725 FORX=1TO40:PRINT"[177]";:NEXTX:PRINT"[144]";
730 PRINT"[214]ERSION[160]# 1:[144][146] [217]OU ARE ALLOWED TO GO
735 [153]"THROUGH THE CARDS IN YOUR HAND ATN(null)CLOSE(null)ATN(null)(null)
740 PRINT"TIMES AS YOU WISH BEFORE MAKING A
745 [153]"LENLEFT$ATN(null)CHR$VAL. 3 LENLEFT$ATN(null)CHR$VAL(null) ARE ALLOWED.
750 PRINT"[214]ERSION # 2:[144][146] [193] [195][200][193][206][199][197] IS AUTOMATICALLY
755 [153]"TAKEN AT THE END OF EACH RUN THROUGH
760 PRINT"THE CARDS IN YOUR HAND. [212]HESE CARDS CAN
765 [153]"ONLY BE GONE THROUGH 3 TIMES ((null)WO
770 PRINT"[195][200][193][206][199][197][211]).
775 [153]"(null)ERSION # 3:STOPWAIT (null)HIS ONE CONSIDERS LENLEFT$ATN(null)CHR$VAL(null)
780 PRINT"AS CHEATING, NONE ARE ALLOWED, BUT YOU
785 [153]"MAY GO THROUGH THE CARDS IN YOUR HAND
790 PRINT"AS MANY TIMES AS YOU WISH.":PRINT
795 UU=0:PRINT"";
800 FORX=1TO40:PRINT"[178]";:NEXT
805 FORX=1TO40:PRINT"[177]";:NEXT:PRINT"[144]";
810 PRINTLEFT$(LT$,13)"[215][200][201][195][200] ?"
815 KB=TI+20
820 GETI$:GT=VAL(I$):IFGT<1ORGT>3THEN830
825 GOTO855
830 IFKB-10<TIAND WW=0THENWW=1:GOTO815
835 IFKB<TIAND WW=1THENWW=0:GOTO815
840 POKE646,9
845 PRINT" ";RE$(WW)
850 PRINTLEFT$(D$,24)LEFT$(LT$,19);"";VR$(WW):GOTO820
855 POKE49210,GT:IFYY=1THENRETURN
860 PRINT"[147][144][201]NSTRUCTIONS ?"
865 GETI$:IFI$=""THEN865
870 IF I$="Y"THEN 1155
875 IF I$="N"THEN RETURN
880 GOTO865
885 IFGT<>2THENHP=0:GOTO160
890 IFCH=2GOTO175
895 HP=0:GOTO535
900 P=9:P2=1:GOSUB285:P=G-1:P3=0:P2=1:P1=-1*(E%(P)<>0):GOSUB285
905 P2=0:GOSUB285
910 E%(P)=E%(P)+1:D%(P,E%(P)-1)=C:GOTO515
915 IFGT=2ANDCH=2ANDHP=CDGOTO175
920 IFGT=2ANDHP=CDGOTO530
925 P=9:P2=1:GOSUB285:GOTO160
930 PRINTLEFT$(D$,19)TAB(22)"[144][145]A":P=F-1:C=ASC(MID$(H$,HP+1,1))
935 IFF<8THENC=D%(P,E%(P)-1)
940 CT=INT((C-1)/13):CN=C-CT*13
945 IFCN-1<>Q%(CT)GOTO1135
950 IFF=8GOTO980
955 P=F-1:P1=-(E%(P)>1):P2=1:P3=0:GOSUB285:P=7:C=D%(F-1,E%(F-1)-1)
960 P2=0:GOSUB285:P2=1
965 GOSUB285:Q%(CT)=Q%(CT)+1:E%(F-1)=E%(F-1)-1:IFE%(F-1)=1THEN175
970 IFE%(F-1)=0GOTO995
975 P=F-1:C=D%(P,E%(P)-1):P3=0:P2=0:P1=1:GOSUB285:GOTO175
980 P=9:P2=1:GOSUB285:P=7:P2=0:C=ASC(MID$(H$,HP+1)):GOSUB285
985 P2=1:GOSUB285
990 Q%(CT)=Q%(CT)+1:GOTO515
995 P=F-1:IFF