10 rem Black Jack 20 clear :wait 50:print "BLACKJACK" 30 dim N$(52),P$(10),S$(10),W$(10) 40 B=1 50 if inkey$ ="P" or inkey$ ="B" then input "Beeper ein(1)/aus(0):";B 60 if B<>0 and B<>1 then let B=1 70 for I=52 to 49 step -1:N$(I)="A"+chr$ (196+I):next I 80 for I=48 to 45 step -1:N$(I)="K"+chr$ (200+I):next I 90 for I=44 to 41 step -1:N$(I)="D"+chr$ (204+I):next I 100 pause "KARten MISCHEN..." 110 for I=40 to 37 step -1:N$(I)="V"+chr$ (208+I):next I 120 for J=33 to 36:N$(J)="10"+chr$ (212+J):next J 130 for J=29 to 32:N$(J)="9"+chr$ (216+J):next J 140 for J=25 to 28:N$(J)="8"+chr$ (220+J):next J 150 for J=21 to 24:N$(J)="7"+chr$ (224+J):next J 160 for J=17 to 20:N$(J)="6"+chr$ (228+J):next J 170 for J=13 to 16:N$(J)="5"+chr$ (232+J):next J 180 for J=9 to 12:N$(J)="4"+chr$ (236+J):next J 190 for J=5 to 8:N$(J)="3"+chr$ (240+J):next J 200 for J=1 to 4:N$(J)="2"+chr$ (244+J):next J 210 pause "Karten verteilen..." 220 random :R=rnd (52):P$(1)=N$(R):random :T=rnd (52):P$(2)=N$(T):if P$(1)=P$(2) then 220 230 random :R=rnd (52):S$(1)=N$(R):random :T=rnd (52):S$(2)=N$(T):if S$(1)=S$(2) then 230 240 if P$(1)=S$(1) then 230 250 if P$(2)=S$(2) then 230 260 if (P$(1)=S$(2)) or (P$(2)=S$(1)) then 230 270 if P$(1)=N$(0) or P$(2)=N$(0) or S$(1)=N$(0) or S$(2)=N$(0) then 220 280 C=2:V=2:gosub 290:goto 390 290 for T=1 to C 300 if left$ (P$(T),2)="10" then let W=W+10:goto 360 310 if left$ (P$(T),1)="A" then input "As = 1 oder 11 ?";A:W=W+A:goto 360 320 if left$ (P$(T),1)="K" then let W=W+10:goto 360 330 if left$ (P$(T),1)="D" then let W=W+10:goto 360 340 if left$ (P$(T),1)="V" then let W=W+10:goto 360 350 W$(T)=left$ (P$(T),1):Z=val (W$(T)):W=W+Z 360 next T 370 print "Karten: ";P$(1);" ";P$(2);" ";P$(3);" ";P$(4);" ";P$(5);" ";P$(6) 380 print "Wert Deiner Karten : ";W:return 390 gosub 400:goto 560 400 for F=1 to V 410 if left$ (S$(F),1)="A" then let G=G+11:goto 470 420 if left$ (S$(F),2)="10" then let G=G+10:goto 470 430 if left$ (S$(F),1)="K" then let G=G+10:goto 470 440 if left$ (S$(F),1)="D" then let G=G+10:goto 470 450 if left$ (S$(F),1)="V" then let G=G+10:goto 470 460 W$(F)=left$ (S$(F),1):Z=val (W$(F)):G=G+Z 470 next F 480 if G=W and W=21 then beep B*5:pause "UNENTSCHIEDEN!":pause "Wir haben beide 21 Punkte!":goto 1010 490 if G=21 then beep B*3:pause "Ich gewinne, Du Null!!!":CO=CO+1:goto 1040 500 if G>10 then 520 510 goto 550 520 for Q=1 to V 530 if left$ (S$(Q),1)="A" then let G=G-10 540 next Q 550 return 560 if W<21 then 600 570 if W=22 and left$ (P$(1),1)="A" and left$ (P$(2),1)="A" then beep B*5:pause "Idiot. Du verlierst.":goto 1040 580 if W>21 then beep B*5:pause "Black jack hat einen":pause "Fehler entdeckt.":pause "Neustart.":goto 10 590 beep B*3:pause "Schummler, Du gewinnst !":PL=PL+1:goto 1040 600 input "Ziehst Du eine Karte?";H$:if H$="J" or H$="JA" then gosub 630:goto 740 610 if (H$="STOP" or H$="STOPP") and NA>1 and NC>1 then 980 620 NA=NA+1:goto 750 630 D=C+1 640 M=0:R=rnd (52):P$(D)=N$(R):if R=0 or R>52 then 640 650 for N=1 to C 660 if P$(D)=P$(N) then let M=1 670 next N 680 if M=1 then 640 690 for BD=1 to V 700 if P$(D)=S$(BD) then let M=1 710 next BD 720 if M=1 then 640 730 return 740 W=0:C=C+1:gosub 290 750 if W>21 then beep B*1:pause "Du verlierst.":pause "Kartenwert > 21":CO=CO+1:goto 1040 760 if W=21 then beep B*3:pause "Du gewinnst...":pause "aber nicht mehr lange...":PL=PL+1:goto 1040 770 pause "Ich bin an der Reihe." 780 if G>16 and C<4 and NA>1 and NC>1 then 980 790 if G>16 then pause "Ich nehme keine Karte.":NC=NC+1:goto 940 800 if rnd (G)>7 and G>10 then pause "Ich nehme keine Karte.":NC=NC+1:goto 940 810 if G<16 and rnd (G)<7 then 840 820 if G<12 then 840 830 goto 780 840 pause "Ich ziehe eine Karte...":D=V+1 850 random :R=rnd (52):S$(D)=N$(R):M=0:if S$(D)=N$(0) then 850 860 for N=1 to V 870 if S$(D)=S$(N) then let M=1 880 next N 890 for BD=1 to C 900 if S$(D)=P$(BD) then let M=1 910 next BD 920 if M=1 then 850 930 G=0:V=V+1:gosub 400 940 if G=W and W=21 then beep B*5:pause "So was !!!":pause "Wir haben beide 21":pause "Punkte !":goto 1010 950 if G=21 then beep B*3:pause "Ich habe mit Links":pause "gewonnen !!!":CO=CO+1:goto 1040 960 if G>21 then beep B*1:pause "Tja, das war wohl ein":pause "Fehler !":PL=PL+1:goto 1040 970 pause "Du bist an der Reihe.":goto 600 980 pause "---Spiel unterbrochen---" 990 if W>G and W<22 then pause "Schummler, Du hast mit":pause W;"Punkten gewonnen !":PL=PL+1:goto 1040 1000 if G>W and G<22 then pause "Ha ha, ich habe mit":pause G;"Punkten gewonnen !":CO=CO+1:goto 1040 1010 pause "UNENTSCHIEDEN !":input "Bereit fuer Revanche?";R$ 1020 if R$="J" or R$="JA" then pause "Here we go !!!":PA=PA+1:goto 1110 1030 beep B*1:pause "Feigling !!! Du":pause "hast wohl Angst vor mir!":clear :end 1040 pause "Meine Karten waren :" 1050 print "Karten:";S$(1);" ";S$(2);" ";S$(3);" ";S$(4);" ";S$(5);" ";S$(6) 1060 pause "Wert meiner Karten: ";G 1070 if PL>CO then pause "Es steht ";PL;" zu ";CO:pause "fuer dich.":goto 1100 1080 if CO>PL then pause "Es steht ";CO;" zu ";PL:pause "fuer mich.":goto 1100 1090 pause "Es steht ";PL;" zu ";CO 1100 PA=PA+1:pause "Ein ";PA+1;" Spiel ? ":input "Enter/NEIN: ";F$:if F$="NEIN" or F$="N" then clear :end 1110 for X=1 to 10:S$(X)=" ":P$(X)=" ":W$(X)=" ":next X 1120 NA=0:NC=0:W=0:G=0:C=0:V=0:M=0 1130 goto 210