Game of Draw Poker between you and the computer.
Appears on
Gallery
Source Code
10 REM DUMB COMPUTER POKER 11 REM 15 REM by Lloyd C. Bowen Jr 2213 Peachtree Amarillo, Texas 79109 20 LET A=0: LET B=0: LET C=0: LET D=0: LET E=0: LET G=0: LET H=0: LET I=0: LET J=0: LET L=0: LET N=0: LET O=0: LET P=0: LET Q=1: LET R=4: LET S=9: LET T=1: LET U=0: LET V=0: LET W=0: LET X=0: LET Y=0: LET Z=0 30 PAPER 7: INK 9: BORDER 1 40 CLS : REM GRAPHICS 50 FOR F=0 TO 7 51 READ K 52 POKE USR "R"+F,K 53 NEXT F 54 DATA 24,60,60,90,255,255,90,24 60 FOR F=0 TO 7 61 READ K 62 POKE USR "U"+F,K 63 NEXT F 64 DATA 24,60,126,255,255,255,90,24 70 FOR F=0 TO 7 71 READ K 72 POKE USR "O"+F,K 73 NEXT F 74 DATA 102,255,255,255,255,126,60,24 80 FOR F=0 TO 7 81 READ K 82 POKE USR "S"+F,K 83 NEXT F 84 DATA 24,60,126,255,255,126,60,24 90 FOR F=0 TO 7 91 READ K 92 POKE USR "A"+F,K 93 NEXT F 94 DATA 0,0,63,32,32,36,33,36 100 FOR F=0 TO 7 101 READ K 102 POKE USR "B"+F,K 103 NEXT F 104 DATA 0,0,255,0,0,68,17,68 110 FOR F=0 TO 7 111 READ K 112 POKE USR "C"+F,K 113 NEXT F 114 DATA 0,0,252,4,4,68,4,68 120 FOR F=0 TO 7 121 READ K 122 POKE USR "P"+F,K 123 NEXT F 124 DATA 0,76,82,82,82,82,76,0 130 FOR F=0 TO 7 131 READ K 132 POKE USR "D"+F,K 133 NEXT F 134 DATA 33,36,33,36,33,36,33,36 140 FOR F=0 TO 7 141 READ K 142 POKE USR "E"+F,K 143 NEXT F 144 DATA 17,68,17,68,17,68,17,68 150 FOR F=0 TO 7 151 READ K 152 POKE USR "F"+F,K 153 NEXT F 154 DATA 4,68,4,68,4,68,4,68 160 FOR F=0 TO 7 161 READ K 162 POKE USR "G"+F,K 163 NEXT F 164 DATA 33,36,33,32,32,63,0,0 170 FOR F=0 TO 7 171 READ K 172 POKE USR "H"+F,K 173 NEXT F 174 DATA 17,68,17,0,0,255,0,0 180 FOR F=0 TO 7 181 READ K 182 POKE USR "I"+F,K 183 NEXT F 184 DATA 4,68,4,4,4,252,0,0 190 LET A$="2\r3\r4\r5\r6\r7\r8\r9\r:\r;\r<\r=\r>\r2\u3\u4\u5\u6\u7\u8\u9\u:\u;\u<\u=\u>\u2\o3\o4\o5\o6\o7\o8\o9\o:\o;\o<\o=\o>\o2\s3\s4\s5\s6\s7\s8\s9\s:\s;\s<\s=\s>\s" 200 LET F$=" " 210 PRINT AT 6,6;"\r "; INK 2;"\s \o "; INK 9;"\u \r "; INK 2;"\s \o "; INK 9;"\u \r "; INK 2;"\s" 220 PRINT AT 7,6;" " 230 PRINT AT 8,6; INK 2;"\s "; INK 1;" D U M B "; INK 2;" \o" 240 PRINT AT 9,6;" " 250 PRINT INK 2;AT 10,6;"\o"; INK 3;" C O M P U T E R "; INK 9;"\u" 260 PRINT AT 11,6;" " 270 PRINT INK 9;AT 12,6;"\u"; INK 5;" P O K E R "; INK 9;" \r" 280 PRINT AT 13,6;" " 290 PRINT AT 14,6;"\r "; INK 2;"\s \o "; INK 9;"\u \r "; INK 2;"\s \o "; INK 9;"\u \r "; INK 2;"\s" 295 GO SUB 4040: PRINT AT 21,4;"PRESS ANY KEY TO CONTINUE" 300 PAUSE 0: REM ADDRESS 310 CLS : PRINT AT 2,14;"BY" 320 PRINT AT 4,7;"LLOYD C. BOWEN Jr" 330 PRINT AT 6,7;"2213 PEACHTREE ST" 340 PRINT AT 8,5;"AMARILLO, TEXAS 79109" 350 PRINT AT 10,3;"DO YOU WISH TO CHANGE ANY COLORS ?(Y OR N)" 360 PRINT AT 13,2;"THE DEFAULTS ARE:" 370 PRINT AT 15,2; INK 1;"BORDER BLUE" 380 PRINT AT 17,2; INK 4;"PAPER(BACKGROUND) GREEN" 390 PRINT AT 19,2;"INK(FOREGROUND) BEST CONTRAST" 400 REM CHANGE COLORS 410 IF INKEY$<>"" THEN GO TO 410 420 IF INKEY$="" THEN GO TO 420 430 LET X$=INKEY$ 440 IF X$="Y" OR X$="y" THEN GO TO 500 450 LET Q=1 460 LET R=4 470 LET S=9 480 LET T=1 490 PRINT AT 10,0;F$+F$+F$+F$+F$+F$+F$+F$+F$+F$: GO TO 0740 500 CLS : PRINT AT 3,2;"THE COLORS AVAILABLE ARE:" 510 PRINT AT 5,2; INK 0;"BLACK=0" 520 PRINT AT 6,2; INK 1;"BLUE=1" 530 PRINT AT 7,2; INK 2;"RED=2" 540 PRINT AT 8,2; INK 3;"MAGENTA=3" 550 PRINT AT 9,2; INK 4;"GREEN=4" 560 PRINT AT 10,2; INK 5;"CYAN=5" 570 PRINT AT 11,2; INK 6;"YELLOW=6" 580 PRINT AT 12,2;"WHITE=7" 590 PRINT AT 13,2;"BEST CONTRAST=9(FOR INK ONLY)" 600 PRINT AT 17,2;"WHAT COLOR CARD BACKS ?";AT 18,2;"0,1,2,3,4,5,6 OR 9" 610 INPUT Q 620 IF Q<>0 AND Q<>2 AND Q<>3 AND Q<>4 AND Q<>5 AND Q<>6 AND Q<>9 THEN LET Q=1 630 PRINT AT 17,0;F$+F$+F$: PRINT AT 17,2;"WHAT COLOR PAPER(BACKGROUND) ?";AT 18,2;"0,1,2,3,4,5 OR 6" 640 INPUT R 650 IF R<>0 AND R<>1 AND R<>2 AND R<>3 AND R<>5 AND R<>6 THEN LET R=4 660 PRINT AT 17,0;F$+F$+F$: PRINT AT 17,2;"WHAT COLOR INK(FOREGROUND) ?";AT 18,2;"0,1,2,3,4,5,6,7 OR 9";AT 19,2;"CAN'T=PAPER" 670 INPUT S 680 IF S<>0 AND S<>1 AND S<>2 AND S<>3 AND S<>4 AND S<>5 AND S<>6 AND S<>7 AND S=R THEN LET S=9 690 PRINT AT 17,0;F$+F$+F$: PRINT AT 17,2;"WHAT COLOR BORDER ?";AT 18,2;"0,1,2,3,4,5,6 OR 7";AT 19,2;"CAN'T=INK" 700 INPUT T 710 IF T<>0 AND T<>2 AND T<>3 AND T<>4 AND T<>5 AND T<>6 AND T<>7 THEN LET T=1 720 IF T=S THEN LET S=9 730 CLS 740 REM NEED HELP? 750 PRINT AT 17,3;"DO YOU NEED HELP? (Y or N)" 760 IF INKEY$<>"" THEN GO TO 0760 770 IF INKEY$="" THEN GO TO 0770 780 LET L$=INKEY$ 790 IF L$<>"Y" OR L$<>"y" THEN PRINT PAPER 7;AT 17,0;F$ 800 IF L$="y" OR L$="Y" THEN GO SUB 7150 810 PRINT AT 12,1;"WHAT WOULD YOU LIKE TO PUT UP";AT 14,1;"THE GAME IS TABLE STAKES";AT 16,1;"THE MINIMUM IS $500";AT 18,1;"THE MAXIMUM IS $5000";AT 20,1;"ENTER YOUR STAKE" 820 INPUT M 830 IF M>5000 THEN LET M=5000 840 IF M<500 THEN LET M=500 850 REM ORIGINAL CONDITIONS 860 LET PT=0 870 LET CM=M 880 DIM C$(2,10) 890 DIM P$(2,10) 900 CLS 910 GO SUB 0930 920 GO TO 1120 930 REM shuffle cards 940 PAPER R: INK S: BORDER T 950 PRINT AT 21,0;F$;AT 21,10; FLASH 1;"PLEASE WAIT" 960 RANDOMIZE 970 LET D$="" 980 LET J=INT (RND*52)*2+1 990 LET G$=A$(J TO )+A$( TO J-1) 1000 FOR F=1 TO 22 1010 LET J=INT (RND*(LEN G$/2))*2+1 1020 LET D$=D$+G$(J TO J+1) 1030 LET G$=G$( TO J-1)+G$(J+2 TO ) 1040 NEXT F 1050 PRINT AT 21,0; BRIGHT 1;" READY: Please Press "; FLASH 1;" ENTER " 1051 INPUT J$ 1052 LET J$="" 1060 CLS 1070 LET O=13 1080 GO SUB 3860 1090 LET O=1 1100 GO SUB 3860 1110 RETURN 1120 REM DEALING 1130 FOR F=1 TO 9 STEP 2 1140 LET C$(1,F TO F+1)=D$( TO 2) 1150 LET P$(1,F TO F+1)=D$(3 TO 4) 1160 LET D$=D$(5 TO ) 1170 NEXT F 1180 LET E$=P$(1) 1190 GO SUB 1730 1200 LET P$(1)=E$ 1210 GO SUB 1850 1220 LET P$(2)=E$ 1230 LET O=13 1240 GO SUB 3910 1250 LET C=13 1260 GO SUB 3950 1270 REM NUMBER THE PLAYER CARDS 1280 PRINT AT 20,3;"1";AT 20,9;"2";AT 20,15;"3";AT 20,21;"4";AT 20,27;"5" 1290 REM PLAYER DISCARDS 1300 PRINT AT 8,0;F$+F$+F$+F$+F$;AT 8,1;"DISCARD WHICH CARD(S)? PRESS 1 for #1, 2 for #2 etc. then PRESS SPACE BAR if fewer than four cards are discarded. PRESS P to STAND PAT" 1310 FOR F=1 TO 4 1320 IF INKEY$<>"" THEN GO TO 1320 1330 IF INKEY$="" THEN GO TO 1330 1335 IF INKEY$<>"1" AND INKEY$<>"2" AND INKEY$<>"3" AND INKEY$<>"4" AND INKEY$<>"5" AND INKEY$<>"p" AND INKEY$<>"P" AND INKEY$<>" " THEN GO TO 1320 1340 LET N$=INKEY$ 1350 IF N$=" " THEN GO TO 1420 1360 IF N$="p" OR N$="P" THEN GO TO 1425 1370 PRINT AT 20,VAL N$*6-3;"X" 1380 LET D=VAL N$*2-1 1390 LET P$(1,D TO D+1)=D$( TO 2) 1400 LET D$=D$(3 TO ) 1410 NEXT F 1420 PRINT AT 20,0;F$+F$;AT 21,12; BRIGHT 1; FLASH 1;"DEALING" 1425 PRINT AT 8,0;F$+F$+F$+F$+F$ 1430 LET E$=P$(1) 1440 GO SUB 1730 1450 LET P$(1)=E$ 1460 GO SUB 1850 1470 LET P$(2)=E$ 1480 LET C=13 1490 GO SUB 3950 1500 PRINT AT 8,0;F$ 1510 PRINT AT 20,0;F$;AT 20,9;"YOUR ANTE IS $5" 1520 IF PT=0 THEN LET CM=CM-5 1530 IF PT=0 THEN LET M=M-5 1540 IF PT=0 THEN LET PT=10 1550 GO SUB 2630 1560 LET E$=P$(1) 1570 GO SUB 5000 1580 LET PV=V 1590 LET E$=C$(1) 1600 GO SUB 1730 1610 GO SUB 5000 1620 GO SUB 6500 1630 PRINT AT 8,0;F$;AT 8,9;"DEALER TAKES ";D 1640 LET C$(1)=E$ 1650 GO SUB 1730 1660 LET C$(1)=E$ 1670 GO SUB 1850 1680 LET C$(2)=E$ 1690 LET E$=C$(1) 1700 GO SUB 5000 1710 LET CV=V 1720 GO TO 1940 1730 REM Sort HIGH TO LOW 1740 LET E=1 1750 FOR F=1 TO 7 STEP 2 1760 IF CODE E$(F)<CODE E$(F+2) THEN GO SUB 1800 1770 NEXT F 1780 IF E=0 THEN GO TO 1730 1790 RETURN 1800 LET B$=E$(F TO F+1) 1810 LET E$(F TO F+1)=E$(F+2 TO F+3) 1820 LET E$(F+2 TO F+3)=B$ 1830 LET E=0 1840 RETURN 1850 REM RENAME FACE CARDS 1860 FOR F=1 TO 9 STEP 2 1870 IF E$(F)=":" THEN LET E$(F)="\p" 1880 IF E$(F)=";" THEN LET E$(F)="J" 1890 IF E$(F)="<" THEN LET E$(F)="Q" 1900 IF E$(F)="=" THEN LET E$(F)="K" 1910 IF E$(F)=">" THEN LET E$(F)="A" 1920 NEXT F 1930 RETURN 1940 REM BETTING STARTS 1950 PRINT AT 20,0;F$+F$;AT 21,9;"IT'S YOUR BET!" 1970 INPUT B 1980 LET B=INT B 1990 IF B=0 THEN GO TO 2400 2000 IF B>M OR B>25 THEN PRINT AT 20,0;F$+F$ 2010 PRINT AT 20,5;("IT TAKES CASH TO BET!!!" AND B>M)+(" THE LIMIT is $25" AND B>25) 2020 IF B>M OR B>25 THEN GO TO 1970 2025 IF B>CM THEN GO TO 2050 2030 LET M=M-B 2040 LET PT=PT+B 2050 GO SUB 2630 2060 GO SUB 2660 2070 LET O=1 2080 GO SUB 3910 2090 LET E$=C$(2) 2100 LET C=1 2110 GO SUB 3950 2120 LET A=CV 2130 GO SUB 3740 2140 PRINT AT 8,0;F$;AT 8,L;" I HAVE ";M$;O$;Q$;R$;S$;T$;U$;V$;W$ 2150 LET A=PV 2160 GO SUB 3740 2170 PRINT AT 20,0;F$+F$;AT 20,L;"YOU HAVE ";M$;O$;Q$;R$;S$;T$;U$;V$;W$ 2180 IF CV=PV THEN GO SUB 2200 2190 GO TO 2280 2200 REM DECIDE TIES 2210 LET PV=CODE P$(1) 2220 LET CV=CODE C$(1) 2230 IF PV<>CV THEN RETURN 2240 IF CV=0 THEN RETURN 2250 LET P$(1)=P$(1)(3 TO ) 2260 LET C$(1)=C$(1)(3 TO ) 2270 GO TO 2200 2280 REM DECIDE WINNER 2290 PAUSE 90 2300 PRINT AT 9,0;F$;AT 9,3;("I GUESS YOU WIN THIS TIME" AND PV>CV)+(" HA! HA! I WIN AGAIN!" AND CV>PV)+(" ALL TIED UP" AND PV=CV) 2310 REM STAKES RIGHT? 2320 IF CV>PV THEN LET CM=CM+PT 2330 IF PV>CV THEN LET M=M+PT 2340 IF PV=CV THEN GO TO 2360 2350 LET PT=0 2360 GO SUB 2630 2370 IF CM<6 THEN GO TO 2500 2380 IF M<6 THEN GO TO 2530 2390 GO TO 910 2400 PRINT AT 20,0;F$+F$;AT 20,11;"YELLOW???";AT 8,0;F$ 2410 LET CM=CM+PT 2420 GO TO 2350 2430 LET PT=PT-B 2440 LET M=M+B 2450 PRINT AT 8,0;F$;AT 8,6;"I FOLD, LOUSY HAND!" 2460 PAUSE 60 2470 LET M=M+PT 2480 GO TO 2350 2500 PAPER 7: CLS 2510 PRINT AT 10,2;"I'M TAPPED OUT, MAYBE LATER?" 2520 GO TO 2550 2530 PAPER 7: CLS 2540 PRINT AT 8,2;"IF YOU'VE GOT NO MORE MONEY";AT 10,5;"I'VE GOT NO MORE TIME";AT 12,8; INK 2;"GET OUT YOU BUM" 2542 FOR F=1 TO 6 2543 SOUND 6,15;7,7;8,16;9,16;10,16;12,16;13,0 2544 PAUSE 60 2545 NEXT F 2546 SOUND 6,0;7,63;8,0;9,0;10,0;12,0 2547 GO TO 2560 2550 GO SUB 4040 2560 CLS 2570 PRINT AT 12,3;"Do you want another game?";AT 14,12;"(Y or N)" 2580 IF INKEY$<>"" THEN GO TO 2580 2590 IF INKEY$="" THEN GO TO 2590 2600 LET Y$=INKEY$ 2610 IF Y$="y" OR Y$="Y" THEN GO TO 810 2620 STOP 2630 PRINT AT 0,0;F$;AT 10,0;F$;AT 12,0;F$;: PRINT AT 10,10;" ": PRINT AT 12,7;"YOU NOW HAVE $";M;AT 10,10;"POT NOW $";PT;AT 0,8;"I NOW HAVE $";CM 2640 PAUSE 120 2650 RETURN 2660 REM Betting Sub-Routine 2670 LET Y=0 2680 LET H=0 2685 IF B>CM THEN GO TO 3260 2690 LET I=RND 2700 IF CV<59 AND I<=.8 THEN GO TO 2830 2710 IF CV>350 THEN LET H=CV/40 2720 IF CV>350 THEN GO TO 3400 2730 IF CV>250 THEN LET H=CV/50 2740 IF CV>250 THEN GO TO 2860 2750 IF CV>199 AND I>=.1 THEN LET H=3 2760 IF H=3 THEN GO TO 2860 2770 IF CV>150 AND I>=.1 THEN LET H=2 2780 IF I>.95 THEN LET H=7 2790 IF H=7 THEN GO TO 2860 2800 IF I>.75 OR B<5 THEN LET H=2 2810 IF H=2 THEN GO TO 2860 2820 IF CV>58 AND I>.1 THEN GO TO 3190 2830 LET M=M+B 2840 LET PT=PT-B 2850 GO TO 2450 2860 LET CM=CM-B 2870 LET PT=PT+B 2880 FOR F=1 TO H 2890 LET Y=B 2900 IF Y>M THEN LET Y=M 2910 IF M=0 OR CM=0 THEN GO TO 3220 2920 IF Y>=CM THEN GO TO 3360 2930 IF CM=0 THEN GO TO 3210 2940 IF Y<=0 THEN RETURN 2950 PRINT AT 8,0;F$;AT 8,0;"I CALL and RAISE YOU $";Y 2960 PRINT AT 20,0;F$+F$;AT 21,9;"IT'S YOUR BET" 2970 LET PT=PT+Y 2980 LET CM=CM-Y 2990 GO SUB 2630 3000 INPUT B 3010 LET B=INT B 3020 IF B>M THEN GO TO 3340 3030 IF B>Y+PT THEN GO TO 3060 3040 IF B>CM+Y THEN GO TO 3260 3050 IF B=0 OR B>=Y OR B>CM THEN GO TO 3080 3060 PRINT AT 20,0;F$+F$;AT 20,6;"THE POT IS THE LIMIT";AT 21,9;"IT'S YOUR BET" 3070 GO TO 3000 3080 LET PT=PT+B 3090 LET M=M-B 3100 LET CM=CM-(B-Y) 3110 LET PT=PT+(B-Y) 3120 GO SUB 2630 3130 IF B=0 THEN GO TO 2400 3140 IF B=Y THEN GO TO 3240 3150 PRINT AT 20,0;F$+F$;AT 8,0;F$;AT 8,0;"SO YOU RAISE ME $";B-Y;"!..." 3155 PAUSE 90 3160 IF CV<109 AND F>2 AND RND<=.6 THEN GO TO 2430 3170 NEXT F 3180 GO TO 3220 3190 LET CM=CM-B 3200 LET PT=PT+B 3210 GO SUB 2630 3220 PRINT AT 20,0;F$+F$;AT 8,0;F$;AT 8,0;"I CALL!..." 3230 RETURN 3240 PRINT AT 20,0;F$+F$;AT 8,0;F$;AT 8,0;"SO YOU CALL!..." 3245 PAUSE 120 3250 RETURN 3260 IF CM>0 THEN PRINT AT 8,0;F$+F$;AT 8,5;"I DON'T HAVE THAT MUCH";AT 9,9;"I'M IN FOR $";CM 3270 PRINT AT 20,0;F$+F$ 3280 IF CM=0 THEN PRINT AT 8,0;F$;AT 8,3;"I'M ALL IN YOU CAN'T RAISE" 3290 LET PT=PT+Y+2*CM 3300 LET M=M-(CM+Y) 3310 LET CM=0 3320 GO SUB 2630 3330 RETURN 3340 PRINT AT 20,0;F$;AT 20,5;"IT TAKES CASH TO BET" 3350 GO TO 3000 3360 LET Y=CM 3370 PRINT AT 20,0;F$+F$;AT 8,0;F$;AT 8,0;"I'M ALL IN AND RAISE $";Y;AT 20,9;"CALL OR FOLD";AT 21,9;"IT'S YOUR BET!" 3380 GO SUB 2630 3390 GO TO 2970 3400 LET CM=CM-(B-Y) 3410 LET PT=PT+(B-Y) 3420 FOR F=1 TO H 3430 LET Y=PT 3440 IF Y>M THEN LET Y=M 3450 IF M=0 OR CM=0 THEN GO TO 3220 3460 IF Y>=CM THEN GO TO 3360 3470 IF CM=0 THEN GO TO 3220 3480 IF Y<=0 THEN RETURN 3490 PRINT AT 8,0;F$;AT 8,0;"I CALL and RAISE YOU $";Y 3500 PRINT AT 21,0;F$;AT 21,9;"IT'S YOUR BET" 3510 LET PT=PT+Y 3520 LET CM=CM-Y 3530 GO SUB 2630 3540 INPUT B 3550 LET B=INT B 3560 IF B>M THEN GO TO 3720 3570 IF B>Y+PT THEN GO TO 3600 3580 IF B>CM+Y THEN GO TO 3260 3590 IF B=0 OR B>=Y THEN GO TO 3620 3600 PRINT AT 20,0;F$+F$;AT 20,6;"THE POT IS THE LIMIT";AT 21,9;"IT'S YOUR BET" 3610 GO TO 3540 3620 LET PT=PT+B 3630 LET M=M-B 3640 LET CM=CM-(B-Y) 3650 LET PT=PT+(B-Y) 3660 GO SUB 2630 3670 IF B=0 THEN GO TO 2400 3680 IF B=Y THEN GO TO 3240 3690 PRINT AT 20,0;F$+F$;AT 8,0;F$;AT 8,0;"SO YOU RAISE ME $";B-Y;"!..." 3700 NEXT F 3710 GO TO 3220 3720 PRINT AT 20,0;F$;AT 20,5;"IT TAKES CASH TO BET" 3730 GO TO 3540 3740 REM Name the hands 3750 LET M$=("A ??HIGH?? CARD" AND A<59)+("A JACK HIGH" AND A=59)+("A QUEEN HIGH" AND A=60)+("A KING HIGH" AND A=61)+("AN ACE HIGH" AND A=62) 3760 LET O$=("A PAIR OF DEUCES" AND A=100)+("A PAIR OF TREYS" AND A=101)+("A PAIR OF FOURS" AND A=102)+("A PAIR OF FIVES" AND A=103)+("A PAIR OF SIXS" AND A=104)+("A PAIR OF SEVENS" AND A=105)+("A PAIR OF EIGHTS" AND A=106)+("A PAIR OF NINES" AND A=107)+("A PAIR OF TENS" AND A=108)+("A PAIR OF JACKS" AND A=109)+("A PAIR OF QUEENS" AND A=110)+("A PAIR OF KINGS" AND A=111)+("A PAIR of ACES" AND A=112) 3770 LET Q$=("DEUCES AND TREYS" AND A=151)+("TWO PAIR FOUR HIGH" AND A=152)+("TWO PAIR FIVE HIGH" AND A=153)+("TWO PAIR SIX HIGH" AND A=154)+("TWO PAIR SEVEN HIGH" AND A=155)+("TWO PAIR EIGHT HIGH" AND A=156)+("TWO PAIR NINE HIGH" AND A=157)+("TWO PAIR TEN HIGH" AND A=158)+("TWO PAIR JACK HIGH" AND A=159)+("TWO PAIR QUEEN HIGH" AND A=160)+("TWO PAIR KING HIGH" AND A=161)+("TWO PAIR ACE HIGH" AND A=162) 3780 LET R$=("THREE DEUCES" AND A=200)+("THREE TREYS" AND A=201)+("THREE FOURS" AND A=202)+("THREE FIVES" AND A=203)+("THREE SIXS" AND A=204)+("THREE SEVENS" AND A=205)+("THREE EIGHTS" AND A=206)+("THREE NINES" AND A=207)+("THREE TENS" AND A=208)+("THREE JACKS" AND A=209)+("THREE LADIES" AND A=210)+("THREE COWBOYS" AND A=211)+("THREE ACES" AND A=212) 3790 LET S$=("A BICYCLE" AND A=253)+("A SIX HIGH STRAIGHT" AND A=254)+("A SEVEN HIGH STRAIGHT" AND A=255)+("AN EIGHT HIGH STRAIGHT" AND A=256)+("A NINE HIGH STRAIGHT" AND A=257)+("A TEN HIGH STRAIGHT" AND A=258)+("A JACK HIGH STRAIGHT" AND A=259)+("A QUEEN HIGH STRAIGHT" AND A=260)+("A KING HIGH STRAIGHT" AND A=261)+("AN ACE HIGH STRAIGHT" AND A=262) 3800 LET T$=("A SEVEN HIGH FLUSH" AND A=305)+("AN EIGHT HIGH FLUSH" AND A=306)+("A NINE HIGH FLUSH" AND A=307)+("A TEN HIGH FLUSH" AND A=308)+("A JACK HIGH FLUSH" AND A=309)+("A OUEEN HIGH FLUSH" AND A=310)+("A KING HIGH FLUSH" AND A=311)+("AN ACE HIGH FLUSH" AND A=312) 3810 LET U$=("DEUCES FULL" AND A=350)+("TREYS FULL" AND A=351)+("FOURS FULL" AND A=352)+("FIVES FULL" AND A=353)+("SIXS FULL" AND A=354)+("SEVENS FULL" AND A=355)+("EIGHTS FULL" AND A=356)+("NINES FULL" AND A=357)+("TENS FULL" AND A=358)+("JACKS FULL" AND A=359)+("QUEENS FULL" AND A=360)+("KINGS FULL" AND A=361)+("ACES FULL" AND A=362) 3820 LET V$=("FOUR DEUCES" AND A=400)+("FOUR TREYS" AND A=401)+("FOUR FOURS" AND A=402)+("FOUR FIVES" AND A=403)+("FOUR SIXS" AND A=404)+("FOUR SEVENS" AND A=405)+("FOUR EIGHTS" AND A=406)+("FOUR NINES" AND A=407)+("FOUR TENS" AND A=408)+("FOUR JACKS" AND A=409)+("FOUR LADIES" AND A=410)+("FOUR COWBOYS" AND A=411)+("!!!FOUR ACES!!!" AND A=412) 3830 LET W$=("WOW! A STRAIGHT FLUSH" AND A>450 AND A<462)+("GEE!!! A ROYAL FLUSH!!!" AND A>461) 3840 LET L=(22-(LEN M$)-(LEN O$)-(LEN Q$)-(LEN R$)-(LEN S$)-(LEN T$)-(LEN U$)-(LEN V$)-(LEN W$))/2 3850 RETURN 3860 REM CARD BACKS 3870 FOR C=1 TO 25 STEP 6 3880 PRINT PAPER 7; INK Q;AT O,C;"\a\b\b\b\c";AT O+1,C;"\d\e\e\e\f";AT O+2,C;"\d\e\e\e\f";AT O+3,C;"\d\e\e\e\f";AT O+4,C;"\d\e\e\e\f";AT O+5,C;"\d\e\e\e\f";AT O+6,C;"\g\h\h\h\i" 3890 NEXT C 3900 RETURN 3910 REM Card Outline 3920 FOR C=1 TO 25 STEP 6 3930 PRINT PAPER 7;AT O,C;" ";AT O+1,C;" \ \ \ ";AT O+2,C;" \ \ \ ";AT O+3,C;" \ \ \ ";AT O+4,C;" \ \ \ ";AT O+5,C;" \ \ \ ";AT O+6,C;" " 3940 NEXT C: RETURN 3950 REM Card values 3960 FOR O=1 TO 25 STEP 6 3970 LET G=0 3980 IF E$(2)="\s" THEN LET G=2 3990 IF E$(2)="\o" THEN LET G=2 4000 PRINT INK G; PAPER 7;AT C,O;E$(1);AT C+3,O+2;E$(2);AT C+6,O+4;E$(1) 4010 LET E$=E$(3 TO ) 4020 NEXT O 4030 RETURN 4040 REM THE GAMBLER 4045 SOUND 7,56;11,64;12,32;13,8 4050 SOUND 0,68;1,3;8,15;2,162;3,1;9,7;4,248;5,0;10,15 4055 PAUSE 8 4060 SOUND 2,213;4,23;5,1 4065 PAUSE 16 4070 SOUND 2,241;4,57 4075 PAUSE 6 4080 SOUND 2,0;4,0 4085 PAUSE 2 4090 SOUND 2,241;4,57;8,16 4095 PAUSE 30 4100 SOUND 4,0 4105 PAUSE 2 4110 SOUND 0,232;1,2;2,213;4,57 4115 PAUSE 22 4120 SOUND 4,0 4125 PAUSE 2 4130 SOUND 4,57 4135 PAUSE 6 4140 SOUND 4,0 4145 PAUSE 2 4150 SOUND 0,68;1,3;2,241;4,57 4155 PAUSE 16 4160 SOUND 4,162 4165 PAUSE 16 4170 SOUND 0,92;1,4;2,213 4175 PAUSE 16 4180 SOUND 0,226;1,3;2,162;4,0 4185 PAUSE 16 4190 SOUND 0,170;2,0 4195 PAUSE 16 4200 SOUND 4,234;5,0;2,116 4205 PAUSE 16 4210 SOUND 2,75;4,209 4215 PAUSE 24 4220 SOUND 2,57;4,186 4225 PAUSE 8 4230 SOUND 0,228;1,4;4,209 4235 PAUSE 16 4240 SOUND 2,162;4,248 4245 PAUSE 16 4250 SOUND 0,92;2,213 4255 PAUSE 16 4260 SOUND 0,226;1,3;2,162 4265 PAUSE 16 4270 SOUND 0,170;2,116;4,0 4275 PAUSE 16 4280 SOUND 4,234 4285 PAUSE 16 4290 SOUND 2,75;4,209 4295 PAUSE 24 4300 SOUND 2,57;4,186 4305 PAUSE 8 4310 SOUND 0,228;1,4;4,209 4315 PAUSE 14 4320 SOUND 2,0;4,0 4325 PAUSE 2 4330 SOUND 2,57;4,209 4335 PAUSE 14 4340 SOUND 2,0 4345 PAUSE 2 4350 SOUND 0,232;1,2;2,57;4,248 4355 PAUSE 16 4360 SOUND 0,68;1,3 4365 PAUSE 16 4370 SOUND 0,228;1,4;2,0;4,0 4375 PAUSE 8 4380 SOUND 4,162;5,1 4385 PAUSE 8 4390 SOUND 2,162;4,57 4395 PAUSE 16 4400 SOUND 0,47;1,5;4,75 4405 PAUSE 16 4410 SOUND 0,209;4,57 4415 PAUSE 16 4420 SOUND 0,136;1,6;2,0;4,23 4425 PAUSE 16 4430 SOUND 2,75 4435 PAUSE 16 4440 SOUND 0,68;1,3;2,162;4,248;5,0 4445 PAUSE 6 4450 SOUND 2,0;4,0 4455 PAUSE 2 4460 SOUND 2,162;4,248 4465 PAUSE 16 4470 SOUND 2,213;4,23;5,1 4475 PAUSE 8 4480 SOUND 2,241;4,57 4485 PAUSE 32 4490 SOUND 0,232;1,2;2,213;4,23 4495 PAUSE 32 4500 SOUND 0,68;1,3;2,241;4,57 4505 PAUSE 16 4510 SOUND 4,162 4515 PAUSE 16 4520 SOUND 0,92;1,4;2,213 4525 PAUSE 16 4530 SOUND 0,226;1,3;2,162;4,57 4535 PAUSE 6 4540 SOUND 4,0 4545 PAUSE 2 4550 SOUND 4,57 4555 PAUSE 8 4560 SOUND 0,170;1,3;2,116;4,234;5,0 4565 PAUSE 14 4570 SOUND 2,0;4,0 4575 PAUSE 2 4580 SOUND 2,116;4,234 4585 PAUSE 14 4590 SOUND 0,0 4595 PAUSE 2 4600 SOUND 0,170;2,75;4,209 4605 PAUSE 24 4610 SOUND 2,57;4,186 4615 PAUSE 8 4620 SOUND 0,228;1,4;4,209 4625 PAUSE 16 4630 SOUND 2,162;4,248 4635 PAUSE 16 4640 SOUND 0,68;1,3 4645 PAUSE 16 4650 SOUND 2,0;4,57;5,1 4655 PAUSE 8 4660 SOUND 4,248;5,0 4665 PAUSE 8 4670 SOUND 0,228;1,4;2,57;4,209 4675 PAUSE 14 4680 SOUND 2,0;4,0 4685 PAUSE 2 4690 SOUND 2,57;4,209 4695 PAUSE 14 4700 SOUND 2,0 4705 PAUSE 2 4710 SOUND 0,68;1,3;2,57;4,186 4715 PAUSE 22 4720 SOUND 2,0 4725 PAUSE 2 4730 SOUND 2,57;4,209 4735 PAUSE 6 4740 SOUND 2,0;4,0 4745 PAUSE 2 4750 SOUND 0,228;1,4;2,57;4,209 4755 PAUSE 16 4760 SOUND 2,162;4,248 4765 PAUSE 16 4770 SOUND 0,47;1,5 4775 PAUSE 16 4780 SOUND 0,209 4785 PAUSE 16 4790 SOUND 0,136;1,6;2,0;4,0 4795 PAUSE 16 4800 SOUND 2,75;4,23;5,1 4810 PAUSE 6 4815 SOUND 2,0;4,0 4820 PAUSE 2 4825 SOUND 2,75;4,23 4830 PAUSE 6 4835 SOUND 2,0 4840 PAUSE 2 4845 SOUND 2,75;4,248;5,0 4850 PAUSE 16 4855 SOUND 2,213;4,75;5,1 4860 PAUSE 16 4865 SOUND 0,228;1,4;2,162;4,57 4870 PAUSE 16 4875 SOUND 0,68;1,3;8,15 4880 PAUSE 8 4885 SOUND 0,226 4890 PAUSE 8 4895 SOUND 0,232;1,2 4900 PAUSE 8 4905 SOUND 0,68;1,3 4910 PAUSE 8 4915 SOUND 0,226 4920 PAUSE 8 4925 SOUND 0,92;1,4 4930 PAUSE 8 4935 SOUND 0,228 4940 PAUSE 16 4945 SOUND 0,136;1,6;2,23;4,209;5,0 4950 PAUSE 16 4955 SOUND 0,228;1,4;2,248;3,0 4960 PAUSE 32 4965 SOUND 0,0;1,0;2,0;3,0;4,0;5,0;6,0;7,63;8,0;9,0;10,0;11,0;12,0;13,0 4970 RETURN 5000 REM RATE HANDS 5010 LET V=CODE E$ 5020 IF E$(1)=E$(3) AND E$(1)=E$(5) AND E$(7)=E$(9) OR E$(1)=E$(3) AND E$(5)=E$(7) AND E$(5)=E$(9) THEN GO TO 6180 5030 IF E$(1)=E$(3) AND E$(1)=E$(5) AND E$(1)=E$(7) OR E$(3)=E$(5) AND E$(3)=E$(7) AND E$(3)=E$(9) THEN GO TO 6230 5040 IF E$(1)=E$(3) AND E$(1)=E$(5) OR E$(3)=E$(5) AND E$(3)=E$(7) OR E$(5)=E$(7) AND E$(5)=E$(9) THEN GO TO 6130 5050 IF E$(1)=E$(3) AND E$(5)=E$(7) OR E$(1)=E$(3) AND E$(7)=E$(9) OR E$(3)=E$(5) AND E$(7)=E$(9) THEN GO TO 6080 5060 IF E$(1)=E$(3) OR E$(3)=E$(5) OR E$(5)=E$(7) OR E$(7)=E$(9) THEN GO TO 6030 5070 IF CODE E$(1)=CODE E$(3)+1 AND CODE E$(3)=CODE E$(5)+1 AND CODE E$(5)=CODE E$(7)+1 AND CODE E$(7)=CODE E$(9)+1 THEN LET V=200+CODE E$ 5080 IF CODE E$(2)=CODE E$(4) AND CODE E$(4)=CODE E$(6) AND CODE E$(6)=CODE E$(8) AND CODE E$(8)=CODE E$(10) THEN LET V=250+CODE E$ 5090 IF E$(2)=E$(4) AND E$(4)=E$(6) AND E$(6)=E$(8) AND E$(8)=E$(10) AND CODE E$(1)=CODE E$(3)+1 AND CODE E$(3)=CODE E$(5)+1 AND CODE E$(5)=CODE E$(7)+1 AND CODE E$(7)=CODE E$(9)+1 THEN LET V=400+CODE E$ 6000 IF E$(1)=">" AND E$(3)="5" AND E$(5)="4" AND E$(7)="3" AND E$(9)="2" THEN LET V=253 6010 IF E$(1)=">" AND E$(3)="5" AND E$(5)="4" AND E$(7)="3" AND E$(9)="2" AND E$(2)=E$(4) AND E$(4)=E$(6) AND E$(6)=E$(8) AND E$(8)=E$(10) THEN LET E=453 6020 RETURN 6030 FOR F=1 TO 7 STEP 2 6040 IF E$(F)=E$(F+2) THEN GO TO 6060 6050 NEXT F 6060 LET V=50+CODE E$(F) 6070 RETURN 6080 FOR F=1 TO 3 STEP 2 6090 IF E$(F)=E$(F+2) THEN GO TO 6110 6100 NEXT F 6110 LET V=100+CODE E$(F) 6120 RETURN 6130 FOR F=1 TO 5 STEP 2 6140 IF E$(F)=E$(F+2) THEN GO TO 6160 6150 NEXT F 6160 LET V=150+CODE E$(F) 6170 RETURN 6180 FOR F=1 TO 5 STEP 4 6190 IF E$(F)=E$(F+2) AND E$(F)=E$(F+4) THEN GO TO 6210 6200 NEXT F 6210 LET V=300+CODE E$(F) 6220 RETURN 6230 FOR F=1 TO 3 STEP 2 6240 IF E$(F)=E$(F+2) THEN LET V=350+CODE E$(F) 6250 NEXT F 6260 RETURN 6500 REM COMPUTER DECIDES DISCARDS 6510 LET I$=E$ 6520 LET D=0 6530 IF V>250 THEN RETURN 6540 IF V>150 THEN GO TO 6790 6550 IF V>65 THEN GO TO 6930 6560 IF E$(2)=E$(4) AND E$(2)=E$(6) AND E$(2)=E$(8) OR E$(2)=E$(4) AND E$(2)=E$(6) AND E$(2)=E$(10) OR E$(2)=E$(4) AND E$(2)=E$(8) AND E$(2)=E$(10) OR E$(4)=E$(6) AND E$(4)=E$(8) AND E$(4)=E$(10) THEN GO TO 7020 6570 IF E$(2)=E$(4) AND E$(2)=E$(6) OR E$(2)=E$(4) AND E$(2)=E$(8) OR E$(2)=E$(4) AND E$(2)=E$(10) OR E$(2)=E$(6) AND E$(2)=E$(8) OR E$(2)=E$(4) AND E$(2)=E$(10) OR E$(2)=E$(6) AND E$(2)=E$(10) OR E$(4)=E$(6) AND E$(4)=E$(8) OR E$(4)=E$(8) AND E$(4)=E$(10) OR E$(6)=E$(8) AND E$(6)=E$(10) OR E$(6)=E$(4) AND E$(6)=E$(10) THEN GO TO 6620 6580 IF CODE E$(1)=CODE E$(3)+1 AND CODE E$(3)=CODE E$(5)+1 OR CODE E$(3)=CODE E$(5)+1 AND CODE E$(5)=CODE E$(7)+1 OR CODE E$(5)=CODE E$(7)+1 AND CODE E$(7)=CODE E$(9)+1 THEN GO TO 6710 6590 LET E$(3 TO )=D$( TO 8) 6600 LET D=4 6610 RETURN 6620 IF E$(2)=E$(4) AND E$(2)=E$(6) OR E$(2)=E$(4) AND E$(2)=E$(8) OR E$(2)=E$(4) AND E$(2)=E$(10) OR E$(2)=E$(6) AND E$(2)=E$(10) OR E$(2)=E$(6) AND E$(2)=E$(8) OR E$(2)=E$(10) THEN LET K$=E$(2) 6630 IF E$(4)=E$(6) AND E$(4)=E$(8) OR E$(4)=E$(6) AND E$(4)=E$(10) OR E$(4)=E$(8) AND E$(4)=E$(10) THEN LET K$=E$(4) 6640 IF E$(6)=E$(8) AND E$(6)=E$(10) OR E$(6)=E$(8) AND E$(6)=E$(10) THEN LET K$=E$(6) 6650 FOR F=2 TO 10 STEP 2 6660 IF E$(F)<>K$ THEN LET E$(F-1 TO F)=D$( TO 2) 6670 LET D$=D$(3 TO ) 6680 NEXT F 6690 LET D=2 6700 RETURN 6710 IF CODE E$(1)=CODE E$(3)+1 AND CODE E$(3)=CODE E$(5)+1 AND CODE E$(5)=CODE E$(7)+1 OR CODE E$(3)=CODE E$(5)+1 AND CODE E$(5)=CODE E$(7)+1 AND CODE E$(7)=CODE E$(9)+1 THEN GO TO 7100 6720 IF CODE E$(1)=CODE E$(3)+1 THEN LET I$(7 TO 10)=D$( TO 4) 6730 IF CODE E$(3)=CODE E$(5)+1 AND CODE E$(5)=CODE E$(7)+1 THEN LET I$(9 TO 10)=D$(3 TO 4) 6740 IF CODE E$(3)=CODE E$(5)+1 AND CODE E$(5)=CODE E$(7)+1 THEN LET I$( TO 2)=D$( TO 2) 6750 IF CODE E$(7)=CODE E$(9)+1 THEN LET I$( TO 4)=D$( TO 4) 6760 LET D=2 6770 LET E$=I$ 6780 RETURN 6790 IF V>200 THEN GO TO 6860 6800 IF E$(1)=E$(3) AND E$(5)=E$(7) THEN LET I$(9 TO )=D$( TO 2) 6810 IF E$(1)=E$(3) AND E$(7)=E$(9) THEN LET I$(5 TO 6)=D$( TO 2) 6820 IF E$(3)=E$(5) AND E$(7)=E$(9) THEN LET I$( TO 2)=D$( TO 2) 6830 LET D=1 6840 LET E$=I$ 6850 RETURN 6860 IF E$(1)=E$(3) AND E$(1)=E$(5) THEN LET I$(7 TO )=D$( TO 4) 6870 IF E$(3)=E$(5) AND E$(3)=E$(7) THEN LET I$( TO 2)=D$( TO 2) 6880 IF E$(3)=E$(5) AND E$(3)=E$(7) THEN LET I$(9 TO )=D$(3 TO 4) 6890 IF E$(5)=E$(7) AND E$(5)=E$(9) THEN LET I$( TO 4)=D$( TO 4) 6900 LET D=2 6910 LET E$=I$ 6920 RETURN 6930 IF E$(1)=E$(3) THEN LET I$(5 TO )=D$( TO 6) 6940 IF E$(3)=E$(5) THEN LET I$( TO 2)=D$( TO 2) 6950 IF E$(3)=E$(5) THEN LET I$(7 TO 10)=D$(3 TO 6) 6960 IF E$(5)=E$(7) THEN LET I$( TO 4)=D$( TO 4) 6970 IF E$(5)=E$(7) THEN LET I$(9 TO )=D$(5 TO 6) 6980 IF E$(7)=E$(9) THEN LET I$( TO 6)=D$( TO 6) 6990 LET D=3 7000 LET E$=I$ 7010 RETURN 7020 IF E$(2)=E$(4) OR E$(2)=E$(6) THEN LET H$=E$(2) 7030 IF E$(2)<>E$(4) AND E$ (4)=E$(6) THEN LET H$=E$(4) 7040 FOR F=2 TO 10 STEP 2 7050 IF E$(F)<>H$ THEN LET E$(F-1 TO F)=D$( TO 2) 7060 LET D$=D$(3 TO ) 7070 NEXT F 7080 LET D=1 7090 RETURN 7100 IF CODE E$(1)=CODE E$(3)+1 AND CODE E$(3)=CODE E$(5)+1 AND CODE E$(5)=CODE E$(7)+1 THEN LET I$(9 TO )=D$( TO 2) 7110 IF CODE E$(3)=CODE E$(5)+1 AND CODE E$(5)=CODE E$(7)+1 AND CODE E$(7)=CODE E$(9)+1 THEN LET I$( TO 2)=D$( TO 2) 7120 LET E$=I$ 7130 LET D=1 7140 RETURN 7150 REM HELP 7160 CLS 7170 PRINT AT 1,1;"This is a game of Draw Poker between you and the computer." 7180 PRINT AT 4,1;"You will be dealt 5 cards,and then be asked which you wish to discard. You may discard up to four cards. You and the com- puter each have the same stake" 7190 PRINT AT 10,1;"On each deal your total will be automatically deducted $5. This is the ante." 7200 PRINT AT 14,1;"The maximun initial bet is $25, afterward the game is pot limit To thow in your hand enter a 0. To restart after failure: ENTER-RUN(R KEY)" 7210 PRINT AT 20,3;"GOOD LUCK!!! YOU'LL NEED IT." 7212 GO SUB 4040 7215 PRINT AT 21,4;"PRESS ANY KEY TO CONTINUE" 7220 PAUSE 0 7230 CLS 7240 RETURN 9998 SAVE "POKER" LINE 10 9999 VERIFY ""