Black Jack

Developer(s): G. Dewey
Date: 1982
Type: Program
Platform(s): TS 1000

Appears on

Assembled by Tim Ward from many sources. Contains programs 10001 – 10050.

Gallery

Black Jack

Source Code

   0 REM %G%.%D%E%W%E%Y %B%L%A%C%K%J%A%C%K               %1%5% %J%U%N%E % % % %1%9%8%2% % 
   1 SAVE "1000%1"
   2 LET BET=100
   2 GOSUB 8000
   3 LET B$="%$%$%$%$%$%$%$%$%$%$%$%$%$%$%$%$%$%$%$%$%$%$%$%$%$%$%$%$%$%$%$%$"
   4 PRINT B$
   5 FOR I=1 TO 10
   6 PRINT "%$% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %$"
   7 PRINT "%$% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %$"
   8 NEXT I
   9 PRINT B$
  10 RAND 
  11 LET V=1
  12 DIM D(17)
  20 PRINT AT 5,13;"%B%L%A%C%K%J%A%C%K"
  22 LET Z$="1 2 3 4 5 6 7 8 9 A B C D 1\' 2\' 3\' 4\' 5\' 6\' 7\' 8\' 9\' A\' B\' C\' D\' 1\ '2\ '3\ '4\ '5\ '6\ '7\ '8\ '9\ 'A\ 'B\ 'C\ 'D\ '1\''2\''3\''4\''5\''6\''7\''8\''9\''A\''B\''C\''D\''1\. 2\. 3\. 4\. 5\. 6\. 7\. 8\. 9\. A\. B\. C\. D\. "
  23 DIM E$(17,2)
  24 LET F=52
  25 LET Y=0
  26 LET T=0
  27 LET G=0
  28 LET U=0
  29 LET H=0
  30 PRINT AT 8,13;"%D%=%D%E%A%L";AT 10,13;"%H%=%H%I%T% %M%E";AT 12,13;"%S%=%S%T%I%C%K"
  40 FOR P=1 TO 25
  45 NEXT P
  50 PRINT AT 5,13;"% % % % % % % % % "
  52 PRINT AT 8,13;"% % % % % % ";AT 10,13;"% % % % % % % % ";AT 12,13;"% % % % % % % "
  60 FOR Z=3 TO 13 STEP 10
  65 FOR H=3 TO 23 STEP 5
  67 PRINT AT Z,H;"\: \.. \..\ :"
  68 PRINT AT Z+1,H;"\: \'.\''\.'\ :"
  69 PRINT AT Z+2,H;"\: \: \:'\.:\ :"
  70 PRINT AT Z+3,H;"\: \:'\.:\ :\ :"
  71 PRINT AT Z+4,H;"\: \.'\..\'.\ :"
  72 PRINT AT Z+5,H;"\: \'' \''\ :"
  73 NEXT H
  75 NEXT Z
  90 FOR I=1 TO 2
  91 IF I=1 THEN LET H=3
  92 IF I=1 OR I=2 THEN LET Z=12
  93 IF I=2 THEN GOSUB 9000
  94 IF BET<=0 THEN GOTO 9100
  95 IF I=2 THEN LET H=8
  96 LET D(I)=((INT (RND*F))*2)+1
  97 FOR N=1 TO 6
  98 PRINT AT Z+N,H;A$(((CODE Z$(D(I)))-28)+((CODE Z$(D(I)+1)*13)),N)
  99 NEXT N
 100 LET BJ=0
 102 LET E$(I)=Z$(D(I) TO D(I)+1)
 103 LET F=F-1
 104 LET Z$=Z$( TO D(I)-1)+Z$(D(I)+2 TO )
 110 NEXT I
 120 FOR J=1 TO 2
 130 IF E$(J,1)>="2" AND E$(J,1)<="9" THEN LET T=T+VAL E$(J,1)
 150 IF E$(J,1)>"9" THEN LET T=T+10
 155 IF E$(J,1)="B" THEN LET BJ=1
 160 IF E$(J,1)="1" THEN LET G=G+1
 170 IF E$(J,1)="1" THEN LET T=T+11
 180 NEXT J
 190 IF T=22 THEN LET T=T-10
 200 IF T=22 THEN LET G=G-1
 215 IF G=1 AND BJ=1 THEN GOTO 5000
 217 IF T=21 THEN GOTO 6000
 220 LET V=V+1
 230 PRINT AT 10,4;"%<%H%>%I%T% %M%E%,%<%S%>%T%I%C%K%?"
 235 PRINT AT 11,4;"%T%O%T%A%L% ";T;"% "
 240 IF INKEY$="S" THEN GOTO 500
 250 IF INKEY$="H" THEN GOTO 270
 260 GOTO 240
 270 PRINT AT 10,4;"% % % % % % % % % % % % % % % % % % "
 310 LET I=I+1
 320 LET D(I)=((INT (RND*F))*2)+1
 325 LET H=H+5
 330 FOR N=1 TO 6
 335 PRINT AT Z+N,H;A$(((CODE Z$(D(I)))-28)+((CODE Z$(D(I)+1)*13)),N)
 340 NEXT N
 350 LET E$(I)=Z$(D(I))
 360 LET Z$=Z$( TO D(I)-1)+Z$(D(I)+2 TO )
 370 IF E$(I,1)>="2" AND E$(I,1)<="9" THEN LET T=T+VAL E$(I,1)
 380 IF E$(I,1)>="A" THEN LET T=T+10
 390 IF E$(I,1)="1" THEN LET G=G+1
 395 LET F=F-1
 400 IF E$(I,1)="1" THEN LET T=T+11
 410 IF T>21 AND G=0 THEN GOTO 6500
 430 IF T>21 AND G>0 THEN LET G=G-1
 434 LET V=V+1
 435 IF T>21 THEN LET T=T-10
 436 IF V=5 THEN GOTO 4000
 437 IF T=21 THEN GOTO 6000
 440 GOTO 230
 500 PRINT AT 12,26;"%S%T%U%C%K"
 502 PRINT AT 13,28;T
 504 PRINT AT 10,4;"%C%O%M%P%U%T%E%R% % % % % % % % % % "
 506 PRINT AT 11,10;"% % "
 510 DIM E$(5)
 515 LET G=0
 520 FOR I=1 TO 2
 530 IF I=1 THEN LET H=3
 540 IF I=1 OR I=2 THEN LET Z=2
 550 IF I=2 THEN LET H=8
 560 LET D(I)=((INT (RND*F))*2)+1
 570 FOR N=1 TO 6
 580 PRINT AT Z+N,H;A$(((CODE Z$(D(I)))-28)+((CODE Z$(D(I)+1)*13)),N)
 585 LET F=F-1
 590 NEXT N
 595 LET BJ=0
 600 LET E$(I)=Z$(D(I) TO D(I)+1)
 610 LET F=F-1
 620 LET Z$=Z$( TO D(I)-1)+Z$(D(I)+2 TO )
 630 NEXT I
 640 FOR J=1 TO 2
 650 IF E$(J)>="2" AND E$(J)<="9" THEN LET U=U+VAL E$(J)
 660 IF E$(J)>"9" THEN LET U=U+10
 665 IF E$(J)="B" THEN LET BJ=1
 670 IF E$(J)="1" THEN LET G=G+1
 680 IF E$(J)="1" THEN LET U=U+11
 690 NEXT J
 700 IF U=22 THEN LET U=U-10
 710 IF U=22 THEN LET G=G-1
 712 IF G=1 AND BJ=1 THEN GOTO 3000
 715 IF U=21 THEN GOTO 2000
 716 PRINT AT 11,10;U
 720 LET C5=2
 730 IF C5=5 AND U<=21 THEN GOTO 1500
 740 IF U=21 THEN GOTO 2000
 742 IF U>21 AND G<=0 THEN GOTO 3500
 745 IF U>=T AND V<5 THEN GOTO 7000
 750 IF V=5 AND C5=5 THEN GOTO 2000
 775 IF C5=5 AND U>21 THEN GOTO 3500
 780 LET H=H+5
 790 LET C5=C5+1
 800 LET D(I)=((INT (RND*F))*2)+1
 805 PRINT AT 11,10;U
 810 FOR N=1 TO 6
 820 PRINT AT Z+N,H;A$(((CODE Z$(D(I)))-28)+((CODE Z$(D(I)+1)*13)),N)
 830 NEXT N
 840 LET E$(I)=Z$(D(I))
 850 LET Z$=Z$( TO D(I)-1)+Z$(D(I)+2 TO )
 860 IF E$(I)>="2" AND E$(I)<="9" THEN LET U=U+VAL E$(I)
 870 IF E$(I)>="A" THEN LET U=U+10
 880 IF E$(I)="1" THEN LET G=G+1
 890 LET F=F-1
 900 IF E$(I)="1" THEN LET U=U+11
 910 LET B=U
 930 IF U>21 AND G>0 THEN LET U=U-10
 935 IF U>21 AND G>0 THEN LET G=G-1
 936 LET I=I+1
 940 GOTO 730
1500 PRINT AT 10,4;"%O%O%H% % %A% %F%I%V%E% %C%A%R%D%E%R"
1510 PRINT AT 11,4;"%I% %W%I%N% %D%O%U%B%L%E"
1520 LET BET=BET-(GOBET*2)
1550 GOTO 9800
2000 PRINT AT 10,4;"%T%W%E%N%T%Y%-%O%N%E"
2010 PRINT AT 11,4;"%I% %W%I%N% % % % % % "
2020 LET BET=BET-GOBET
2030 GOTO 1530
3000 PRINT AT 10,4;"%O%H% %D%E%A%R% %B%L%A%C%K%J%A%C%K"
3010 PRINT AT 11,4;"%I% %W%I%N% %T%R%E%B%L%E"
3020 LET BET=BET-(GOBET*3)
3030 GOTO 9800
3500 PRINT AT 10,4;"%C%U%R%S%E%S%.%.%."
3510 PRINT AT 11,4;"%I% %B%U%S%T%,% %Y%O%U% %W%I%N"
3520 LET BET=BET+GOBET
3530 GOTO 9800
4000 PRINT AT 10,4;"%C%U%R%S%E%S%.%.%."
4010 PRINT AT 11,4;"%F%I%V%E% %C%A%R%D%E%R% %W%I%N%S% %D%O%U%B%L%E"
4020 LET BET=BET+(GOBET*2)
4030 GOTO 9800
5000 PRINT AT 10,4;"%C%U%R%S%E%S%.%.%."
5010 PRINT AT 11,4;"%B%L%A%C%K%J%A%C%K% %W%I%N%S% %T%R%E%B%L%E"
5020 LET BET=BET+(GOBET*3)
5030 GOTO 9800
6000 PRINT AT 10,4;"%C%U%R%S%E%S%.%.%."
6010 PRINT AT 11,4;"%T%W%E%N%T%Y%-%O%N%E%,% %Y%O%U% %W%I%N"
6020 GOTO 3520
6500 PRINT AT 10,4;"%Y%O%U% %B%U%S%T"
6510 PRINT AT 11,4;"%I% %W%I%N% % % % "
6520 GOTO 2020
7000 PRINT AT 10,4;"%I% %B%E%A%T% %Y%O%U";U;"%-";T;"% % "
7010 GOTO 2010
7990 STOP 
8000 DIM A$(52,6,5)
8002 FAST 
8005 FOR I=1 TO 4
8010 IF I=1 THEN LET F$="*"
8020 IF I=2 THEN LET F$="+"
8030 IF I=3 THEN LET F$="V"
8040 IF I=4 THEN LET F$="?"
8050 LET G$="\:  "+F$+" \ :"
8060 LET H$="\: "+F$+" "+F$+"\ :"
8070 LET I$="\: "+F$+F$+F$+"\ :"
8080 LET J$="\:    \ :"
8100 LET A$(13*(I-1)+1,1)="\: A  \ :"
8110 LET A$(13*(I-1)+1,2)=J$
8120 LET A$(13*(I-1)+1,3)=J$
8130 LET A$(13*(I-1)+1,4)=G$
8140 LET A$(13*(I-1)+1,5)=J$
8150 LET A$(13*(I-1)+1,6)="\:   A\ :"
8160 LET A$(13*(I-1)+2,1)="\: 2  \ :"
8170 LET A$(13*(I-1)+2,2)=G$
8180 LET A$(13*(I-1)+2,3)=J$
8190 LET A$(13*(I-1)+2,4)=J$
8200 LET A$(13*(I-1)+2,5)=G$
8210 LET A$(13*(I-1)+2,6)="\:   2\ :"
8220 LET A$(13*(I-1)+3,1)="\: 3  \ :"
8230 LET A$(13*(I-1)+3,2)=G$
8240 LET A$(13*(I-1)+3,3)=G$
8250 LET A$(13*(I-1)+3,4)=J$
8260 LET A$(13*(I-1)+3,5)=G$
8270 LET A$(13*(I-1)+3,6)="\:   3\ :"
8280 LET A$(13*(I-1)+4,1)="\: 4  \ :"
8290 LET A$(13*(I-1)+4,2)=H$
8300 LET A$(13*(I-1)+4,3)=J$
8310 LET A$(13*(I-1)+4,4)=J$
8320 LET A$(13*(I-1)+4,5)=H$
8330 LET A$(13*(I-1)+4,6)="\:   4\ :"
8340 LET A$(13*(I-1)+5,1)="\: 5  \ :"
8350 LET A$(13*(I-1)+5,2)=H$
8360 LET A$(13*(I-1)+5,3)=G$
8370 LET A$(13*(I-1)+5,4)=J$
8380 LET A$(13*(I-1)+5,5)=H$
8390 LET A$(13*(I-1)+5,6)="\:   5\ :"
8400 LET A$(13*(I-1)+6,1)="\: 6  \ :"
8410 LET A$(13*(I-1)+6,2)=H$
8420 LET A$(13*(I-1)+6,3)=H$
8430 LET A$(13*(I-1)+6,4)=J$
8440 LET A$(13*(I-1)+6,5)=H$
8450 LET A$(13*(I-1)+6,6)="\:   6\ :"
8460 LET A$(13*(I-1)+7,1)="\: 7  \ :"
8470 LET A$(13*(I-1)+7,2)=H$
8480 LET A$(13*(I-1)+7,3)=H$
8490 LET A$(13*(I-1)+7,4)=G$
8500 LET A$(13*(I-1)+7,5)=H$
8510 LET A$(13*(I-1)+7,6)="\:   7\ :"
8520 LET A$(13*(I-1)+8,1)="\: 8  \ :"
8530 LET A$(13*(I-1)+8,2)=H$
8540 LET A$(13*(I-1)+8,3)=H$
8550 LET A$(13*(I-1)+8,4)=H$
8560 LET A$(13*(I-1)+8,5)=H$
8570 LET A$(13*(I-1)+8,6)="\:   8\ :"
8580 LET A$(13*(I-1)+9,1)="\: 9  \ :"
8590 LET A$(13*(I-1)+9,2)=H$
8600 LET A$(13*(I-1)+9,3)=H$
8610 LET A$(13*(I-1)+9,4)=I$
8620 LET A$(13*(I-1)+9,5)=H$
8630 LET A$(13*(I-1)+9,6)="\:   9\ :"
8640 LET A$(13*(I-1)+10,1)="\: 10 \ :"
8650 LET A$(13*(I-1)+10,2)=H$
8660 LET A$(13*(I-1)+10,3)=I$
8670 LET A$(13*(I-1)+10,4)=I$
8680 LET A$(13*(I-1)+10,5)=H$
8690 LET A$(13*(I-1)+10,6)="\:  10\ :"
8700 LET A$(13*(I-1)+11,1)="\: J  \ :"
8710 LET A$(13*(I-1)+11,2)="\: "+F$+"\''\;;\ :"
8720 LET A$(13*(I-1)+11,3)="\: \..\..\!!\ :"
8730 LET A$(13*(I-1)+11,4)="\: \;;\''\''\ :"
8740 LET A$(13*(I-1)+11,5)="\: \!!\.."+F$+"\ :"
8750 LET A$(13*(I-1)+11,6)="\:   J\ :"
8760 LET A$(13*(I-1)+12,1)="\: Q  \ :"
8770 LET A$(13*(I-1)+12,2)="\: "+F$+"\~~\:'\ :"
8780 LET A$(13*(I-1)+12,3)="\: % \..% \ :"
8790 LET A$(13*(I-1)+12,4)="\: % \''% \ :"
8800 LET A$(13*(I-1)+12,5)="\: \.:\,,"+F$+"\ :"
8810 LET A$(13*(I-1)+12,6)="\:   Q\ :"
8815 LET A$(13*(I-1)+13,2)=""
8820 LET A$(13*(I-1)+13,1)="\: K  \ :"
8830 LET A$(13*(I-1)+13,2)="\: "+F$+"\;;\''\ :"
8840 LET A$(13*(I-1)+13,3)="\: % \!! \ :"
8850 LET A$(13*(I-1)+13,4)="\:  \;;% \ :"
8860 LET A$(13*(I-1)+13,5)="\: \..\!!"+F$+"\ :"
8870 LET A$(13*(I-1)+13,6)="\:   K\ :"
8880 NEXT I
8887 SLOW 
8888 RETURN 
9000 PRINT AT 11,4;"%B%E%T%?"
9010 PRINT AT 11,24;"%$";
9020 LET L$=STR$ BET
9030 FOR Y=1 TO LEN L$
9040 LET L$(Y)=CHR$ ((CODE L$(Y))+128)
9050 NEXT Y
9060 PRINT L$
9070 INPUT GOBET
9080 IF GOBET<1 OR GOBET>BET THEN GOTO 9070
9085 PRINT AT 11,4;"% % % % "
9088 PRINT AT 20,1;"%B%E%T% $";GOBET
9090 RETURN 
9100 CLS 
9110 PRINT "YOU HAVE NO MONEY LEFT,","MY PORTER THREW YOU OUT.","YOU ARE IN THE STREET STARVING.","%P%L%A%Y% %A%G%A%I%N%?"
9120 INPUT D$
9125 CLS 
9130 IF D$="Y" THEN RUN 2
9140 STOP 
9800 FOR M=1 TO 25
9810 NEXT M
9820 FOR I=2 TO 20
9830 PRINT AT I,1;"% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % "
9840 NEXT I
9850 GOTO 10
Scroll to Top