image of READY prompt

Wang2200.org

Listing of file='YAHTZEE' on disk='vmedia/more_games.wvd.zip'

# Sector 1541, program filename = 'YAHTZEE'
0010 REM *YAHTZEE*
   : LOAD DC T#6,"GAMES"
0020 SELECT PRINT 005(64)
0030 DIM A$(18)9,F(3,62),C$(18,5)3,K$1,B$(5)10,V$(4),H$(30)1,F$(3)62,N$1,G$(5)
     1,G1$(5)1,M$(6)1,P$(6)1,H1$2
   : INIT(30)H$()
0040 PRINT HEX(030A0A);TAB(25);"*** YAHTZEE ***"
   : FOR X=1TO 250
   : NEXT X
   : PRINT HEX(0A)
0050 INPUT "WOULD YOU LIKE TO READ THE INSTRUCTIONS",K$
   : IF K$="Y"THEN 70
   : GOTO 580
0060 REM %  *** INSTRUCTIONS
0070 PRINT HEX(0A)
   : INPUT "WOULD YOU LIKE A HARD-COPY PRINTOUT OF THE INSTRUCTIONS",K$
   : IF K$="Y"THEN 90
   : IF K$<>"N"THEN 80
   : PRINT HEX(03)
   : GOTO 130
0080 PRINT HEX(0C);TAB(63);HEX(20)
   : PRINT HEX(0C07);"PLEASE ANSWER YES OR NO"
   : FOR X=1TO 500
   : NEXT X
   : PRINT HEX(0C);TAB(63);HEX(20)
   : PRINT HEX(0C0C);
   : GOTO 70
0090 PRINT HEX(0A);
   : INPUT "WILL THIS BE PRINTED ON A LINE PRINTER(P) OR A TYPEWRITER(T)",T$
   : IF T$="T"THEN 120
   : IF T$<>"P"THEN 110
0100 PRINT HEX(03)
   : SELECT PRINT 215(64)
   : GOTO 140
0110 PRINT HEX(0C);TAB(63);HEX(20)
   : PRINT HEX(0C07);"PLEASE ANSWER 'P' OR 'T'"
   : FOR X=1TO 500
   : NEXT X
   : PRINT HEX(0C);TAB(63);HEX(20)
   : PRINT HEX(0C0C);
   : GOTO 90
0120 PRINT HEX(03)
   : SELECT PRINT 211(64)
   : GOTO 140
0130 PRINT HEX(03)
0140 PRINT TAB(25);"INSTRUCTIONS"
   : PRINT HEX(0A);TAB(5);"YAHTZEE MAY BE PLAYED BY 1 TO 5 PLAYERS. EACH PLAYE
     R ROLLS";
0150 PRINT "FIVE DICE ON HIS FIRST TURN, KEEPS THE DICE HE WANTS AND ROLLS  AG
     AIN - A MAXIMUM OF 3 ROLLS. AND IT'S THE SKILLFUL USE OF THIS";
0160 PRINT "OPTION THAT CAN TURN AN UNLUCKY ROLL INTO A HIGH-SCORING TURN.  TH
     E PLAYER WITH THE HIGHEST SCORE WINS, SO DETERMINING WHERE TO SCORE IS CR
     ITICAL."
   : IF K$="Y"THEN 200
0170 PRINT HEX(0A0A);TAB(20);"PRESS 'EXECUTE' TO CONTINUE"
0180 KEYIN K$,190,190
   : GOTO 180
0190 PRINT HEX(03)
0200 PRINT TAB(25);"SCORING"
   : PRINT "THE SCORE PAD IS DIVIDED INTO TWO SECTIONS (LEFT AND RIGHT). IN TH
     E LEFT SECTION THERE ARE SPACES TO SCORE ACES, TWOS, THREES,  FOURS, FIVE
     S AND SIXES.";
0210 PRINT "THE PLAYER COUNTS AND ADDS ONLY THE DICE WITH THE SAME NUMBER   AN
     D THE COMPUTER WILL PLACE THE TOTAL IN THE APPROPRIATE SPACE.";
0220 PRINT "THUS IF THE THREE'S BOX IS CHOSEN, THE ROLL 2,5,3,3,3 WILL SCORE9
     FOR THE 3'S.";
0230 PRINT "A BONUS OF 35 POINTS MAY BE EARNED IF THE TOTAL OF THE LEFT     SE
     CTION IS 63 OR GREATER. 63 MAY BE SCORED BY GETTING A MINIMUM OF 3 OF A K
     IND FOR EACH NUMBER 1 TO 6.";
0240 PRINT "IF AT THE END OF YOUR TURN THERE IS NO BOX OPEN THAT YOU MEET";
   : PRINT "THE REQUIREMENTS OF, YOU MUST FILL AN EMPTY BOX WITH A ZERO.";
   : IF K$="Y"THEN 280
0250 PRINT
   : PRINT TAB(20);"PRESS 'EXECUTE' TO CONTINUE"
0260 KEYIN K$,270,270
   : GOTO 260
0270 PRINT HEX(03)
0280 PRINT "THE RIGHT SECTION IS PLAYED EXACTLY AS SHOWN ON THE SCREEN.";
0290 PRINT "*    3 OF A KIND MAY BE CHOSEN ONLY WHEN A ROLL INCLUDES ANY 3  OF
      A KIND. THE TOTAL OF ALL THE DICE IS SCORED,EG, 4,4,4,3,2    WOULD SCORE
      AS 17.";
0300 PRINT "*    4 OF A KIND SCORES THE TOTAL OF ALL 5 DICE PROVIDED THEY   IN
     CLUDE ANY 4 OF A KIND,EG, 5,5,5,5,2 WOULD SCORE AS 22.";
0310 PRINT "*    FULL HOUSE MAY BE CHOSEN ONLY WHEN THE ROLL INCLUDES ANY   3
     OF A KIND AND ANY PAIR. SCORE 25.";
0320 PRINT "*    SMALL STRAIGHT IS ANY SEQUENCE OF 4 NUMBERS. SCORE 30.     *
        LARGE STRAIGHT IS ANY SEQUENCE OF 5 NUMBERS. SCORE 40.";
0330 PRINT "*    YAHTZEE IS ANY 5 OF A KIND. SCORE 50.";
0340 PRINT "*    CHANCE IS THE OPPORTUNITY THE PLAYER HAS TO SCORE ON ANY   TU
     RN WHICH DOESN'T FILL ANY OTHER REQUIREMENT. SCORE BY TOTALINGNUMBER OF P
     OINTS ON ALL DICE."
   : IF K$="Y"THEN 380
0350 PRINT TAB(20);"PRESS 'EXECUTE' TO CONTINUE"
0360 KEYIN K$,370,370
   : GOTO 360
0370 PRINT HEX(03)
0380 PRINT "     IF THE PLAYER SHOULD THROW A YAHTZEE FOR THE FIRST TIME ANDTH
     E YAHTZEE BOX HAS PREVIOUSLY BEEN FILLED WITH A ZERO AND THE";
0390 PRINT "APPROPRIATE NUMBERED BOX OF THE LEFT SECTION HAS BEEN USED, HE";
0400 PRINT "MAY USE THIS TURN AS A JOKER AND MARK HIS SCORE IN ANY OF THE   BO
     XES OPEN IN THE RIGHT SECTION. FOR EXAMPLE, IF HE HAS FIVE 4'SHE MAY SCOR
     E 20 POINTS FOR 3 OF A KIND,";
0410 PRINT " 4 OF A KIND OR CHANCE";
0420 PRINT "OR SCORE 25 POINTS FOR FULL HOUSE 30 POINTS FOR SMALL STRAIGHT  OR
      40 POINTS FOR LARGE STRAIGHT.";
0430 PRINT "     IF ALL OF THE BOXES IN THE RIGHT SECTION ARE FILLED HE MUSTEN
     TER A ZERO IN A BOX IN THE LEFT SECTION. HE DOES NOT RECEIVE ABONUS CHIP.
     ";
0440 PRINT "     IF A PLAYER ROLLS A SECOND YAHTZEE HE RECEIVES A 100 POINT BO
     NUS CHIP AND USES THIS TURN AS JOKER. SCORED AS DESCRIBED     ABOVE.";
   : IF K$="Y"THEN 480
0450 PRINT "       PRESS 'EXECUTE' TO CONTINUE"
0460 KEYIN K$,470,470
   : GOTO 460
0470 PRINT HEX(03)
0480 PRINT "     WHEN IT IS YOUR TURN PRESS 'EXECUTE' TO ROLL THE DICE, THENEN
     TER THE DICE YOU WISH TO KEEP. AFTER YOU ENTER EACH NUMBER A  COMMA WILL
     ";
0490 PRINT "APPEAR AND YOU MAY THEN ENTER THE NEXT NUMBER.";
0500 PRINT "     ENTER A CARRIAGE RETURN AFTER THE LAST NUMBER HAS BEEN     EN
     TERED. THE DICE YOU HAVE CHOSEN WILL APPEAR IN THE BOX ON THE RIGHT OF TH
     E SCORE PAD.";
0510 PRINT "     AFTER EACH ROLL YOU MUST ENTER ALL OF THE DICE YOU WISH TO";
0520 PRINT "KEEP (EVEN THOSE ENTERED ON THE PREVIOUS TURN).";
0530 PRINT "     IF YOU ENTER THE WRONG NUMBER YOU MAY BACKSPACE TO DELETE  IT
      AND ENTER THE CORRECT NUMBER.";
0540 PRINT "     IF YOU DO NOT WISH TO KEEP ANY OF THE DICE ENTER AN 'N'    IN
     STEAD OF A NUMBER. IF YOU ANSWER 'NO I DO NOT WANT TO ROLL";
0550 PRINT "AGAIN' THEN CHANGE YOUR MIND, ENTER AN 'N' AND YOU WILL RECEIVE YO
     UR REMAINING ROLLS."
0560 SELECT PRINT 005(64)
   : PRINT TAB(20);"PRESS 'EXECUTE' TO START GAME"
0570 KEYIN K$,580,580
   : GOTO 570
0580 REM $
0590 REM ** YAHTZEE
0600 SELECT PRINT 005(64)
0610 INIT(2D)C$()
   : J=0
   : A1=0
0620 FOR I=1TO 30
   : J=J+1
   : CONVERT JTO H$(I),(#)
   : IF J>=6THEN 630
   : NEXT I
   : GOTO 640
0630 J=0
   : NEXT I
0640 REM % *** INPUT PLAYER'S NAMES
0650 PRINT HEX(03)
   : INPUT "HOW MANY PLAYERS",K$
   : IF NUM(K$)<LEN(K$)THEN 650
   : CONVERT K$TO K
   : IF K<=5THEN 660
   : PRINT "ONLY 5 PLAYERS PLEASE"
   : FOR X=1TO 15
   : PRINT HEX(07)
   : FOR Y=1TO 50
   : NEXT Y
   : NEXT X
   : GOTO 650
0660 IF K<=0THEN 650
   : FOR X=1TO K
   : PRINT "PLAYER NUMBER ";X;"'S NAME";
   : INPUT B$(X)
   : NEXT X
   : L=1
   : GOSUB '01
0670 REM % *** DISPLAY
0680 SELECT PRINT 005
   : PRINT HEX(01);TAB(63);HEX(20)
   : SELECT PRINT 405
   : PRINT HEX(01)
   : FOR X=1TO 25
   : PRINT HEX(09);
   : NEXT X
   : PRINT B$(L);HEX(0D0A);
   : FOR X=1TO 16
   : PRINT HEX(09);
   : NEXT X
   : PRINT HEX(0A0A0A0A);
   : FOR I=1TO 9
   : PRINT HEX(0A080808);C$(I,L);
   : NEXT I
   : PRINT HEX(0D0A);
0690 FOR X=1TO 46
   : PRINT HEX(09);
   : NEXT X
   : FOR I=18TO 10STEP -1
   : PRINT HEX(0C080808);C$(I,L);
   : NEXT I
   : PRINT HEX(0A0A0A0A09090909092020202020202020200C0C0C0C);
   : FOR X=1TO 13
   : PRINT HEX(08);
   : NEXT X
   : IF A1=1THEN 1730
0700 PRINT HEX(0C0C0C);
   : FOR I=1TO 32
   : PRINT HEX(08);
   : NEXT I
   : PRINT "PRESS 'EXECUTE' TO ROLL DICE";HEX(010A)
   : Y=0
0710 REM % *** MAIN PROGRAM
0720 FOR I=1TO 4
   : IF V$(I)=HEX(20)THEN 730
   : Y=Y+1
   : NEXT I
   : P=1
   : GOTO 740
0730 P=5-Y
   : I=5
   : NEXT I
0740 INIT(20)G$(),F$()
   : KEYIN K$,750,750
0750 KEYIN K$,760,760
   : FOR I=1TO P
   : G$(I)=H$(INT(30*RND(1))+1)
   : NEXT I
   : GOTO 750
0760 IF J<=0THEN 790
   : IF J>3THEN 790
   : SELECT PRINT 005(64)
   : PRINT HEX(0A0A);TAB(63);HEX(20)
   : PRINT HEX(0C0C0C0C)
   : PRINT
   : SELECT PRINT 405
   : FOR I=1TO P
0770 M=INT(60*RND(1))
   : IF M<=1THEN 770
   : IF STR(F$(J),M,1)<>HEX(20)THEN 770
   : STR(F$(J),M,1)=G$(I)
   : STR(F$(J),M-1,1),STR(F$(J),M+1,1)=HEX(7C)
   : J=J+1
   : IF J>3THEN 780
   : NEXT I
   : FOR X=1TO 3
   : PRINT F$(X);HEX(0D0A);
   : NEXT X
   : GOTO 800
0780 J=1
   : NEXT I
   : FOR X=1TO 3
   : PRINT F$(X);HEX(0D0A);
   : NEXT X
   : GOTO 800
0790 J=1
   : GOTO 760
0800 N=N+1
   : IF N>=3THEN 960
0810 INPUT "WOULD YOU LIKE TO ROLL AGAIN",K$
   : IF K$="Y"THEN 820
   : IF K$="N"THEN 970
   : PRINT HEX(070C);
   : SELECT PRINT 005
   : PRINT TAB(63);HEX(20)
   : SELECT PRINT 405
   : PRINT HEX(0C);
   : GOTO 810
0820 PRINT HEX(0C);"WHICH DIE DO YOU WISH TO KEEP? ";
   : IF N=1THEN 870
   : GOSUB 830
   : J=1
   : GOTO 850
0830 FOR I=1TO 4
   : IF V$(I)=HEX(20)THEN 840
   : NEXT I
0840 I=I-1
   : RETURN
0850 FOR X=1TO 5
   : IF G$(X)=HEX(20)THEN 860
   : NEXT X
   : GOTO 870
0860 G$(X)=V$(J)
   : J=J+1
   : NEXT X
0870 I=0
   : INIT(20)V$(),G1$()
   : FOR X=1TO 5
   : G1$(X)=G$(X)
   : NEXT X
0880 KEYIN K$,890,890
   : GOTO 880
0890 IF K$="N"THEN 920
   : IF K$=HEX(0D)THEN 900
   : IF K$=HEX(08)THEN 950
   : I=I+1
   : IF I>=5THEN 930
   : V$(I)=K$
   : PRINT K$;",";
   : GOTO 880
0900 FOR J=1TO I
   : FOR X=1TO 5
   : IF V$(J)=G$(X)THEN 910
   : NEXT X
   : SELECT PRINT 005
   : PRINT HEX(07);TAB(63);HEX(20)
   : PRINT HEX(0C);"ERROR PLEASE REENTER"
   : SELECT PRINT 405
   : J=I+1
   : NEXT J
   : FOR X=1TO 500
   : NEXT X
   : FOR X=1TO 5
   : G$(X)=G1$(X)
   : NEXT X
   : GOTO 820
0910 INIT(20)G$(X)
   : X=6
   : NEXT X
   : NEXT J
   : PRINT
   : SELECT PRINT 005
   : PRINT TAB(52);
   : PRINT HEX(0A0A0A0A0A);
   : FOR I=1TO 4
   : PRINT V$(I);HEX(20);
   : NEXT I
   : PRINT
0920 GOSUB '2
   : GOTO 700
0930 PRINT
   : PRINT HEX(0C07);"ERROR - IF YOU WANT TO KEEP ALL 5 YOU CAN'T ROLL AGAIN."
     ;HEX(0A0D);
   : PRINT HEX(0C)
   : FOR X=1TO 350
   : NEXT X
   : SELECT PRINT 005
   : PRINT TAB(63);HEX(20)
   : SELECT PRINT 405
   : PRINT HEX(0C)
   : GOTO 810
0940 REM % *** SCORING
0950 PRINT HEX(080820200808);
   : V$(I)=HEX(20)
   : I=I-1
   : GOTO 880
0960 PRINT HEX(0D0A);
0970 PRINT HEX(0C);
   : INIT(30)H1$
   : INPUT "ENTER NUMBER OF BOX YOU WISH TO SCORE",H1$
   : IF H1$="N"THEN 980
   : IF NUM(H1$)<LEN(H1$)THEN 990
   : CONVERT H1$TO H
   : IF H>13THEN 990
   : IF H<=0THEN 990
   : IF H=12THEN 1010
   : IF H>6THEN 1000
   : IF C$(H,L)<>HEX(2D2D2D)THEN 1020
   : GOTO 1010
0980 SELECT PRINT 005
   : PRINT HEX(0C);TAB(63);HEX(20)
   : SELECT PRINT 405
   : PRINT HEX(0C)
   : GOTO 810
0990 SELECT PRINT 005
   : PRINT HEX(0C);TAB(63);HEX(20)
   : SELECT PRINT 405
   : PRINT HEX(0C07);"ERROR PLEASE REENTER";HEX(0D0A);
   : FOR X=1TO 250
   : NEXT X
   : GOTO 970
1000 IF C$(H+3,L)<>HEX(2D2D2D)THEN 1020
1010 T=0
   : J=1
   : GOSUB 1030
   : ON HGOTO 1060,1060,1060,1060,1060,1060,1170,1190,1240,1330,1410,1470,1580
1020 SELECT PRINT 005
   : PRINT HEX(0C);TAB(63);HEX(20)
   : SELECT PRINT 405
   : PRINT HEX(0C07);"THIS HAS ALREADY BEEN TAKEN";HEX(0D0A);
   : FOR X=1TO 500
   : NEXT X
   : GOTO 970
1030 FOR I=1TO 5
   : IF G$(I)=HEX(20)THEN 1040
   : NEXT I
   : RETURN
1040 G$(I)=V$(J)
   : J=J+1
   : NEXT I
   : RETURN
1050 REM %  LEFT SECTION
1060 CONVERT HTO N$,(#)
   : FOR I=1TO 5
   : IF G$(I)=N$THEN 1070
   : NEXT I
   : GOTO 1620
1070 I=6
   : NEXT I
   : FOR I=1TO 5
   : IF G$(I)=N$THEN 1080
   : NEXT I
   : GOTO 1090
1080 T=T+H
   : NEXT I
1090 CONVERT TTO C$(H,L),(###)
   : T=0
1100 FOR I=1TO 6
   : IF C$(I,L)=HEX(2D2D2D)THEN 1710
   : NEXT I
   : FOR I=1TO 6
   : CONVERT C$(I,L)TO R
   : T=T+R
   : NEXT I
   : CONVERT TTO C$(7,L),(###)
   : IF T>=63THEN 1110
   : GOTO 1120
1110 C$(8,L)="035"
   : T=T+35
   : CONVERT TTO C$(9,L),(###)
   : GOTO 1130
1120 C$(9,L)=C$(7,L)
1130 IF C$(17,L)<>HEX(2D2D2D)THEN 1140
   : GOTO 1720
1140 CONVERT C$(9,L)TO T
   : CONVERT C$(17,L)TO R
   : T=T+R
   : CONVERT TTO C$(18,L),(###)
   : IF L=KTHEN 1660
   : GOTO 1720
1150 REM %  RIGHT SECTION
1160 REM           3 OF A KIND
1170 S=3
   : GOTO 1200
1180 REM           4 OF A KIND
1190 S=4
1200 FOR I=1TO 5
   : FOR J=1TO 5
   : IF G$(I)=G$(J)THEN 1210
   : NEXT J
   : T=0
   : NEXT I
   : GOTO 1620
1210 T=T+1
   : IF T>=STHEN 1220
   : NEXT J
   : T=0
   : NEXT I
   : GOTO 1620
1220 J=6
   : I=6
   : NEXT J
   : NEXT I
   : T=0
   : FOR I=1TO 5
   : CONVERT G$(I)TO R
   : T=T+R
   : NEXT I
   : CONVERT TTO C$(H+3,L),(###)
   : GOTO 1590
1230 REM           FULL HOUSE
1240 T=1
   : F=0
1250 FOR I=2TO 5
   : IF G$(I)=G$(1)THEN 1260
   : IF G$(I)<>G$(1)THEN 1270
   : NEXT I
   : GOTO 1280
1260 T=T+1
   : NEXT I
   : GOTO 1280
1270 F=I
   : NEXT I
1280 IF T=2THEN 1290
   : IF T=3THEN 1290
   : GOTO 1620
1290 FOR I=1TO 5
   : IF G$(I)=G$(F)THEN 1300
   : NEXT I
   : GOTO 1310
1300 T=T+1
   : NEXT I
1310 IF T<>5THEN 1620
   : C$(12,L)="025"
   : GOTO 1590
1320 REM           SM STRAIGHT
1330 FOR I=1TO 6
   : CONVERT ITO M$(I),(#)
   : CONVERT ITO P$(I),(#)
   : NEXT I
1340 FOR I=1TO 5
   : IF M$(VAL(G$(I))-48)=HEX(20)THEN 1350
   : M$(VAL(G$(I))-48)=HEX(20)
   : NEXT I
   : GOTO 1370
1350 IF P$(VAL(G$(I))-48)=HEX(20)THEN 1360
   : P$(VAL(G$(I))-48)=HEX(20)
   : NEXT I
   : GOTO 1370
1360 I=6
   : NEXT I
   : GOTO 1620
1370 IF M$(3)<>HEX(20)THEN 1620
   : IF M$(4)<>HEX(20)THEN 1620
   : IF M$(2)<>HEX(20)THEN 1380
   : IF M$(1)=HEX(20)THEN 1390
   : IF M$(5)=HEX(20)THEN 1390
   : GOTO 1620
1380 IF M$(5)<>HEX(20)THEN 1620
   : IF M$(6)<>HEX(20)THEN 1620
1390 C$(13,L)="030"
   : GOTO 1590
1400 REM           LG STRAIGHT
1410 INIT(20)M$()
   : FOR I=1TO 5
   : IF G$(I)="1"THEN 1430
   : NEXT I
1420 FOR I=1TO 5
   : IF G$(I)="2"THEN 1440
   : NEXT I
   : GOTO 1620
1430 I=6
   : NEXT I
   : FOR I=1TO 5
   : CONVERT ITO M$(I),(#)
   : NEXT I
   : FOR I=1TO 5
   : IF M$(VAL(G$(I))-48)=HEX(20)THEN 1610
   : M$(VAL(G$(I))-48)=HEX(20)
   : NEXT I
   : GOTO 1450
1440 I=6
   : NEXT I
   : FOR I=2TO 6
   : CONVERT ITO M$(I),(#)
   : NEXT I
   : FOR I=1TO 5
   : IF M$(VAL(G$(I))-48)=HEX(20)THEN 1610
   : M$(VAL(G$(I))-48)=HEX(20)
   : NEXT I
1450 C$(14,L)="040"
   : GOTO 1590
1460 REM           YAHTZEE
1470 FOR I=1TO 5
   : IF G$(I)<>G$(1)THEN 1610
   : NEXT I
   : IF C$(15,L)<>HEX(2D2D2D)THEN 1480
   : C$(15,L)="050"
   : GOTO 1590
1480 IF C$(15,L)="000"THEN 1510
1490 CONVERT C$(15,L)TO Z1
   : Z1=Z1+100
   : CONVERT Z1TO C$(15,L),(###)
   : GOTO 1510
1500 PRINT HEX(0C)
1510 PRINT HEX(0C);"THIS MAY BE USED TO SCORE IN THE ";G$(1);"'S BOX OR IN RIG
     HT SECTION";HEX(0D0A);
   : INPUT "WHICH BOX",H
   : IF H>6THEN 1520
   : IF C$(H,L)<>HEX(2D2D2D)THEN 1500
   : CONVERT G$(1)TO T
   : IF T<>HTHEN 1510
   : CONVERT 5*HTO C$(H,L),(###)
   : GOTO 1590
1520 H=H+3
   : IF C$(H,L)<>HEX(2D2D2D)THEN 1500
   : IF H=10THEN 1530
   : IF H=11THEN 1530
   : IF H=16THEN 1530
   : IF H=12THEN 1540
   : IF H=13THEN 1550
   : IF H=14THEN 1560
1530 CONVERT G$(1)TO Z1
   : CONVERT 5*Z1TO C$(H,L),(###)
   : GOTO 1590
1540 C$(H,L)="025"
   : GOTO 1590
1550 C$(H,L)="030"
   : GOTO 1590
1560 C$(H,L)="040"
   : GOTO 1590
1570 REM           CHANCE
1580 FOR I=1TO 5
   : CONVERT G$(I)TO R
   : T=T+R
   : NEXT I
   : CONVERT TTO C$(16,L),(###)
1590 FOR I=10TO 16
   : IF C$(I,L)=HEX(2D2D2D)THEN 1700
   : NEXT I
   : FOR I=10TO 16
   : CONVERT C$(I,L)TO R
   : T=T+R
   : NEXT I
   : CONVERT TTO C$(17,L),(###)
   : IF C$(7,L)<>HEX(2D2D2D)THEN 1600
   : GOTO 1720
1600 CONVERT C$(9,L)TO T
   : CONVERT C$(17,L)TO R
   : CONVERT T+RTO C$(18,L),(###)
   : IF L+1>KTHEN 1660
   : T=0
   : GOTO 1720
1610 I=5
   : NEXT I
1620 PRINT HEX(0C07);"THIS ROLL WILL GIVE YOU A ZERO, DO YOU WANT THAT";
   : INPUT K$
   : IF K$="Y"THEN 1630
   : SELECT PRINT 005
   : PRINT HEX(0C);TAB(63);HEX(20)
   : SELECT PRINT 405
   : IF K$="N"THEN 970
   : PRINT HEX(0C07);"PLEASE ANSWER YES OR NO"
   : FOR X=1TO 250
   : NEXT I
   : GOTO 1620
1630 IF H>6THEN 1640
   : C$(H,L)="000"
   : GOTO 1100
1640 C$(H+3,L)="000"
   : GOTO 1590
1650 REM % *** ENDING ROUTINE
1660 SELECT PRINT 005(64)
   : PRINT HEX(0307)
   : L=K
1670 J=1
   : GOSUB 1680
   : PRINT HEX(0A0A);TAB(10);B$(J);TAB(25);C$(18,J)
   : C$(18,J)="000"
   : L=L-1
   : IF L=0THEN 1850
   : GOTO 1670
1680 FOR I=1TO K
   : IF C$(18,J)<C$(18,I)THEN 1690
   : NEXT I
   : RETURN
1690 J=J+1
   : I=6
   : NEXT I
   : GOTO 1680
1700 I=16
   : NEXT I
   : GOTO 1720
1710 I=6
   : NEXT I
1720 GOSUB '2
   : A1=1
   : GOTO 680
1730 A1,T,N=0
   : L=L+1
   : IF L>KTHEN 1740
   : GOTO 1750
1740 L=1
1750 FOR X=1TO 500
   : NEXT X
   : GOSUB '2
   : INIT(20)V$()
   : GOTO 680
1760 DEFFN'1
1770 PRINT HEX(030A0A0A0A0A0A);"   1 ACES";TAB(28);"7 3 OF A KIND"
1780 PRINT "   2 TWOS";TAB(28);"8 4 OF A KIND"
   : PRINT "   3 THREES";TAB(28);"9 FULL HOUSE"
1790 PRINT "   4 FOURS";TAB(27);"10 SM STRAIGHT";TAB(49);
   : FOR I=1TO 13
   : PRINT HEX(2D);
   : NEXT I
   : PRINT
1800 PRINT "   5 FIVES";TAB(27);"11 LG STRAIGHT";TAB(49);HEX(7C);TAB(61);HEX(7
     C)
1810 PRINT "   6 SIXES";TAB(27);"12 YAHTZEE";TAB(49);
   : FOR I=1TO 13
   : PRINT HEX(2D);
   : NEXT I
   : PRINT
1820 PRINT "     TOTAL";TAB(27);"13 CHANCE"
   : PRINT "     BONUS";TAB(30);"TOTAL"
1830 PRINT "     TOTAL";TAB(30);"GRAND TOTAL";HEX(01)
   : RETURN
1840 DEFFN'2
   : SELECT PRINT 005
   : PRINT HEX(010A)
   : FOR X=1TO 5
   : PRINT TAB(63);HEX(20)
   : NEXT X
   : SELECT PRINT 405
   : FOR X=1TO 44
   : PRINT HEX(09);
   : NEXT X
   : RETURN
1850 PRINT HEX(0A0A0A)
   : INPUT "WOULD YOU LIKE TO PLAY AGAIN (Y OR N)",K$
   : IF K$="N"THEN 10
   : IF K$="Y"THEN 1860
   : PRINT HEX(07);"PLEASE ANSWER Y OR N"
   : PRINT HEX(0C0C0C0C)
   : GOTO 1850
1860 INIT(2D)C$()
   : N=0
   : INIT(20)V$(),G$(),F$()
   : SELECT PRINT 005
   : GOTO 650