Compucolor.org – Virtual Media

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

5 CLEAR 256:PLOT 6,32,12
10 DIM C(5):DIM K(20,6):DIM F(5):DIM A$(6)
20 PLOT 27,24
30 C1= 6:C2= 63:C3= 33:C4= 56
40 GOSUB 4000
70 GOSUB 3000
80 PLOT 6,C1,3,0,27,11
90 INPUT "HOW MANY PLAYERS?  ";N:N= INT (N)
100 IF N< 1OR N> 6THEN 80
110 FOR A= 1TO N
120 PLOT 6,C1,3,0,27,11
130 PRINT "PLAYER NUMBER "A;" NAME PLEASE  ";
140 INPUT A$(A):IF A$(A)= ""THEN 120
150 NEXT A
160 PLOT 6,C1,3,0,27,11
170 A= 0
200 REM  NEXT ROLL PRESET
210 A= A+ 1:IF A> NTHEN A= 1
220 H= 1:GOSUB 2000
230 IF A= 0THEN 6000
235 IF K(20,A)= 2THEN 220
240 PLOT 6,C1
250 FOR Y= 31TO 27STEP - 1
260 PLOT 3,0,Y,11
270 NEXT Y
280 PLOT 6,39,3,5* (A- 1)+ 20,27
290 PRINT A$(A)
300 REM  INITIAL ROLL
310 H= H+ 1
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
400 REM  QTY TO ROLL
410 PLOT 6,C1,3,0,30,11,28,11,28,11:PRINT "  "
420 C= 1:IF H= 4THEN 700
430 PRINT "	ROLL WHICH DICE AGAIN?  ";
432 POKE 33278,0
434 PK= PEEK (33278):IF PK= 0THEN 434
436 IF PK= 13THEN PRINT :F= C- 1:GOTO 500
438 IF PK= 65THEN PRINT :GOTO 300
440 PK= PK- 48:F(C)= PK:PRINT " ";
442 IF F(C)= 0THEN 700
450 IF F(C)< 1OR F(C)> 5THEN 410
460 IF C= > 5THEN PRINT :GOTO 500
470 C= C+ 1
480 GOTO 432
500 REM  WHICH ONES?
575 FOR J= 1TO F
580 IF F(J)= F(J+ 1)THEN 410
585 NEXT J
590 H= H+ 1
600 REM  ROLL AGAIN
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  PLAY BOARD NUMBER
710 PLOT 6,C1,3,0,31,11,28,11,28,11
720 INPUT " PLAY BOARD NUMBER?  ";I:I= INT (I)
730 IF I< 1OR I> 15THEN 710
735 IF I= 15AND K(15,A)> - 1THEN 1000
740 IF K(I,A)= 0THEN 800
750 PLOT 3,0,29
760 PRINT "NO - NO - DUMMY - - TRY AGAIN"
770 PLOT 6,C1,3,0,28,11
780 GOTO 720
800 REM  SCORE OPTIONS 1 - 6
810 IF I> 6THEN ON I- 6GOTO 1000,1000,1400,1400,1000,1000,1000,1600,1000
820 K= 0
830 FOR J= 1TO 5
840 IF C(J)= ITHEN K= K+ 1
850 NEXT J
860 K(I,A)= K* I
870 IF K(I,A)= 0THEN K(I,A)= - 1
880 GOTO 1700
1000 REM  FULL HOUSE/3 & 4 A KIND/KISMET
1010 K1= 1:K2= 0:K3= 0
1020 N1= C(1):N2= 0:N3= 0
1030 FOR J= 2TO 5
1040 IF C(J)= N1THEN K1= K1+ 1:GOTO 1090
1050 IF N2= 0THEN N2= C(J)
1060 IF C(J)= N2THEN K2= K2+ 1:GOTO 1090
1070 IF N3= 0THEN N3= C(J)
1080 IF C(J)= N3THEN K3= K3+ 1
1090 NEXT J
1200 REM   SCORE FULL HOUSE/3 & 4 A KIND/KISMET
1210 ON I- 6GOTO 2200,1300,1400,1400,1350,1350,1300,1600,1220
1220 IF K1< > 5THEN 1260
1230 IF K(I,A)= 0THEN K(I,A)= 50:GOTO 1600
1240 K(I,A)= K(I,A)+ 100
1250 GOTO 1600
1260 IF K(I,A)< > 0THEN 1700
1270 K(I,A)= - 1:GOTO 1700
1300 IF K1> 3THEN K(I,A)= 25:GOTO 1600
1305 IF K2> 3THEN K(I,A)= 25:GOTO 1600
1310 IF K3> 3THEN K(I,A)= 25:GOTO 1600
1315 IF I< > 8THEN 1330
1320 IF K1> 2THEN 1600
1325 IF K2> 2THEN 1600
1326 IF K3> 2THEN 1600
1330 K(I,A)= - 1
1340 GOTO 1700
1350 IF K1+ K2= 5AND ABS (K1- K2)= 1THEN K(I,A)= 15:IF N1+ N2= 7THEN K(I,A)= 20
1360 IF K1+ K3= 5AND ABS (K1- K3)= 1THEN K(I,A)= 15:IF N1+ N3= 7THEN K(I,A)= 20
1370 IF K2+ K3= 5AND ABS (K2- K3)= 1THEN K(I,A)= 15:IF N2+ N3= 7THEN K(I,A)= 20
1380 IF K(I,A)= 0THEN K(I,A)= - 1
1385 IF K(I,A)= 15AND I= 12THEN K(I,A)= - 1
1390 IF K(I,A)> 0THEN 1600
1395 GOTO 1700
1400 REM   STRAIGHT SORT
1410 X= 2
1420 FOR J= 1TO 4
1430 IF C(J)< = C(J+ 1)THEN 1450
1440 C(0)= C(J):C(J)= C(J+ 1):C(J+ 1)= C(0):X= 1
1450 NEXT J
1460 IF X= 1THEN 1400
1470 IF I= 10THEN 2300
1500 REM   SCORE STRAIGHT
1510 K= 1
1520 FOR J= 2TO 5
1530 IF C(J)= C(J- 1)+ 1THEN K= K+ 1
1540 NEXT J
1550 IF K< 5THEN K(I,A)= - 1:GOTO 1700
1560 IF I= 9THEN K(I,A)= 30
1580 IF K(I,A)= 0THEN K(I,A)= - 1
1590 GOTO 1700
1600 REM   CHANCE/DICE VALUE
1610 FOR J= 1TO 5
1620 K(I,A)= K(I,A)+ C(J)
1630 NEXT J
1640 IF K(I,A)= 0THEN K(I,A)= - 1
1700 REM   TOTALS
1710 FOR J= 16TO 19
1720 K(J,A)= 0
1730 NEXT J
1740 FOR J= 1TO 6
1750 IF K(J,A)< 0THEN 1770
1760 K(17,A)= K(17,A)+ K(J,A)
1770 NEXT J
1780 IF K(17,A)> 62THEN K(16,A)= 35
1781 IF K(17,A)> 70THEN K(16,A)= 55
1782 IF K(17,A)> 77THEN K(16,A)= 75
1790 FOR J= 7TO 15
1800 IF K(J,A)< 0THEN 1820
1810 K(18,A)= K(18,A)+ K(J,A)
1820 NEXT J
1830 K(19,A)= K(19,A)+ K(17,A)+ K(18,A)
1900 REM   PRINT SCORE
1910 PLOT 6,C1
1915 FOR J= 1TO 6
1920 IF K(J,A)< 0THEN PLOT 3,5* (A- 1)+ 21,J+ 1:PRINT 0:GOTO 1930
1925 IF K(J,A)< 1THEN 1930
1926 PLOT 3,5* (A- 1)+ 21,J+ 1:PRINT K(J,A)
1930 NEXT J
1935 FOR J= 7TO 15
1940 IF K(J,A)< 0THEN PLOT 3,5* (A- 1)+ 21,J+ 6:PRINT 0:GOTO 1950
1941 IF K(J,A)< 1THEN 1950
1945 PLOT 3,5* (A- 1)+ 21,J+ 6:PRINT K(J,A)
1950 NEXT J
1955 PLOT 3,5* (A- 1)+ 21,9:PRINT K(17,A)
1960 PLOT 3,5* (A- 1)+ 21,10:PRINT K(16,A)
1965 PLOT 3,5* (A- 1)+ 21,11:PRINT K(16,A)+ K(17,A)
1970 PLOT 3,5* (A- 1)+ 21,23:PRINT K(18,A)
1975 PLOT 3,5* (A- 1)+ 21,24:PRINT K(16,A)+ K(17,A)
1980 PLOT 3,5* (A- 1)+ 21,25:PRINT K(19,A)
1985 GOTO 200
2000 REM   CHECK IF DONE
2010 X= 0
2020 FOR J= 1TO N
2030 Y= 2
2040 FOR K= 1TO 15
2050 IF K(K,J)= 0THEN Y= 1
2060 NEXT K
2070 K(20,J)= Y
2080 IF Y= 2THEN X= X+ 1
2090 IF Y= 2THEN A= A+ 1
2100 IF A> NTHEN A= 1
2110 NEXT J
2120 IF X= > NTHEN A= 0
2130 RETURN
2200 REM  SCORE 2 PAIR
2210 IF K1> 1AND K2> 1AND N1+ N2= 7THEN 1600
2220 IF K1> 1AND K3> 1AND N1+ N3= 7THEN 1600
2230 IF K2> 1AND K3> 1AND N2+ N3= 7THEN 1600
2240 IF K1> 3THEN 1600
2250 IF K2> 3THEN 1600
2260 IF K3> 3THEN 1600
2270 K(I,A)= - 1
2280 GOTO 1700
2300 REM  SCORE FLUSH
2310 X= 2
2320 FOR J= 1TO 4
2330 IF C(J)= C(J+ 1)THEN 2360
2340 IF C(J)+ C(J+ 1)= 7THEN 2360
2350 X= 1
2360 NEXT J
2370 IF X= 2THEN K(I,A)= 35:GOTO 1700
2380 K(I,A)= - 1:GOTO 1700
3000 PLOT 8,27,4:PRINT "LOAD KISMET.DSP":PLOT 27,24,3,0,27:RETURN
4000 REM   INSTRUCTIONS
4010 PRINT "            K I S M E T":PRINT :PRINT
4020 PRINT "THIS IS THE GAME OF KISMET"
4030 PRINT "FROM 1 TO 6 PLAYERS MAY PLAY AT THE SAME TIME"
4040 PRINT "WITH EACH PLAYERS CURRENT STATUS SHOWN ON THE"
4050 PRINT "PLAYING BOARD, INCLUDING TOTAL SCORES"
4052 PRINT "ROLL DICE- ENTER 'A' TO ROLL ALL OF THE DICE, ENTER"
4054 PRINT "'0' TO PUT SCORE ON THE SCORE BOARD, ENTER DIE # TO"
4056 PRINT "SELECT INDIVIDUAL DIE, HIT 'RETURN' TO ROLL DICE."
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 "KISMETS HERE ..... THE FIRST KISMET SCORES"
4100 PRINT "50 POINTS PLUS DICE VALUE, AND EACH ADDITIONAL"
4110 PRINT "KISMET WILL YIELD A BONUS OF 100 POINTS (IF THE"
4120 PRINT "KISMET IS PUT INTO THE KISMET BLOCK)....."
4130 PRINT "IN ADDITION YOU WILL BE GIVEN AN EXTRA TURN"
4140 PRINT "AT THE END OF THE GAME"
4141 PRINT
4142 PRINT "FOR THOSE BLOCKS THAT SAY COLOR - THAT MEANS"
4143 PRINT "THE DICE MUST BE THE SAME COLOR BEFORE POINTS"
4144 PRINT "WILL BE ALLOWED":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 PRINT :PRINT
4190 INPUT "HIT RETURN TO CONTINUE  ";Y$
4200 RETURN
6000 REM   END - SORT WINNER
6010 X= 2:IF N= 1THEN 6100
6020 FOR J= 1TO N- 1
6030 IF K(19,J)> K(19,J+ 1)THEN 6070
6040 K= K(19,J):K(19,J)= K(19,J+ 1):K(19,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   PRINT WINNERS STANDINGS
6110 RESTORE
6120 FOR J= 1TO N
6130 PLOT 6,C3,3,0,30,11,28,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,27,11,3,21,27
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 6300
6230 IF LEFT$ (Y$,1)< > "N"THEN PLOT 3,0,28,11:GOTO 6210
6240 PLOT 15,12,27,11
6250 END
6300 REM   CLEAR MATRICES
6310 FOR K= 1TO 6
6320 FOR J= 1TO 20
6330 K(J,K)= 0
6340 NEXT J
6350 A$(K)= ""
6360 NEXT K
6370 PLOT 15,12
6380 GOTO 20
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   ERASE DIE
7010 PLOT 6,C2
7020 PLOT 3,56,3* J+ 2
7030 PRINT SPC( 4)
7040 PLOT 3,56,3* J+ 3
7050 PRINT SPC( 4)
7060 PLOT 6,C1,3,0,26
7070 RETURN
8000 REM   PRINT DIE
8010 PLOT 6,57
8100 REM   UPPER/LOWER MIDDLE (6)
8110 IF DIE< 6THEN 8200
8115 PLOT 6,56
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   UPPER RIGHT/LOWER LEFT (4,5,6)
8205 IF DIE< 4THEN 8300
8206 IF DIE= 4THEN PLOT 6,61
8207 IF DIE= 5THEN PLOT 6,57
8208 IF DIE= 6THEN PLOT 6,56
8210 PLOT 3,59,3* J+ 2,2,254,51,255
8220 PLOT 3,56,3* J+ 3,2,254,204,255
8300 REM   UPPER LEFT/LOWER RIGHT (2,3,4,5,6)
8310 IF DIE= 1THEN 8400
8311 IF DIE= 2OR DIE= 5THEN PLOT 6,57
8312 IF DIE= 3OR DIE= 4THEN PLOT 6,61
8313 IF DIE= 6THEN PLOT 6,56
8320 PLOT 3,56,3* J+ 2,2,254,51,255
8330 PLOT 3,59,3* J+ 3,2,254,204,255
8400 REM   MIDDLE (1,3,5)
8410 IF DIE= 2OR DIE= 4OR DIE= 6THEN 8500
8411 IF DIE= 1THEN PLOT 6,56
8412 IF DIE= 3THEN PLOT 6,61
8413 IF DIE= 5THEN PLOT 6,57
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    GET OUT
8510 PLOT 6,C1
8520 RETURN