From: barker@enel.ucalgary.ca (Scott Barker)
Newsgroups: rec.arts.startrek.misc
Subject: Re: Fizzbin
Date: 24 Jul 1992 11:22:34 -0500
Organization: UTexas Mail-to-News Gateway
NNTP-Posting-Host: cs.utexas.edu


 120  TEXT : HOME : VTAB 5: HTAB 17: INVERSE : PRINT "FIZZBIN": NORMAL : PRINT : PRINT 
 130  PRINT  TAB( 13);"BY DONALD BROWN"
 140  VTAB 15: INPUT "DO YOU NEED INSTRUCTIONS?";A$: IF  LEFT$ (A$,1) = "Y" THEN  GOSUB 1240
 150  POKE 768,0: POKE 769,0: POKE 770,0
 160  DIM C(14,4),Q(52),N$(4),D(4,20),DP(4),H(4,11),HP(4),W(14)
 170  DIM T(6): FOR A = 1 TO 6: READ T(A): NEXT : DATA 3,5,6,8,9,10
 180  FOR A = 1 TO 4: READ N$(A): NEXT : DATA  YOU,DEALER,PLAYER 2,PLAYER 3
 190  DEF  FN R(A) =  INT (A *  RND (1) + 1)
 200  PRINT : HTAB 16: INVERSE : PRINT "SHUFFLING": NORMAL : PRINT : FOR I = 2 TO 14: FOR J = 1 TO 4:C(I,J) = 0: NEXT : NEXT : FOR P = 1 TO 42
 210 I =  FN R(4):J =  FN R(13) + 1: IF C(J,I) THEN 210
 220 C(J,I) = 1:Q(P) = J * 10 + I: NEXT 
 230  FOR I = 1 TO 4: FOR J = 2 TO 14: IF C(J,I) = 0 THEN Q(P) = J * 10 + I:P = P + 1
 240  NEXT : NEXT 
 250 C$ = " 2 3 4 5 6 7 8 910 J Q K A":S$ = "SHDC"
 260  INPUT "IS IT NIGHT YET?";A$: IF  LEFT$ (A$,1) = "Y" THEN C$ = " 4 3 2 5 6 7 8 910 J K Q A":S$ = "HSCD": GOTO 280
 270  IF  LEFT$ (A$,1) <  > "N" THEN 260
 280  HOME : FOR B = 1 TO 4: PRINT N$(B);" ";
 290  FOR A = 1 TO 38 -  LEN (N$(B)): PRINT "X";: NEXT 
 300  PRINT : PRINT : PRINT : PRINT : PRINT "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX": NEXT 
 310  PRINT "DISCARDS XXXXXXXXXXXXXX STACK XXXXXXXXX": PRINT 
 320  FOR B = 1 TO 4: PRINT  TAB( B * 6 - 5);B;":";: NEXT 
 330 P = 1: FOR N = 1 TO 6: FOR B = 1 TO 4: GOSUB 740:V = B * 5 - 3:H = 4 * N - 3: GOSUB 720:H(B,N) = C: NEXT : NEXT 
 340  FOR B = 1 TO 2: GOSUB 740:V = B * 5 - 3:H = 25: GOSUB 720:H(B,7) = C: NEXT 
 350 HP(1) = 7:HP(2) = 7:HP(3) = 6:HP(4) = 6
 360  FOR B = 1 TO 4: GOSUB 740:V = 22:H = 6 * B - 3: GOSUB 710:D(B,1) = C:DP(B) = 1: NEXT 
 370  FOR B = 1 TO 2:C = H(B,2):V = B * 5 - 3:H = 5: GOSUB 710: NEXT 
 380 V = 22:H = 26: GOSUB 720
 390  HTAB 1
 400  FOR B = 1 TO 4: VTAB B * 5 - 4: INVERSE : PRINT N$(B): NORMAL : FOR N = 1 TO HP(B)
 410  IF N > HP(B) THEN 440
 420 C = H(B,N):J =  INT (C / 10): IF J <  > 4 AND J <  > 12 THEN 440
 430 V = B * 5 - 3:H = 4 * N - 3: GOSUB 710: FOR X = 1 TO 5000: NEXT :HP(B) = HP(B) - 1: FOR M = N TO HP(B):H(B,M) = H(B,M + 1):V = B * 5 - 3:H = 4 * M - 3: GOSUB 720: NEXT :H = 4 * HP(B) + 1: GOSUB 730: GOTO 410
 440  NEXT : FOR N = 1 TO HP(B):C = H(B,N):J =  INT (C / 10): IF J <  > 2 AND J <  > 13 THEN 480
 450 V = B * 5 - 3:H = 4 * N - 3: GOSUB 710: FOR X = 1 TO 3000: NEXT : GOSUB 720: IF HP(B) = 10 THEN 480
 460  GOSUB 740:H = 4 * HP(B) + 1: GOSUB 720:J =  INT (C / 10): IF J = 4 OR J = 12 THEN  GOSUB 710: FOR X = 1 TO 3000: NEXT : GOSUB 730: GOTO 480
 470 HP(B) = HP(B) + 1:H(B,HP(B)) = C: IF J = 2 OR J = 13 THEN  GOSUB 710: FOR X = 1 TO 3000: NEXT : GOSUB 720: IF HP(B) < 10 THEN 460
 480  NEXT : VTAB B * 5 - 4: HTAB 1: PRINT N$(B): NEXT : GOSUB 770
 490 V = 7:H = 5: GOSUB 720
 500  VTAB 1: HTAB 1: INVERSE : PRINT "YOU": NORMAL : GOSUB 760
 510  HOME : INPUT "PILE TO   DRAW FROM (0-4)?";A$:PL =  VAL (A$): IF PL < 0 OR PL > 4 OR PL <  >  INT (PL) THEN 510
 520  IF PL = 0 THEN  GOSUB 740:C9 = C: GOTO 560
 530  IF DP(PL) = 0 THEN  HOME : PRINT "EMPTY PILE!";: GET A$: GOTO 510
 540  TEXT 
 550 C9 = D(PL,DP(PL)):DP(PL) = DP(PL) - 1: GOSUB 790
 560  TEXT : VTAB 21: HTAB 25: INVERSE : PRINT "DRAWN": NORMAL 
 570 C = C9:V = 22:H = 26: GOSUB 710
 580 J =  INT (C9 / 10): IF J = 2 OR J = 13 THEN  IF HP(1) < 10 THEN HP(1) = HP(1) + 1:H(1,HP(1)) = C9: GOSUB 770: GOSUB 810: GOTO 500
 590  GOSUB 760: IF J = 4 OR J = 12 THEN 660
 600  HOME : IF PL = 0 THEN  PRINT "WANT TO": INPUT "KEEP IT?";A$: IF  LEFT$ (A$,1) = "N" THEN 630
 610  HOME : PRINT "CARD TO   DISCARD?": INPUT "";A$: GOSUB 1020: FOR A = 1 TO HP(1): IF H(1,A) <  > C THEN  NEXT : HOME : PRINT "YOU DON'T HAVE IT!";: GET A$: GOTO 610
 620 H(1,A) = C9:C9 = C
 630  PRINT "PILE TO": PRINT "DISCARD": INPUT "ON?";A$:PL =  VAL (A$): IF PL < 1 OR PL > 4 OR PL <  >  INT (PL) THEN 630
 640  TEXT 
 650 DP(PL) = DP(PL) + 1:D(PL,DP(PL)) = C9: GOSUB 790: GOSUB 810: GOSUB 770: VTAB 1: HTAB 1: PRINT "YOU": GOTO 1060
 660  FOR X = 1 TO 2000: NEXT : TEXT : GOSUB 810: GOSUB 760
 670  HOME : PRINT "CARD TO   DISCARD?": INPUT "";A$: GOSUB 1020: FOR A = 1 TO HP(1): IF H(1,A) <  > C THEN  NEXT : HOME : PRINT "YOU DON'T HAVE IT!";: GET A$: GOTO 670
 680  PRINT "PILE TO": PRINT "DISCARD": INPUT "ON?";A$:PL =  VAL (A$): IF PL < 1 OR PL > 4 OR PL <  >  INT (PL) THEN 680
 690 DP(PL) = DP(PL) + 1:D(PL,DP(PL)) = C:HP(1) = HP(1) - 1: FOR N = A TO HP(1):H(1,N) = H(1,N + 1): NEXT : TEXT : GOSUB 770: GOSUB 790: VTAB 1: HTAB 1: PRINT "YOU": GOTO 1060
 700  END 
 710 C1 =  INT (C / 10):S1 = C - 10 * C1: INVERSE : VTAB V: HTAB H: PRINT  MID$ (S$,S1,1);"  ": HTAB H: PRINT  MID$ (C$,C1 * 2 - 3,2);" ": HTAB H: PRINT "  "; MID$ (S$,S1,1);: NORMAL : RETURN 
 720  INVERSE : FOR C1 = V TO V + 2: VTAB C1: HTAB H: PRINT "###";: NEXT : NORMAL : RETURN 
 730  FOR C1 = V TO V + 2: VTAB C1: HTAB H: PRINT "   ";: NEXT : RETURN 
 740  IF P < 53 THEN C = Q(P):P = P + 1: RETURN 
 750  GOSUB 760: HOME : PRINT "NO MORE": PRINT "CARDS!": TEXT : GOTO 830
 760  POKE 32,29: POKE 33,10: POKE 34,21: HOME : RETURN 
 770  FOR N = 1 TO HP(1):V = 2:H = 4 * N - 3:C = H(1,N): GOSUB 710: NEXT : IF HP(1) < 10 THEN  FOR N = HP(1) + 1 TO 10:H = 4 * N - 3: GOSUB 730: NEXT 
 780  RETURN 
 790 V = 22:H = 6 * PL - 3: IF DP(PL) = 0 THEN  GOTO 730
 800 C = D(PL,DP(PL)): GOTO 710
 810  TEXT : VTAB 21: HTAB 25: PRINT "STACK":V = 22:H = 26: IF P < 53 THEN 720
 820  GOTO 730
 830  FOR B = 2 TO 4: FOR N = 1 TO HP(B):C = H(B,N):V = B * 5 - 3:H = N * 4 - 3: GOSUB 710: NEXT : NEXT 
 840  FOR B = 1 TO 4: FOR N = 1 TO 14:D(B,N) = 0: NEXT : FOR N = 1 TO HP(B):C =  INT (H(B,N) / 10):D(B,C) = D(B,C) + 1: NEXT 
 850  FOR N = 2 TO 14: IF D(B,N) > 2 THEN W$ = "SHRONK":D(B,1) =  - 200: GOTO 940
 860  NEXT : IF ((D(B,7) = 2 AND D(B,11) = 2) OR (D(B,7) = 2 AND D(B,14) = 2) OR (D(B,11) = 2 AND D(B,14) = 2)) AND D(B,2) > 0 AND D(B,13) > 0 THEN W$ = "ROYAL FIZZBIN":D(B,1) = 200: GOTO 940
 870  IF (D(B,7) = 2 OR D(B,11) = 2 OR D(B,14) = 2) AND D(B,2) > 0 AND D(B,13) > 0 THEN W$ = "FULL FIZZBIN":D(B,1) = 100: GOTO 940
 880  FOR A = 1 TO 6: IF D(B,T(A)) = 0 THEN 920
 890  NEXT : FOR A = 1 TO 6: FOR N = 1 TO HP(B):J =  INT (H(B,N) / 10): IF J <  > T(A) THEN  NEXT : GOTO 920
 900 I = H(B,N) - J * 10: IF I <  > 2 AND I <  > 3 THEN  NEXT : GOTO 920
 910  NEXT A:W$ = "3/4 FIZZBIN":D(B,1) = 75: GOTO 940
 920  IF (D(B,7) = 2 OR D(B,11) = 2 OR D(B,14) = 2) THEN W$ = "1/2 FIZZBIN":D(B,1) = 50: GOTO 940
 930 W$ = "NOTHING":D(B,1) = 0
 940  VTAB B * 5 - 4: HTAB  LEN (N$(B)) + 1: PRINT "   ";: IF  ABS (D(B,1)) = 200 THEN  FLASH 
 950  PRINT W$;: NORMAL : PRINT " "
 960  NEXT B
 970  FOR B = 1 TO 3:D(0,B) = 0: NEXT : FOR B = 2 TO 4:C =  SGN (D(1,1) - D(B,1)) + 2:D(0,C) = D(0,C) + 1: POKE 767 + C, PEEK (767 + C) + 1: NEXT 
 980  GOSUB 760: PRINT "BEAT: ";D(0,3): PRINT "TIED: ";D(0,2): PRINT "LOST: ";D(0,1);: GET A$
 990  HOME : PRINT "BEST TWO": PRINT "OUT OF": INPUT "THREE?";A$: TEXT : HOME : IF  LEFT$ (A$,1) = "Y" THEN  CLEAR : GOTO 160
 1000  VTAB 5: PRINT "YOUR OVERALL RECORD WAS--": PRINT : PRINT  TAB( 10);"WINS:"; TAB( 17); PEEK (770): PRINT : PRINT  TAB( 10);"TIES:"; TAB( 17); PEEK (769): PRINT : PRINT  TAB( 10);"LOSSES:"; TAB( 17); PEEK (768): PRINT : PRINT 
 1010  PRINT "COME AGAIN SOMETIME!": END 
 1020 J =  VAL (A$): FOR I = 1 TO 4: IF  RIGHT$ (A$,1) <  >  MID$ (S$,I,1) THEN  NEXT 
 1030  IF J = 2 OR J = 4 THEN J =  VAL ( MID$ (C$,J * 2 - 3,2))
 1040  IF J = 0 THEN  FOR J = 11 TO 14: IF  LEFT$ (A$,1) <  >  MID$ (C$,J * 2 - 2,1) THEN  NEXT 
 1050 C = J * 10 + I: RETURN 
 1060  FOR B = 2 TO 4
 1070  VTAB B * 5 - 4: HTAB 1: INVERSE : PRINT N$(B): NORMAL : FOR N = 1 TO 14:W(N) = 0: NEXT : FOR N = 1 TO HP(B):J =  INT (H(B,N) / 10):W(J) = W(J) + 1: NEXT 
 1080  FOR PL = 1 TO 4:C9 = D(PL,DP(PL)):J =  INT (C9 / 10): IF (J = 2 OR J = 13) AND W(J) < 2 THEN 1110
 1090  NEXT : FOR PL = 1 TO 4:C9 = D(PL,DP(PL)):J =  INT (C9 / 10): IF (J = 7 OR J = 11 OR J = 14) AND W(J) < 2 THEN 1110
 1100  NEXT : GOSUB 740:C9 = C: GOSUB 810: GOTO 1120
 1110 DP(PL) = DP(PL) - 1: GOSUB 790
 1120 J =  INT (C9 / 10): IF (J = 2 OR J = 13) AND HP(B) < 10 THEN C = C9:V = 22:H = 26: GOSUB 710: VTAB 21: HTAB 25: INVERSE : PRINT "DRAWN": NORMAL : FOR X = 1 TO 3000: NEXT : GOSUB 810:HP(B) = HP(B) + 1:H(B,HP(B)) = C9:V = B * 5 - 3:H = 4 * HP(B) - 3: GOSUB 720: GOTO 1070
 1130 H(B,0) = C9: IF J = 4 OR J = 12 THEN V = 22:H = 26:C = C9: GOSUB 710: VTAB 21: HTAB 25: INVERSE : PRINT "DRAWN": FOR X = 1 TO 3000: NEXT : NORMAL : GOSUB 810:H(B,0) = H(B,HP(B)):HP(B) = HP(B) - 1:V = B * 5 - 3:H = 4 * HP(B) + 1: GOSUB 730
 1140 W(J) = W(J) + 1: FOR N = 0 TO HP(B):C = H(B,N):J =  INT (C / 10): IF W(J) > 2 THEN 1180
 1150  NEXT : FOR N = 0 TO HP(B):C = H(B,N):J =  INT (C / 10): IF J <  > 2 AND J <  > 7 AND J <  > 11 AND J <  > 13 AND J <  > 14 THEN 1180
 1160  NEXT : FOR N = 0 TO HP(B):C = H(B,N):J =  INT (C / 10): IF J <  > 2 AND J <  > 14 AND W(J) < 2 THEN 1180
 1170  NEXT :N = 0:C = H(B,0)
 1180 H(B,N) = H(B,0): FOR PL = 1 TO 4:C2 = D(PL,DP(PL)):J =  INT (C2 / 10): IF J <  > 2 AND J <  > 7 AND J <  > 11 AND J <  > 13 AND J <  > 14 THEN  NEXT :PL =  FN R(4)
 1190 DP(PL) = DP(PL) + 1:D(PL,DP(PL)) = C: GOSUB 790
 1200  FOR X = 1 TO 1000: NEXT 
 1210  VTAB B * 5 - 4: HTAB 1: PRINT N$(B): NEXT B
 1220  GOTO 500
 1230  NEXT B: GOTO 500
 1240  HOME : PRINT : HTAB 12: INVERSE : PRINT "RULES FOR FIZZBIN": NORMAL : PRINT : PRINT 
 1250  PRINT "FIZZBIN IS A GAME THAT IS UNSURPASSED IN": PRINT "COMPLEXITY  AND  ORIGINALITY.  SIX CARDS": PRINT "ARE DEALT TO EVERY PLAYER, EXCEPT TO THE"
 1260  PRINT "DEALER AND THE PLAYER ON HIS  LEFT (YOU)": PRINT "WHO GET SEVEN.  THE SECOND  CARDS OF YOU": PRINT "AND THE DEALER ARE DEALT FACE-UP."
 1270  PRINT 
 1280  PRINT "THE PLAYER ON THE DEALER'S LEFT GETS THE": PRINT "FIRST PLAY, WHICH THEN PROCEEDS COUNTER-": PRINT "CLOCK-WISE": GOSUB 1490
 1290  PRINT "THERE  IS ONE  DISCARD  PILE  FOR  EVERY": PRINT "PLAYER.  TO PLAY, YOU MAY DRAW FROM  ANY": PRINT "ONE OF  THE FOUR,  OR YOU  MAY DRAW FROM": PRINT "THE STACK (CALLED PILE 0)": PRINT 
 1300  PRINT "IF THE CARD YOU DRAW IS A KING OR A TWO,": PRINT "YOU MAY DRAW AGAIN,  UNLESS IT IS NIGHT,": PRINT "IN WHICH CASE YOU MUST DRAW A QUEEN OR A": PRINT "FOUR.": PRINT 
 1310  PRINT "IF YOU DRAW A QUEEN OR A FOUR (OR A KING": PRINT "OR A 2 AT NIGHT),  YOU MUST  IMMEDIATELY": PRINT "DISCARD IT, AND THEN CONTINUE ON TO  THE": PRINT "NEXT STEP": GOSUB 1490
 1320  PRINT "AFTER YOU HAVE DRAW YOUR CARD(S) AND YOU": PRINT "HAVE DISCARDED THE QUEEN OR FOUR (IF  IT": PRINT "IS NECESSARY), YOU MUST DISCARD  ANOTHER": PRINT "CARD ON ANY ONE OF THE FOUR PILES.": PRINT 
 1330  PRINT "IF YOU  DREW  FROM THE  STACK,  YOU  MAY": PRINT "DISCARD THE CARD YOU DREW.  IF YOU  DREW": PRINT "FROM ONE OF THE DISCARD PILES, YOU  MUST": PRINT "KEEP THAT CARD.": PRINT 
 1340  PRINT "TO DECLARE  WHICH CARD  YOU  WANT TO GET": PRINT "RID OF,  YOU ENTER  THE RANK FOLLOWED BY": PRINT "THE INITIAL OF THE SUIT,  I.E.,  'QH' IS": PRINT "THE QUEEN OF HEARTS"
 1350  GOSUB 1490
 1360  PRINT "PLAY CONTINUES UNTIL SOMEONE DESIRES  TO": PRINT "DRAW FROM THE STACK, AND CANNOT. AT THAT": PRINT "TIME, THE CARDS OF ALL FOUR PLAYERS  ARE": PRINT "REVEALED  AND  COMPARED BY THE FOLLOWING": PRINT "SCALE--": PRINT 
 1370  PRINT : PRINT : PRINT "1.  THE BEST HAND IS A ROYAL FIZZBIN. IT": PRINT "    CONSISTS OF A KING AND A TWO, (OR  A": PRINT "    QUEEN AND A FOUR AT NIGHT),  AND ANY"
 1380  PRINT "    TWO PAIRS OF ACES, JACKS, OR SEVENS.": PRINT "    SUCH AS: K2AA77  K2AAJJ  K277JJ     "
 1390  GOSUB 1490
 1400  PRINT "2.  THE NEXT BEST HAND IS A FULL FIZZBIN": PRINT "    IT IS A KING AND A TWO,  (OR A QUEEN": PRINT "    A FOUR AT NIGHT),  AND ANY  ONE PAIR": PRINT "    OF ACES, JACKS, OR SEVENS.": PRINT : PRINT "    SUCH AS:  K277  K2JJ  K2AA": PRINT 
 1410  PRINT : PRINT : PRINT "3.  THE NEXT HAND IS THE  THREE-QUARTERS": PRINT "    FIZZBIN, WHICH CONSISTS OF A  THREE,": PRINT "    A FIVE, A SIX, AN EIGHT, A NINE, AND": PRINT "    A TEN, ALL RED, EXCEPT AT NIGHT WHEN"
 1420  PRINT "    THEY MUST ALL BE BLACK.":
 1430  GOSUB 1490
 1440  PRINT "4.  THE LOWEST WINNING HAND IS THE HALF-": PRINT "    FIZZBIN, WHICH CONSISTS OF  ANY PAIR": PRINT "    OF SEVENS, JACKS, OR ACES.": PRINT : PRINT "    SUCH AS: 77 JJ AA": PRINT : PRINT : PRINT 
 1450  PRINT "5.  THE WORST HAND OF ALL IS *ANY* THREE": PRINT "    OR FOUR OF A KIND. THAT IS A SHRONK,": PRINT "    ANY YOU AUTOMATICALLY LOSE.": PRINT 
 1460  GOSUB 1490
 1470  VTAB 5: PRINT "AS YOU CAN SEE, FIZZBIN IS ESSENTIALLY A": PRINT "VERY SIMPLE GAME.   FURTHERMORE,  IF YOU": PRINT "DON'T DO VERY WELL IN ONE HAND,  YOU CAN"
 1480  PRINT "ALWAYS  TRY AGAIN AFTER THE  TRADITIONAL": PRINT "CHALLENGE--": PRINT : INVERSE : HTAB 9: PRINT "BEST TWO OUT OF THREE?": NORMAL : RETURN 
 1490  VTAB 24: PRINT "(HIT ANY KEY TO CONTINUE)";: GET A$: PRINT : HOME : RETURN 
Newsgroups: rec.arts.startrek.misc