Compucolor.org – Virtual Media

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

1 REM  ZILCH  
2 CLEAR 256
5 PLOT 6,35,12,27,24
10 PRINT TAB( 28)"ZILCH":PRINT
15 DIM A(8,2),N$(8),D(6),S(8)
20 INPUT "HOW MANY PLAYERS  (1 - 8)   ";A
25 IF A< 1OR A> 8THEN PLOT 3,0,2,11:GOTO 20
30 PRINT
35 FOR NP= 1TO A
40 PLOT 3,0,5,11
45 PRINT "PLAYER "NP"  YOUR NAME PLEASE   ";
50 INPUT N$(NP)
52 IF LEN (N$(NP))> 6THEN N$(NP)= LEFT$ (N$(NP),6)
53 IF LEN (N$(NP))< 6THEN N$(NP)= N$(NP)+ " ":GOTO 53
54 A(NP,1)= 0:A(NP,2)= 0
55 NEXT NP
60 PRINT " "
62 NP= A
65 INPUT "ARE INSTRUCTIONS REQUIRED   Y/N  ";B$
70 IF LEFT$ (B$,1)= "N"THEN 300
90 PLOT 12
100 REM  
101 REM  INSTRUCTIONS
102 REM
105 PRINT TAB( 28)"ZILCH":PRINT
110 PRINT "EACH PLAYER ROLLS 6 DICE.  THE PLAYER MAY CONTINUE TO ROLL"
120 PRINT "THE DICE AS LONG AS THE PLAYER ACCUMULATES POINTS."
130 PRINT "IF THE PLAYER'S ROLL OF THE DICE DOES NOT CONTAIN ANY"
140 PRINT "POINTS, THE PLAYERS TURN IS ENDED AND THE PLAYER GETS"
150 PRINT "ZILCH (0) POINTS FOR THAT TURN."
160 PRINT
170 PRINT "YOU MUST HAVE 10,000 POINTS OR MORE TO WIN."
180 PRINT "IF A PLAYER REACHES 10,000 OR MORE POINTS, EACH REMAINING"
190 PRINT "PLAYER HAS 1 TURN TO TIE OR BEAT THE WINNING SCORE."
200 PRINT "IF NOBODY TIES OR BEATS THE PLAYER WITH THE HIGHEST"
210 PRINT "SCORE, THE GAME ENDS."
220 PRINT
230 PRINT "IF A PLAYER TIES OR BEATS THE WINNING SCORE, THE GAME "
240 PRINT "CONTINUES FOR ONE MORE ROUND OF PLAY, UNTIL NOBODY CAN"
250 PRINT "BEAT THE HIGHEST SCORE."
260 PLOT 3,15,20
270 INPUT "HIT THE RETURN KEY TO PLAY   ";A$
300 REM  
301 REM  PLAY
310 PLOT 12,14,3,28,0
320 PRINT "ZILCH"
330 PLOT 15:PN= 0
335 PRINT "COUNTERS                        POINTS"
340 PRINT "1 FIVE..............................50"
350 PRINT "1 ONE..............................100"
360 PRINT "3 TWOS.............................200"
370 PRINT "3 THREES...........................300"
380 PRINT "3 FOURS............................400"
390 PRINT "3 FIVES............................500"
400 PRINT "3 SIXES............................600"
410 PRINT "3 ONES...........................1,000"
420 PRINT "4 OF A KIND (EXCEPT ONES)........2,000"
430 PRINT "4 ONES...........................2,500"
440 PRINT "3 DIFFERENT PAIRS................3,000"
450 PRINT "STRAIGHT (1,2,3,4,5,6)...........4,000"
460 PRINT "5 OF A KIND (EXCEPT ONES)........5,000"
470 PRINT "5 ONES...........................5,500"
480 PRINT "6 OF A KIND (EXCEPT ONES)........6,000"
490 PRINT "6 ONES..........................10,000"
495 LR= 0
500 PN= PN+ 1:IF PN> NPTHEN PN= 1
505 IF PN= LRTHEN 9000
510 PLOT 6,39
515 FOR Y= 21TO 31
520 PLOT 3,0,Y
530 PRINT SPC( 44)""
540 NEXT Y
550 PLOT 3,0,21
560 PRINT "NOW PLAYING IS "N$(PN)
570 INPUT "HIT RETURN TO ROLL DICE - HIT 'S' TO STOP  ";Y$
580 IF Y$= "S"THEN 8000
590 IF Y$= "0"THEN 1000
600 PLOT 28,11
610 GOTO 570
1000 REM  
1001 REM  ROLL DICE
1010 GOSUB 20000
1020 FOR DN= 1TO 6
1030 DX= INT (6* RND (1)+ 1)
1035 FOR A= 1TO 2
1040 DV= INT (6* RND (1)+ 1)
1045 GOSUB 21000
1050 GOSUB 20100
1055 NEXT A
1060 IF DV= DXTHEN 1080
1065 DV= INT (6* RND (1)+ 1)
1070 GOSUB 21000
1075 GOSUB 20100:GOTO 1060
1080 D(DN)= DV
1090 NEXT DN
1100 REM  
1101 REM  CHECK POINTS SECTION
1102 REM  SORT
1103 REM
1110 FOR J= 1TO 6
1120 S(J)= D(J)
1130 NEXT J
1140 V= 2
1150 FOR J= 1TO 5
1160 IF S(J)< = S(J+ 1)THEN 1190
1170 S(0)= S(J):S(J)= S(J+ 1):S(J+ 1)= S(0):S(0)= 0
1180 V= 1
1190 NEXT J
1200 ON VGOTO 1140,1300
1300 REM  
1301 REM  CHECK 1-6 RUN
1302 REM
1310 V= 1:P= 0
1320 FOR J= 1TO 5
1330 IF S(J)< > S(J+ 1)- 1THEN V= 2
1340 NEXT J
1350 IF V= 1THEN P= P+ 4000
1360 IF V= 1THEN 2000
1400 REM  
1401 REM  CHECK FOR ONES
1402 REM
1410 V= 0
1420 FOR J= 1TO 6
1430 IF S(J)= 1THEN V= V+ 1
1440 NEXT J
1450 IF V= 6THEN P= P+ 10000
1460 IF V= 5THEN P= P+ 5500
1470 IF V= 4THEN P= P+ 2500
1480 IF V= 3THEN P= P+ 1000
1500 REM  
1501 REM  CHECK FOR 3,4,5,6 A KIND
1502 REM
1510 FOR DV= 2TO 6
1520 V= 0
1530 FOR J= 1TO 6
1540 IF S(J)= DVTHEN V= V+ 1
1550 NEXT J
1560 IF V< 3THEN 1610
1570 IF V= 6THEN P= P+ 6000
1580 IF V= 5THEN P= P+ 5000
1590 IF V= 4THEN P= P+ 2000
1600 IF V= 3THEN P= P+ 100* DV
1610 NEXT DV
1700 REM  
1701 REM  CHECK 3 DIFF PAIR
1702 REM
1710 V= 1
1720 FOR J= 1TO 5STEP 2
1730 IF S(J)< > S(J+ 1)THEN V= 2
1740 NEXT J
1750 ON VGOTO 1760,1900
1760 V= 1
1770 FOR J= 1TO 4
1780 IF S(J)= S(J+ 2)THEN V= 2
1790 NEXT J
1800 ON VGOTO 1810,1900
1810 P= P+ 3000
1820 GOTO 2000
1900 REM  
1901 REM  CHECK SINGLE ONE, FIVE
1902 REM
1910 V1= 0:V5= 0
1920 FOR J= 1TO 6
1930 IF S(J)= 1THEN V1= V1+ 1
1940 IF S(J)= 5THEN V5= V5+ 1
1950 NEXT J
1960 IF V1< 3THEN P= P+ 100* V1
1970 IF V5< 3THEN P= P+ 50* V5
2000 REM  
2001 REM  CHECK POINTS SCORED
2002 REM
2010 A(PN,2)= A(PN,2)+ P
2020 IF P= 0THEN A(PN,2)= 0
2030 IF P> 0THEN 2200
2040 PLOT 6,33,3,0,24
2050 PRINT "YOU LOSE YOUR TURN "
2060 PRINT "YOU DIDN'T GET ANY POINTS"
2070 GOSUB 21500
2080 FOR T= 1TO 2000:NEXT T
2090 PLOT 3,0,27,11
2100 PLOT 3,0,30,11
2110 GOTO 500
2200 GOSUB 21900
2210 GOTO 510
8000 REM  
8001 REM  SET TOTAL POINTS
8002 REM
8010 A(PN,1)= A(PN,1)+ A(PN,2)
8020 A(PN,2)= 0
8030 GOSUB 21500
8040 PLOT 3,0,27,11
8050 PLOT 3,0,30,11
8060 IF A(PN,1)> 9999AND LR= 0THEN LR= PN
8070 IF A(PN,1)= > A(LR,1)AND LR< > 0THEN LR= PN
8080 GOTO 500
9000 REM  
9001 REM  END - FIND WINNER
9002 REM
9010 FOR J= 1TO NP
9020 S(J)= A(J,1)
9030 NEXT J
9040 V= 1
9050 FOR J= 1TO NP- 1
9060 IF S(J)= > S(J+ 1)THEN 9090
9070 S(0)= S(J):S(J)= S(J+ 1):S(J+ 1)= S(0)
9080 N$(0)= N$(J):N$(J)= N$(J+ 1):N$(J+ 1)= N$(0):V= 2
9090 NEXT J
9100 IF V= 2THEN 9040
9110 PLOT 6,3,12
9115 PLOT 3,20,2:PRINT "+++ STANDINGS +++"
9120 FOR J= 1TO NP
9130 PLOT 3,20,2* J+ 3
9140 PRINT N$(J),S(J)
9150 NEXT J
9160 FOR T= 1TO 3500:NEXT T
9170 LOAD "MENU":RUN
9180 END
20000 REM  
20001 REM  ERASE DICE
20002 REM
20010 FOR J= 1TO 3
20020 FOR K= 0TO 2
20030 PLOT 3,45,5* (J- 1)+ 3+ K
20040 PRINT "               "
20050 NEXT K
20060 NEXT J
20070 RETURN
20100 REM
20101 REM  PRINT DIE
20102 REM
20110 ON DNGOTO 20120,20130,20140,20150,20160,20170
20120 X= 45:Y= 3:GOTO 20200
20130 X= 55:Y= 3:GOTO 20200
20140 X= 45:Y= 8:GOTO 20200
20150 X= 55:Y= 8:GOTO 20200
20160 X= 45:Y= 13:GOTO 20200
20170 X= 55:Y= 13
20200 IF DV= 1THEN 20300
20210 PLOT 3,X,Y
20220 PRINT " "
20230 PLOT 3,X+ 4,Y+ 2
20240 PRINT " "
20300 IF DV< 4THEN 20400
20310 PLOT 3,X+ 4,Y
20320 PRINT " "
20330 PLOT 3,X,Y+ 2
20340 PRINT " "
20400 IF DV/ 2= INT (DV/ 2)THEN 20500
20410 PLOT 3,X+ 2,Y+ 1
20420 PRINT " "
20500 IF DV< 6THEN 20550
20510 PLOT 3,X+ 2,Y
20520 PRINT " "
20530 PLOT 3,X+ 2,Y+ 2
20540 PRINT " "
20550 RETURN
21000 REM  
21001 REM  ERASE INDIVIDUAL DIE
21002 REM
21010 ON DNGOTO 21020,21030,21040,21050,21060,21070
21020 X= 45:Y= 3:GOTO 21100
21030 X= 55:Y= 3:GOTO 21100
21040 X= 45:Y= 8:GOTO 21100
21050 X= 55:Y= 8:GOTO 21100
21060 X= 45:Y= 13:GOTO 21100
21070 X= 55:Y= 13
21100 FOR Y= YTO Y+ 2
21110 PLOT 3,X,Y
21120 PRINT "     "
21130 NEXT Y
21140 RETURN
21500 REM  
21501 REM  PRINT TOTAL SCORE
21502 REM
21510 P$= RIGHT$ (STR$ (A(PN,1)+ 100000),5)
21520 GOSUB 21800
21530 PLOT 6,39,3,45,16+ PN
21540 PRINT N$(PN)"    "P$
21550 RETURN
21800 REM  
21801 REM  SET P$ FOR 5 DIGIT PRINT
21802 REM
21810 L= LEN (P$):IF L= 0THEN 21850
21820 IF P$= "0"THEN 21850
21830 IF LEFT$ (P$,1)= "0"THEN P$= RIGHT$ (P$,L- 1):GOTO 21810
21850 IF LEN (P$)< 5THEN P$= " "+ P$:GOTO 21850
21860 RETURN
21900 REM  
21901 REM  PRINT ACCUMULATED SCORE
21902 REM
21910 P$= RIGHT$ (STR$ (A(PN,2)+ 100000),5)
21920 GOSUB 21800
21925 PLOT 6,35
21930 PLOT 3,45,26
21940 PRINT "ACCUMULATED SCORE"
21950 PLOT 3,50,27
21960 PRINT P$
21970 P$= RIGHT$ (STR$ (P+ 100000),5)
21980 GOSUB 21800
21990 PLOT 3,45,29
22000 PRINT "POINTS THIS ROLL"
22010 PLOT 3,50,30
22020 PRINT P$
22030 RETURN