Compucolor.org – Virtual Media

Listing of file='YATZEE.BAS;01' on disk='vmedia/ncc_8-sector.ccvf'

1 REM  SEE 30000 SERIES LINES FOR COMMENTS
5 CLEAR 256
10 DIM C(5):DIM K(18,7):DIM F(5):DIM A$(7)
15 DIM S(6,5):DIM M(13)
20 GOSUB 6300:PLOT 27,24
30 C1= 39:C2= 63:C3= 33:C4= 56
35 GOSUB 4200
40 PLOT 6,C1,12:GOSUB 4000
70 PLOT 27,4:PRINT "LOAD YATZEE.DSP":PLOT 27,24
80 PLOT 6,C1,3,0,25,11,6,C4
90 INPUT "HOW MANY PLAYERS?  ";N:N= INT (N)
100 IF N< 1OR N> 7THEN 80
105 IF N< 7THEN GOSUB 11300
106 IF CC= 1THEN GOSUB 7300
110 FOR A= 1TO N
120 PLOT 6,C1,3,0,25,11,6,C4
130 PRINT "PLAYER NUMBER "A;" NAME PLEASE  ";
140 INPUT A$(A):IF A$(A)= ""THEN 120
150 NEXT A
155 IF CC= 1THEN N= N+ 1:A$(N)= "COMPUCOLOR"
160 PLOT 6,C1,3,0,25,11,6,C4
170 A= 0
200 REM
201 REM   NEXT ROLL PRESET
202 REM
210 A= A+ 1:IF A> NTHEN A= 1
220 H= 0:GOSUB 7100
230 IF A= 0THEN 6000
235 IF K(18,A)= 2THEN 210
240 PLOT 6,C1
250 FOR Y= 29TO 25STEP - 1
260 PLOT 3,0,Y,11
270 NEXT Y
280 PLOT 6,39,3,5* (A- 1)+ 15,25
290 PRINT A$(A)
300 REM
301 REM   INITIAL ROLL
302 REM
310 H= H+ 1:MR= 0
320 FOR B= 1TO 5
330 J= B- 1:C(B)= INT (6* RND (1)+ 1)
340 DIE= C(B):F(B)= 0
350 GOSUB 7000
360 GOSUB 8000
370 NEXT B
380 IF A* CC= NTHEN 1000
400 REM
401 REM  PLAYER SELECTS QTY TO ROLL
402 REM
410 PLOT 6,C1,3,0,28,11,28,11,28:PRINT "  ":PLOT 6,C4
420 IF H> 2THEN 700
430 INPUT " HOW MANY DICE TO ROLL AGAIN?  ";F:F= INT (F)
435 IF F= - 1THEN GOSUB 35000
440 IF F< 0OR F> 5THEN 410
450 IF F= 0THEN 700
460 IF F= 5THEN 300
500 REM
501 REM  PLAYER SELECTS DICE TO ROLL
502 REM
510 H= H+ 1
520 PLOT 6,C1,3,0,28,11,6,C4
530 PRINT " ROLL WHICH DICE AGAIN        ";
540 ON FGOTO 565,560,555,550
550 INPUT F(1),F(2),F(3),F(4):GOTO 570
555 INPUT F(1),F(2),F(3):GOTO 570
560 INPUT F(1),F(2):GOTO 570
565 INPUT F(1)
570 X= 2
575 FOR J= 1TO F
580 IF F(J)= F(J+ 1)THEN X= 1
585 NEXT J
590 ON XGOTO 520,600
600 REM
601 REM  PLAYER ROLLS DICE AGAIN
602 REM
610 FOR B= 1TO 4
620 IF F(B)= 0THEN 680
630 C(F(B))= INT (6* RND (1)+ 1)
640 DIE= C(F(B)):J= F(B)- 1
650 GOSUB 7000
660 GOSUB 8000
670 F(B)= 0
680 NEXT B
690 GOTO 400
700 REM
701 REM   PLAY BOARD NUMBER
702 REM
710 PLOT 6,C1,3,0,29,11,28,11,28,11,6,C4
720 INPUT " PLAY BOARD NUMBER?  ";I:I= INT (I)
725 IF I= - 1THEN GOSUB 35000
730 IF I< 1OR I> 13THEN 710
735 IF I= 12AND K(12,A)> - 1THEN 1000
740 IF K(I,A)= 0THEN 1000
750 PLOT 3,0,27
760 PRINT "NO - NO - DUMMY - - TRY AGAIN"
770 PLOT 6,C1,3,0,26,11,6,C4
780 GOTO 720
1000 REM
1001 REM  DICE LOGIC
1002 REM  CLEAR/SET S(M,K)
1003 REM
1010 FOR M= 0TO 6
1020 FOR K= 0TO 5
1030 S(M,K)= 0
1040 NEXT K
1050 NEXT M
1060 FOR J= 1TO 5
1070 X= C(J):S(X,0)= S(X,0)+ 1
1080 P= S(X,0):S(X,P)= J
1090 NEXT J
1100 REM
1101 REM  SET S(0,K)=M SEQUENCE BY QTY
1102 REM
1110 X= 0
1120 FOR J= 5TO 1STEP - 1
1130 FOR M= 6TO 1STEP - 1
1140 IF S(M,0)< > JTHEN 1160
1150 S(0,X)= M:X= X+ 1
1160 NEXT M
1170 NEXT J
1180 IF A* CC= NTHEN 1500
1190 IF I> 6THEN 1300
1200 REM
1201 REM  CHECK PLAYER BOARD 1-6
1202 REM
1210 GOSUB 14100
1220 IF X= - 1THEN 1420
1230 K(I,A)= I* S(S(0,X),0)
1240 GOTO 2700
1300 REM
1301 REM  CHECK PLAYER BOARD 7-13
1302 REM
1320 ON I- 6GOTO 1330,1340,1350,1360,1370,1380,1390
1330 IF S(S(0,0),0)< 3THEN 1420
1335 GOSUB 14200:GOTO 2700
1340 IF S(S(0,0),0)< 4THEN 1420
1345 GOSUB 14200:GOTO 2700
1350 IF S(S(0,0),0)< > 3OR S(S(0,1),0)< > 2THEN 1420
1355 K(9,A)= 25:GOTO 2700
1360 IF S(1,0)> 0AND S(2,0)> 0AND S(3,0)> 0AND S(4,0)> 0THEN 1368
1362 IF S(2,0)> 0AND S(3,0)> 0AND S(4,0)> 0AND S(5,0)> 0THEN 1368
1364 IF S(3,0)> 0AND S(4,0)> 0AND S(5,0)> 0AND S(6,0)> 0THEN 1368
1366 GOTO 1420
1368 K(10,A)= 30:GOTO 2700
1370 IF S(1,0)AND S(2,0)AND S(3,0)AND S(4,0)AND S(5,0)= 1THEN 1376
1372 IF S(2,0)AND S(3,0)AND S(4,0)AND S(5,0)AND S(6,0)= 1THEN 1376
1374 GOTO 1420
1376 K(11,A)= 40:GOTO 2700
1380 IF S(S(0,0),0)< > 5THEN 1420
1382 IF K(12,A)= 0THEN K(12,A)= 50:GOTO 2700
1384 K(12,A)= K(12,A)+ 100:GOTO 2700
1390 GOSUB 14200:GOTO 2700
1400 REM
1401 REM  SET PLAYER INVALID
1402 REM
1420 K(I,A)= - 1
1430 GOTO 2700
1500 REM
1501 REM  COMPUTER CHECKS
1502 REM
1505 I= 12
1510 IF S(S(0,0),0)= 5AND K(12,A)= 0THEN K(12,A)= 50:GOTO 2700
1515 IF S(S(0,0),0)= 5AND K(12,A)> 0THEN K(12,A)= K(12,A)+ 100:GOTO 2700
1518 I= 8
1520 IF S(S(0,0),0)= 4AND K(8,A)= 0THEN GOSUB 14200:GOTO 2700
1522 I= 9
1525 IF S(S(0,0),0)= 3AND S(S(0,1),0)= 2AND K(9,A)= 0THEN K(9,A)= 25:GOTO 2700
1530 IF K(11,A)< > 0THEN 1555
1532 I= 11
1535 IF S(1,0)AND S(2,0)AND S(3,0)AND S(4,0)AND S(5,0)= 1THEN 1550
1540 IF S(2,0)AND S(3,0)AND S(4,0)AND S(5,0)AND S(6,0)= 1THEN 1550
1545 GOTO 1555
1550 K(11,A)= 40:GOTO 2700
1555 IF K(10,A)< > 0THEN 1585
1556 I= 10
1560 IF S(1,0)> 0AND S(2,0)> 0AND S(3,0)> 0AND S(4,0)> 0THEN 1580
1565 IF S(2,0)> 0AND S(3,0)> 0AND S(4,0)> 0AND S(5,0)> 0THEN 1580
1570 IF S(3,0)> 0AND S(4,0)> 0AND S(5,0)> 0AND S(6,0)> 0THEN 1580
1575 GOTO 1585
1580 K(10,A)= 30:GOTO 2700
1585 IF H< 3THEN 1700
1586 I= 6
1590 IF S(6,0)> 2AND K(6,A)= 0THEN K(6,A)= 6* S(6,0):GOTO 2700
1591 I= 5
1595 IF S(5,0)> 2AND K(5,A)= 0THEN K(5,A)= 5* S(5,0):GOTO 2700
1596 I= 4
1600 IF S(4,0)> 2AND K(4,A)= 0THEN K(4,A)= 4* S(4,0):GOTO 2700
1601 I= 3
1605 IF S(3,0)> 2AND K(3,A)= 0THEN K(3,A)= 3* S(3,0):GOTO 2700
1608 I= 7
1610 IF S(S(0,0),0)> 2AND K(7,A)= 0THEN GOSUB 14200:GOTO 2700
1616 I= 2
1620 IF S(2,0)> 2AND K(2,A)= 0THEN K(2,A)= 2* S(2,0):GOTO 2700
1621 I= 1
1625 IF S(1,0)> 2AND K(1,A)= 0THEN K(1,A)= S(1,0):GOTO 2700
1628 I= 13:IF K(13,A)< > 0THEN 1700
1630 IF C(1)+ C(2)+ C(3)+ C(4)+ C(5)> 19THEN GOSUB 14200:GOTO 2700
1700 REM
1701 REM  CLEAR DICE NUMBER F(B)
1702 REM  COMPUTER
1703 REM
1710 FOR B= 1TO 5
1720 F(B)= 0
1730 NEXT B
1800 REM
1801 REM  GET DICE CONTROL
1802 REM  COMPUTER
1803 REM
1810 H= H+ 1:IF H> 3THEN 2400
1820 I= M(MR):IF I< > 0THEN 1850
1830 MR= MR+ 1:IF MR> 13THEN MR= 1
1840 GOTO 1820
1850 IF I= 12AND K(12,A)> - 1THEN 1900
1860 IF K(I,A)< > 0THEN 1830
1870 IF I= 9THEN 2000
1880 IF I= 10OR I= 11THEN 2100
1900 REM
1901 REM  GET DICE 1,2,3,4
1902 REM  COMPUTER
1903 REM
1910 M= 0:J= 1
1920 M= M+ 1:IF M> 4THEN 2300
1930 K= S(0,M):IF K= 0THEN 2300
1940 FOR L= 1TO S(K,0)
1950 F(J)= S(K,L):J= J+ 1
1960 NEXT L
1970 GOTO 1920
2000 REM
2001 REM  GET DICE FH
2002 REM  COMPUTER
2003 REM
2010 M= 0:J= 1
2020 M= M+ 1:IF M> 4THEN 2300
2030 K= S(0,M):IF K= 0THEN 2300
2040 IF K> 1THEN 2020
2050 FOR L= 1TO S(K,0)
2060 F(J)= S(K,L):J= J+ 1
2070 NEXT L
2080 GOTO 2020
2100 REM
2101 REM  GET DICE LG/SM ST
2102 REM  COMPUTER
2103 REM
2110 M= 0:J= 1
2120 M= M+ 1:IF M> 4THEN 2190
2130 K= S(0,M):IF K= 0THEN 2190
2140 IF S(K,0)= 1THEN 2120
2150 FOR L= 1TO S(K,0)
2160 F(J)= S(K,L):J= J+ 1
2170 NEXT L
2180 GOTO 2120
2190 IF F(1)< > 0THEN 2300
2200 L= INT (2* RND (1)+ 1)
2210 F(1)= 5
2220 IF L= 1THEN F(1)= 1
2300 REM
2301 REM  COMPUTER ROLL AGAIN
2302 REM
2310 FOR B= 1TO 4
2320 IF F(B)< 1THEN 2370
2330 C(F(B))= INT (6* RND (1)+ 1)
2335 DIE= C(F(B)):J= F(B)- 1
2340 GOSUB 7000
2360 GOSUB 8000
2370 F(B)= 0
2380 NEXT B
2390 GOTO 1000
2400 REM
2401 REM  COMPUTER MUST SCORE
2402 REM
2410 MR= MR+ 1:IF MR> 13THEN MR= 1
2420 I= M(MR):IF I= 0THEN 2410
2425 IF K(I,A)< > 0THEN 2410
2430 IF I> 6THEN 2465
2435 GOSUB 14100
2440 IF X= - 1THEN 2470
2445 IF K(I,A)< > 0THEN 2410
2450 K(I,A)= S(I,0)* I
2455 IF K(I,A)< > 0THEN 2700
2465 IF I= 13AND K(13,A)= 0THEN GOSUB 14200
2470 IF K(I,A)= 0THEN K(I,A)= - 1
2700 REM
2701 REM  GET SCOREBOARD TOTALS
2702 REM
2710 FOR J= 14TO 17
2720 K(J,A)= 0
2730 NEXT J
2740 FOR J= 1TO 6
2750 IF K(J,A)< 0THEN 2770
2760 K(15,A)= K(15,A)+ K(J,A)
2770 NEXT J
2780 IF K(15,A)> 62THEN K(14,A)= 35
2790 FOR J= 7TO 13
2800 IF K(J,A)< 0THEN 2820
2810 K(16,A)= K(16,A)+ K(J,A)
2820 NEXT J
2830 K(17,A)= K(14,A)+ K(15,A)+ K(16,A)
2900 REM
2901 REM  PRINT SCORE
2902 REM
2910 PLOT 6,C1
2915 FOR J= 1TO 6
2920 IF K(J,A)< 0THEN PLOT 3,5* (A- 1)+ 16,J+ 1:PRINT 0:GOTO 2930
2925 IF K(J,A)< 1THEN 2930
2926 PLOT 3,5* (A- 1)+ 16,J+ 1:PRINT K(J,A)
2930 NEXT J
2935 FOR J= 7TO 13
2940 IF K(J,A)< 0THEN PLOT 3,5* (A- 1)+ 16,J+ 6:PRINT 0:GOTO 2950
2941 IF K(J,A)< 1THEN 2950
2945 PLOT 3,5* (A- 1)+ 16,J+ 6:PRINT K(J,A)
2950 NEXT J
2955 PLOT 3,5* (A- 1)+ 16,9:PRINT K(15,A)
2960 PLOT 3,5* (A- 1)+ 16,10:PRINT K(14,A)
2965 PLOT 3,5* (A- 1)+ 16,11:PRINT K(14,A)+ K(15,A)
2970 PLOT 3,5* (A- 1)+ 16,21:PRINT K(16,A)
2975 PLOT 3,5* (A- 1)+ 16,22:PRINT K(14,A)+ K(15,A)
2980 PLOT 3,5* (A- 1)+ 16,23:PRINT K(17,A)
2990 IF A* CC< > NTHEN 200
3000 REM
3001 REM  RESET M(I) COMPUTER PRIORITIES
3002 REM
3010 FOR B= 1TO 13
3020 IF M(B)= 12THEN 3040
3030 IF M(B)= ITHEN M(B)= 0
3040 NEXT B
3050 GOTO 200
4000 REM
4001 REM   INSTRUCTIONS
4002 REM
4010 PRINT "            Y A H T Z E E ":PLOT 10,10,10
4020 PRINT "THIS IS THE GAME OF YAHTZEE - "
4030 PRINT "FROM 1 TO 7 PLAYERS MAY PLAY AT THE SAME TIME"
4040 PRINT "WITH EACH PLAYERS CURRENT STATUS SHOWN ON THE"
4050 PRINT "PLAYING BOARD, INCLUDING TOTAL SCORES"
4060 PRINT
4070 PRINT "THE ONLY DIFFERENCE BETWEEN THIS GAME AND THE"
4080 PRINT "POPULAR HOME GAME IS THAT YOU MAY GET MULTIPLE"
4090 PRINT "YAHTZEES HERE ..... THE FIRST YAHTZEE SCORES"
4100 PRINT "50 POINTS, AND EACH ADDITIONAL ONE WILL YIELD"
4110 PRINT "A BONUS OF 100 POINTS (IF THE YAHTZEE IS PUT"
4120 PRINT "INTO THE YAHTZEE BLOCK)..... IN ADDITION YOU"
4130 PRINT "WILL BE GIVEN AN EXTRA TURN AT THE END OF"
4140 PRINT "THE GAME":PRINT :PRINT
4150 PRINT "THE WINNER WILL BE ANNOUNCED AT THE END OF"
4160 PRINT "THE GAME - - BUT I WOULDNT ADVISE ANYONE"
4170 PRINT "TO BE LAST......."
4180 PLOT 10,10
4190 INPUT "HIT RETURN TO CONTINUE  ";Y$
4195 RETURN
4200 PLOT 6,28,12
4210 PLOT 3,10,10:PRINT "YATZEE.BAS     VER 3.2"
4220 PLOT 3,10,12:PRINT "27 JUN 79"
4230 PLOT 3,10,14:PRINT "DEVELOPED BY"
4240 PLOT 3,13,15:PRINT "J.L. HELMS    &    M.F. PEZOK"
4250 PLOT 3,13,16:PRINT "1009 LEYTE RD / 1321 SAIPAN RD"
4260 PLOT 3,17,17:PRINT "CORONADO,  CA.  92118"
4270 PLOT 3,15,18:PRINT "(714) 435-6992 / 437-4659"
4280 PLOT 8
4290 FOR T= 1TO 2000:NEXT T
4295 RETURN
6000 REM
6001 REM   END - SORT WINNER
6002 REM
6010 X= 2:IF N= 1THEN 6100
6020 FOR J= 1TO N- 1
6030 IF K(17,J)> K(17,J+ 1)THEN 6070
6040 K= K(17,J):K(17,J)= K(17,J+ 1):K(17,J+ 1)= K
6050 A$= A$(J):A$(J)= A$(J+ 1):A$(J+ 1)= A$
6060 X= 1
6070 NEXT J
6080 ON XGOTO 6000,6100
6100 REM
6101 REM   PRINT WINNERS STANDINGS
6102 REM
6110 RESTORE 6400
6120 FOR J= 1TO N
6130 PLOT 6,C3,3,0,27,11,28,11,28,11
6135 IF J> 1AND J= NTHEN RESTORE 6440
6140 PLOT 30,20:READ A$
6150 PRINT A$;"     ";A$(J);" "
6160 TT= 500* (N- J+ 1):IF TT< 1500THEN TT= 1500
6165 FOR T= 1TO TT:NEXT T
6170 NEXT J
6180 PLOT 6,39,3,0,25,11,3,21,25
6190 PLOT 6,39:PRINT "+++   END OF GAME   +++"
6200 FOR T= 1TO 2000:NEXT T
6205 PLOT 10,10
6210 PLOT 14,6,39:INPUT "PLAY AGAIN?  Y/N  ";Y$
6220 IF LEFT$ (Y$,1)= "Y"THEN GOSUB 6300:GOTO 20
6230 IF LEFT$ (Y$,1)< > "N"THEN PLOT 3,0,28,11:GOTO 6210
6240 PLOT 15,12,27,11
6250 END
6300 REM
6301 REM   CLEAR MATRICES
6302 REM
6310 FOR K= 1TO 7
6320 FOR J= 1TO 18
6330 K(J,K)= 0
6340 NEXT J
6350 A$(K)= ""
6360 NEXT K
6370 PLOT 15,12
6380 RETURN
6400 DATA "+++   THE WINNER   +++"
6410 DATA " SECOND PLACE"," THIRD PLACE "
6420 DATA " FOURTH PLACE "," FIFTH PLACE "
6430 DATA " SIXTH PLACE "
6440 DATA " DEAD LAST "
7000 REM
7001 REM   ERASE DIE
7002 REM
7010 PLOT 6,C2
7020 PLOT 3,56,3* J+ 2
7030 PRINT "    "
7040 PLOT 3,56,3* J+ 3
7050 PRINT "    "
7060 PLOT 3,0,26,6,C1
7070 RETURN
7100 REM
7101 REM    CHECK IF DONE
7102 REM
7110 X= 0
7120 FOR J= 1TO N
7130 Y= 2
7140 FOR K= 1TO 13
7150 IF K(K,J)= 0THEN Y= 1
7160 NEXT K
7170 K(18,J)= Y
7180 IF Y= 2THEN X= X+ 1
7210 NEXT J
7220 IF X= > NTHEN A= 0
7230 RETURN
7300 REM
7301 REM  COMPUTER PRIORITIES INFO
7302 REM
7310 PLOT 3,0,25
7320 PRINT "  THANK YOU FOR ALLOWING ME TO PLAY WITH YOU"
7330 PRINT "AS WE ALL KNOW, EACH PERSON HAS A SLIGHTLY"
7340 PRINT "DIFFERENT METHOD HE USES FOR SCORING PRIORITIES"
7350 PRINT "IN ORDER TO HELP BALANCE OUT THE GAME, I NEED"
7360 PRINT "TO KNOW WHAT PRIORITIES YOU WANT ME TO USE"
7370 PLOT 3,0,31:INPUT "HIT RETURN TO CONTINUE  ";Y$
7600 REM
7601 REM  SELECT MUST SCORE PRIORITY
7602 REM
7610 FOR Y= 31TO 25STEP - 1
7620 PLOT 3,0,Y,11
7630 NEXT Y
7640 PRINT "PLEASE INDICATE NOW THE MUST SCORE PRIORITIES"
7650 PRINT "YOU WISH ME TO USE.  THESE ARE USED WHEN I CAN NOT"
7660 PRINT "FIND A NORMAL SCORING SLOT AND I MUST SCORE"
7680 FOR Y= 1TO 13
7690 PLOT 3,0,30,11
7695 PLOT 3,0,29,11
7700 PRINT "CHOICE NUMBER"Y;"  ";:INPUT M(Y):M(Y)= INT (M(Y))
7710 IF M(Y)> 0AND M(Y)< 14THEN 7740
7720 PRINT "+++   ILLEGAL ENTRY   +++"
7730 GOTO 7695
7740 X= 0
7745 IF Y= 1THEN 7790
7750 FOR B= 1TO Y- 1
7760 IF M(B)= M(Y)THEN X= 1
7770 NEXT B
7780 IF X= 1THEN 7720
7790 NEXT Y
7800 FOR Y= 30TO 25STEP - 1
7810 PLOT 3,0,Y,11
7820 NEXT Y
7830 RETURN
8000 REM
8001 REM   PRINT DIE
8002 REM
8010 PLOT 6,57
8100 REM
8101 REM   UPPER/LOWER MIDDLE (6)
8102 REM
8110 IF DIE< 6THEN 8200
8120 PLOT 3,57,3* J+ 2,2,254,48,255
8130 PLOT 3,58,3* J+ 2,2,254,3,255
8140 PLOT 3,58,3* J+ 3,2,254,12,255
8150 PLOT 3,57,3* J+ 3,2,254,192,255
8200 REM
8201 REM   UPPER RIGHT/LOWER LEFT (4,5,6)
8202 REM
8205 IF DIE< 4THEN 8300
8210 PLOT 3,59,3* J+ 2,2,254,51,255
8220 PLOT 3,56,3* J+ 3,2,254,204,255
8300 REM
8301 REM   UPPER LEFT/LOWER RIGHT (2,3,4,5,6)
8302 REM
8310 IF DIE= 1THEN 8400
8320 PLOT 3,56,3* J+ 2,2,254,51,255
8330 PLOT 3,59,3* J+ 3,2,254,204,255
8400 REM
8401 REM   MIDDLE (1,3,5)
8402 REM
8410 IF DIE= 2OR DIE= 4OR DIE= 6THEN 8500
8420 PLOT 3,57,3* J+ 2,2,254,128,255
8430 PLOT 3,58,3* J+ 2,2,254,8,255
8440 PLOT 3,58,3* J+ 3,2,254,1,255
8450 PLOT 3,57,3* J+ 3,2,254,16,255
8500 REM
8501 REM   GET OUT
8502 REM
8510 PLOT 6,C1
8515 PLOT 3,0,30
8520 RETURN
11300 REM
11301 REM  COMPUTER OPTION
11302 REM
11310 CC= 0
11320 PLOT 6,C1,3,0,25,11,6,32
11330 INPUT "DO YOU WISH TO PLAY AGAINST ME?  Y/N  ";Y$
11340 IF Y$= "N"THEN RETURN
11350 IF Y$< > "Y"THEN 11320
11360 CC= 1
11370 RETURN
14100 REM
14101 REM  CHECK FOR ACES-SIXES ANY POSITION
14102 REM
14110 X= - 1
14120 FOR J= 0TO 4
14130 IF S(0,J)= ITHEN X= J
14140 NEXT J
14150 RETURN
14200 REM
14201 REM  TOTAL DICE VALUE
14202 REM
14210 FOR J= 1TO 5
14220 K(I,A)= K(I,A)+ C(J)
14230 NEXT J
14240 RETURN
30000 REM
30001 REM  MATRIX INFORMATION
30002 REM
30003 REM  C(5)     CURRENT DICE
30004 REM  K(18,7)  SCOREBOARD
30005 REM           COLUMNS 1-13 BOARD NUMBER
30006 REM           COLUMN    14 BONUS UPPER
30007 REM           COLUMN    15 TOTAL UPPER
30008 REM           COLUMN    16 TOTAL LOWER
30009 REM           COLUMN    17 GRAND TOTAL
30010 REM           COLUMN    18 DONE/NOT DONE STATUS
30011 REM           ROW     1- 7 PLAYERS SCORE
30012 REM           ROW        N COMPUTERS SCORE (<7 PLAYERS)
30013 REM
30014 REM  F(5)     DICE NUMBER TO ROLL AGAIN
30015 REM  A$(7)    PLAYERS NAMES
30016 REM  S(6,5)   COMPUTERS DICE LOGIC
30017 REM           COLUMN     0 DICE NUMBER BY QTY SEQUENCE
30018 REM           COLUMN     1 QTY/POSITION FOR ACES
30019 REM           COLUMN     2 QTY/POSITION FOR TWOS
30020 REM           COLUMN     3 QTY/POSITION FOR THREES
30021 REM           COLUMN     4 QTY/POSITION FOR FOURS
30023 REM           COLUMN     5 QTY/POSITION FOR FIVES
30024 REM           COLUMN     6 QTY/POSITION FOR SIXES
30025 REM           ROW        0 QUANTITY OF DICE
30026 REM           ROW     1- 5 POSITION OF DICE IN C(5)
30027 REM
30028 REM  SAMPLE S(Y,X) FOR DICE OF 5,2,4,6,4
30029 REM
30030 REM  Y/X   0  1  2  3  4  5
30031 REM  0     4  6  5  2          IN QTY/VALUE SEQUENCE
30032 REM  1                         NO DIE=1
30033 REM  2     1  2                1 TWO POSITION 2
30034 REM  3                         NO DIE=3
30035 REM  4     2  3  5             2 FOURS POSITIONS 3 AND 5
30036 REM  5     1  1                1 FIVE POSITION 1
30037 REM  6     1  4                1 SIX POSITION 4
30038 REM           +           +
30039 REM  +     +  ++++++++++++++++ SECTION FOR POSITION DATA
30040 REM  +     +------------------ COLUMN INDICATES QTY
30041 REM  +------------------------ INDEX EQUATES TO DIE VALUE
30042 REM
30045 REM  M(13)    PRIORITY NUMBERS FOR MUST SCORE WHERE VALUE
30046 REM           REFERS TO PLAY BOARD NUMBER
30047 REM
30100 REM  TO RUN INTERNAL CHECKS SECTION - ENTER A -1 FOR
30101 REM  PLAYING BOARD NUMBER OR QTY OF DICE TO ROLL
30102 REM  AGAIN - - DATA WILL NOT BE LOST AND SCREEN
30103 REM  WILL BE RESET WITH CURRENT DICE SHOWN - -
30104 REM  PLAYERS/COMPUTERS SCORE WILL NOT SHOW UNTIL
30105 REM  AFTER THEIR TURN
30106 REM
35000 REM
35001 REM  INTERNAL CHECKS
35002 REM
35010 PLOT 6,C1,12:PRINT "+++   INTERNAL MATRIX CHECKS   +++"
35020 PRINT :PRINT "CURRENT DICE ARE"
35030 PRINT C(1),C(2),C(3),C(4),C(5)
35060 PRINT :PRINT "PLAYER NUMBER AND NAMES ARE"
35070 FOR PN= 1TO N:PRINT "   "PN,A$(PN):NEXT PN
35080 PRINT :INPUT "HIT RETURN TO CONTINUE";Y$
35100 PLOT 12:PRINT "SCORE BOARD MATRIX":PRINT
35110 FOR NY= 0TO 18:PRINT NY,
35111 FOR NX= 0TO 7
35112 PRINT TAB( 7* NX+ 8)K(NY,NX);
35113 NEXT NX
35114 PRINT " "
35115 NEXT NY
35120 PRINT :INPUT "HIT RETURN TO CONTINUE";Y$
35200 PLOT 12:PRINT "DICE ANALYSIS MATRIX S(Y,X)":PRINT
35210 FOR NY= 0TO 6:FOR NX= 0TO 5:PRINT S(NY,NX),:NEXT NX:PRINT :NEXT NY
35240 PRINT :PRINT "MUST SCORE PRIORITIES":PRINT
35250 FOR NX= 1TO 13:PRINT M(NX),:NEXT NX:PRINT
35260 INPUT "HIT RETURN TO CONTINUE";Y$
35300 PLOT 27,4:PRINT "LOAD YATZEE.DSP":PLOT 27,24
35310 FOR B= 1TO 5
35320 DIE= C(B):J= B- 1
35330 GOSUB 8000
35340 NEXT B
35350 RETURN