10 KEY OFF:CLS
20 SCREEN 0
30 WIDTH 40
40 PRINT"???????????????????????????????????????"
50 PRINT"??????????????????????????????????????"
60 PRINT"??                                   ??"
70 PRINT"??            2051-A.BAS             ??"
80 PRINT"??               SLOT                ??"
90 PRINT"??                                   ??"
100 PRINT"??                                   ??"
110 PRINT"?? BROUGHT TO YOU BY THE MEMBERS OF  ??"
120 PRINT"??      ????? ????? ????? ?????      ??"
130 PRINT"??        ?   ?   ? ?     ?   ?      ??"
140 PRINT"??        ?   ????? ?     ?   ?      ??"
150 PRINT"??        ?   ?     ?     ?   ?      ??"
160 PRINT"??      ????? ?     ????? ?????      ??"
170 PRINT"??                                   ??"
180 PRINT"??      International PC Owners      ??"
190 PRINT"??                                   ??"
200 PRINT"??P.O. Box 10426, Pittsburgh PA 15234??"
210 PRINT"??                                   ??"
220 PRINT"??????????????????????????????????????"
230 PRINT"???????????????????????????????????????"
240 PRINT
250 PRINT "       PRESS ANY KEY TO CONTINUE
260 A$=INKEY$: IF A$="" THEN 260
270 WIDTH 80
280 CLS
1000 REM ----------------------
1010 REM --- S L O T ----------
1020 REM ----------------------
1030 REM --- THIS PROGRAM SIMULATES A SLOT MACHINE.  THE FRUIT IS A DIRECT COPY
1040 REM --- OF THE FRUIT ON A REAL SLOT MACHINE.  THE PAYOFFS ARE THE SAME
1050 REM --- AS ON A REAL SLOT MACHINE.
1060 DEFINT A-Z
1070 DIM C1(23), C2(23), C3(23), X$(23), Y$(23), Z$(23)
1080 REM
1090 REM --- TRUE VALUE FOR WHEEL IS X$(2) THRU X$(21)
1100 REM ---                         Y$(2) THRU Y$(21)
1110 REM ---                         Z$(2) THRU Z$(21)
1120 DATA "ORANGE", "MELON ", "PLUM  ", "CHERRY", "PLUM  "
1130 DATA "ORANGE", "ST-LEM", "PLUM  ", "ORANGE", "CHERRY"
1140 DATA "BAR   ", "PLUM  ", "ORANGE", "BELL  ", "ORANGE"
1150 DATA "PLUM  ", "JOKER ", "PLUM  ", "ORANGE", "CHERRY"
1160 DATA "ORANGE", "MELON ", "PLUM  "
1170 DATA "CHERRY", "PLUM  ", "CHERRY", "OR-STR", "CHERRY"
1180 DATA "BELL  ", "PLUM  ", "BELL  ", "CHERRY", "JOKER "
1190 DATA "CHERRY", "MELON ", "PLUM  ", "BELL  ", "ORANGE"
1200 DATA "BAR   ", "ORANGE", "CHERRY", "BELL  ", "ORANGE"
1210 DATA "CHERRY", "PLUM  ", "CHERRY"
1220 DATA "BELL  ", "LEMON ", "PLUM  ", "PLUM  ", "LEMON "
1230 DATA "LEMON ", "BELL  ", "MELON ", "BELL  ", "PLUM  "
1240 DATA "BELL  ", "ORANGE", "JOKER ", "LEMON ", "BAR-ST"
1250 DATA "LEMON ", "BELL  ", "LEMON ", "BELL  ", "LEMON "
1260 DATA "BELL  ", "LEMON ", "PLUM  "
1270 REM --- S -- IS THE NET WINNINGS
1280 REM --- A -- IS THE COUNT FOR LOOP BETWEEN INPUTS
1290 REM --- A$ - IS THE CONTROL VARIBLE
1300 REM --- B$ - IS A DUMMY
1310 B = 1
1320 S = 0
1330 A = 0
1340 A$ = "RUN"
1350 B$ = "-------- TRY AGAIN"
1360 REM
1370 REM --- INITIALIZE WHEEL 1
1380 REM
1390 FOR I = 1 TO 23
1400 READ X$(I)
1410 NEXT I
1420 REM
1430 REM --- INITIALIZE WHEEL 2
1440 REM
1450 FOR I = 1 TO 23
1460 READ Y$(I)
1470 NEXT I
1480 REM
1490 REM --- INITIALIZE WHEEL 3
1500 REM
1510 FOR I = 1 TO 23
1520 READ Z$(I)
1530 NEXT I
1540 REM
1550 REM --- SET RANDOM NUMBER
1560 REM
1570 NUM = CVI(RIGHT$(TIME$,2))
1580 RANDOMIZE NUM
1590 CLS
1600 S = S - B
1610 W1 = INT(21*RND(NUM)+1)
1620 IF W1 < 2 THEN 1610
1630 W2 = INT(21*RND(NUM)+1)
1640 C1(W1) = C1(W1) + 1
1650 IF W2 < 2 THEN 1630
1660 C2(W2) = C2(W2) + 1
1670 W3 = INT(21*RND(NUM)+1)
1680 IF W3 < 2 THEN 1670
1690 C3(W3) = C3(W3) + 1
1700 REM ------- PRINT VALUES ON WHEELS
1710 PRINT X$(W1-1), Y$(W2-1), Z$(W3-1)
1720 PRINT X$(W1),   Y$(W2),   Z$(W3)
1730 PRINT X$(W1+1), Y$(W2+1), Z$(W3+1)
1740 REM --- PRINT CHARACTERS ON WHEELS
1750 REM --- 1ST CHAR ON 1ST WHEEL
1760 ROW = 6
1770 COLUMN = 1
1780 W$ = X$(W1-1)
1790 GOSUB 4100
1800 REM --- 2ND CHAR ON 1ST WHEEL
1810 ROW = 12
1820 COLUMN = 1
1830 W$ = X$(W1)
1840 GOSUB 4100
1850 REM --- 3ND CHAR ON 1ST WHEEL
1860 ROW = 18
1870 COLUMN = 1
1880 W$ = X$(W1+1)
1890 GOSUB 4100
1900 REM --- 1ST CHAR ON 2ND WHEEL
1910 ROW = 6
1920 COLUMN = 10
1930 W$ = Y$(W2-1)
1940 GOSUB 4100
1950 REM --- 2ND CHAR ON 2ND WHEEL
1960 ROW = 12
1970 COLUMN = 11
1980 W$ = Y$(W2)
1990 GOSUB 4100
2000 REM --- 3ND CHAR ON 2ND WHEEL
2010 ROW = 18
2020 COLUMN = 11
2030 W$ = Y$(W2+1)
2040 GOSUB 4100
2050 REM --- 1ST CHAR ON 3ND WHEEL
2060 ROW = 6
2070 COLUMN = 21
2080 W$ = Z$(W3-1)
2090 GOSUB 4100
2100 REM --- 2ND CHAR ON 3ND WHEEL
2110 ROW = 12
2120 COLUMN = 21
2130 W$ = Z$(W3)
2140 GOSUB 4100
2150 REM --- 3ND CHAR ON 3ND WHEEL
2160 ROW = 18
2170 COLUMN = 21
2180 W$ = Z$(W3+1)
2190 GOSUB 4100
2200 REM --- CHECK VALUE OF WHEELS
2210 W = 0
2220 IF X$(W1) = "CHERRY" THEN 2330
2230 IF X$(W1) = "ORANGE" THEN 2550
2240 IF X$(W1) = "PLUM  " THEN 2820
2250 IF X$(W1) = "BELL  " THEN 3000
2260 IF X$(W1) = "MELON " THEN 3180
2270 IF X$(W1) = "STAR  " THEN 3360
2280 IF X$(W1) = "JOKER " THEN 3520
2290 IF X$(W1-1) = "JOKER " THEN 3520
2300 IF X$(W1+1) = "JOKER " THEN 3520
2310 GOTO 3810
2320 REM
2330 IF Y$(W2) = "CHERRY" THEN 2410
2340 REM
2350 REM --- PAYOFF FOR CHERRY XXXXXX XXXXXX
2360 REM
2370 W = 2 * B
2380 S = S + W
2390 GOTO 3810
2400 REM
2410 IF Z$(W3) = "LEMON " THEN 2510
2420 REM
2430 REM --- PAYOFF FOR CHERRY CHERRY XXXXXX
2440 REM
2450 W = 4 * B
2460 S = S + W
2470 GOTO 3810
2480 REM
2490 REM --- PAYOFF FOR CHERRY CHERRY LEMON
2500 REM
2510 W = 6 * B
2520 S = S + W
2530 GOTO 3810
2540 REM
2550 IF Y$(W2) = "ORANGE" THEN 2630
2560 IF Y$(W2) = "MELON " THEN 2680
2570 REM
2580 REM --- NO WIN
2590 REM
2600 W = 0
2610 GOTO 3810
2620 REM
2630 IF Z$(W3) = "ORANGE" THEN 2780
2640 IF Z$(W3) = "MELON " THEN 2780
2650 IF Z$(W3) = "BAR   " THEN 2780
2660 GOTO 2600
2670 REM
2680 IF Z$(W3) = "MELON " THEN 2780
2690 IF Z$(W3) = "ORANGE" THEN 2780
2700 GOTO 2600
2710 REM
2720 REM --- PAYOFF FOR ORANGE ORANGE ORANGE
2730 REM                ORANGE ORANGE MELON
2740 REM                ORANGE ORANGE BAR
2750 REM                ORANGE MELON  ORANGE
2760 REM                ORANGE MELON  MELON
2770 REM
2780 W = 10 * B
2790 S = S + W
2800 GOTO 3810
2810 REM
2820 IF Y$(W2) = "PLUM  " THEN 2890
2830 REM
2840 REM --- NO WIN
2850 REM
2860 W = 0
2870 GOTO 3810
2880 REM
2890 IF Z$(W3) = "PLUM  " THEN 2960
2900 IF Z$(W3) = "BAR   " THEN 2960
2910 GOTO 2860
2920 REM
2930 REM --- PAYOFF FOR PLUM   PLUM   PLUM
2940 REM                PLUM   PLUM   BAR
2950 REM
2960 W = 14 * B
2970 S = S + W
2980 GOTO 3810
2990 REM
3000 IF Y$(W2) = "BELL  " THEN 3070
3010 REM
3020 REM --- NO WIN
3030 REM
3040 W = 0
3050 GOTO 3810
3060 REM
3070 IF Z$(W3) = "BELL  " THEN 3140
3080 IF Z$(W3) = "BAR   " THEN 3140
3090 GOTO 3040
3100 REM
3110 REM --- PAYOFF FOR BELL   BELL   BELL
3120 REM                BELL   BELL   BAR
3130 REM
3140 W = 18 * B
3150 S = S + W
3160 GOTO 3810
3170 REM
3180 IF Y$(W2) = "MELON " THEN 3250
3190 REM
3200 REM --- NO WIN
3210 REM
3220 W = 0
3230 GOTO 3810
3240 REM
3250 IF Z$(W3) = "MELON " THEN 3320
3260 IF Z$(W3) = "BAR   " THEN 3320
3270 GOTO 3220
3280 REM
3290 REM --- PAYOFF FOR MELON  MELON  MELON
3300 REM                MELON  MELON  BAR
3310 REM
3320 W = 150 * B
3330 S = S + W
3340 GOTO 3810
3350 REM
3360 IF Y$(W2) = "STAR  " THEN 3430
3370 REM
3380 REM --- NO WIN
3390 REM
3400 W = 0
3410 GOTO 3810
3420 REM
3430 IF Z$(W3) = "STAR  " THEN 3480
3440 GOTO 3220
3450 REM
3460 REM --- PAYOFF FOR STAR   STAR   STAR
3470 REM
3480 W = 200 * B
3490 S = S + W
3500 GOTO 3810
3510 REM
3520 IF Y$(W2)   = "JOKER " THEN 3610
3530 IF Y$(W2-1) = "JOKER " THEN 3610
3540 IF Y$(W2+1) = "JOKER " THEN 3610
3550 REM
3560 REM --- NO WIN
3570 REM
3580 W = 0
3590 GOTO 3810
3600 REM
3610 IF Z$(W3)   = "JOKER " THEN 3680
3620 IF Z$(W3-1) = "JOKER " THEN 3680
3630 IF Z$(W3+1) = "JOKER " THEN 3680
3640 GOTO 3580
3650 REM
3660 REM --- PAYOFF FOR JOKER  JOKER  JOKER
3670 REM
3680 W = 18 * B
3690 S = S + W
3700 GOTO 3810
3710 REM
3720 REM --- PRINT VALUES OF WHEELS
3730 REM
3740 PRINT
3750 PRINT X$(W1-1), Y$(W2-1), Z$(W3-1)
3760 PRINT X$(W1),   Y$(W2),   Z$(W3)
3770 PRINT X$(W1+1), Y$(W3+1), Z$(W3+1)
3780 PRINT
3790 PRINT
3800 REM
3810 PRINT
3820 IF W = 0 THEN 3870
3830 BEEP
3840 PRINT "YOU WON "; W; "YOUR NET IS NOW "; S
3850 BEEP
3860 GOTO 3890
3870 PRINT "YOU LOST"; B$
3880 PRINT "YOUR NET IS NOW "; S
3890 IF A$ = "AUTO" THEN 3910
3900 GOTO 3940
3910 A = A + 1
3920 IF A < 100 THEN 1600
3930 A = 0
3940 INPUT A$
3950 IF A$ = "STOP" THEN 4020
3960 IF A$ = "END" THEN 4020
3970 REM
3980 REM --- GO BACK AND GET A NEW RANDOM NUMBER
3990 REM
4000 IF A$ = "NEW" THEN 1550
4010 GOTO 1590
4020 REM --- PRINT TOTAL FOR WHEELS TO DETERMINE TRUE RANDOMNESS
4030 CLS
4040 PRINT "NUMBER", "WHEEL 1", "WHEEL 2", "WHEEL 3", "TOTAL"
4050 FOR I = 2 TO 21
4060 T = C1(I) + C2(I) + C3(I)
4070 PRINT I-1, C1(I), C2(I), C3(I), T
4080 NEXT I
4090 END
4100 REM --- SUBROUTINE TO PRINT CHARACTERS ON WHEELS
4110 IF W$ = "CHERRY" THEN 4250
4120 IF W$ = "PLUM  " THEN 4310
4130 IF W$ = "ORANGE" THEN 4370
4140 IF W$ = "JOKER " THEN 4430
4150 IF W$ = "MELON " THEN 4490
4160 IF W$ = "LEMON " THEN 4550
4170 IF W$ = "BELL  " THEN 4610
4180 IF W$ = "ST-LEM" THEN 4670
4190 IF W$ = "BAR-ST" THEN 4730
4200 IF W$ = "BAR   " THEN 4790
4210 IF W$ = "OR-STR" THEN 4850
4220 LOCATE ROW,COLUMN
4230 PRINT W$
4240 RETURN
4250 REM --- CHERRY
4260 LOCATE ROW,COLUMN
4270 PRINT CHR$(32);CHR$(223);CHR$(219);CHR$(219);CHR$(219);CHR$(223);CHR$(32)
4280 LOCATE ROW+1,COLUMN
4290 PRINT CHR$(219);CHR$(219);CHR$(32);CHR$(32);CHR$(32);CHR$(219);CHR$(219)
4300 RETURN
4310 REM --- PLUM
4320 LOCATE ROW,COLUMN
4330 PRINT CHR$(201);CHR$(203);CHR$(203);CHR$(203);CHR$(203);CHR$(203);CHR$(187)
4340 LOCATE ROW+1,COLUMN
4350 PRINT CHR$(200);CHR$(202);CHR$(202);CHR$(202);CHR$(202);CHR$(202);CHR$(188)
4360 RETURN
4370 REM --- ORANGE
4380 LOCATE ROW,COLUMN
4390 PRINT CHR$(204);CHR$(206);CHR$(206);CHR$(206);CHR$(206);CHR$(206);CHR$(185)
4400 LOCATE ROW+1,COLUMN
4410 PRINT CHR$(223);CHR$(223);CHR$(219);CHR$(219);CHR$(219);CHR$(223);CHR$(223)
4420 RETURN
4430 REM --- JOKER
4440 LOCATE ROW,COLUMN
4450 PRINT CHR$(2);CHR$(2);CHR$(2);CHR$(2);CHR$(2);CHR$(2);CHR$(2)
4460 LOCATE ROW+1,COLUMN
4470 PRINT CHR$(2);CHR$(2);CHR$(2);CHR$(2);CHR$(2);CHR$(2);CHR$(2)
4480 RETURN
4490 REM --- MELON
4500 LOCATE ROW,COLUMN
4510 PRINT CHR$(220);CHR$(219);CHR$(219);CHR$(219);CHR$(219);CHR$(219);CHR$(220)
4520 LOCATE ROW+1,COLUMN
4530 PRINT CHR$(223);CHR$(219);CHR$(219);CHR$(219);CHR$(219);CHR$(219);CHR$(223)
4540 RETURN
4550 REM --- LEMON
4560 LOCATE ROW,COLUMN
4570 PRINT CHR$(220);CHR$(178);CHR$(178);CHR$(178);CHR$(178);CHR$(178);CHR$(220)
4580 LOCATE ROW+1,COLUMN
4590 PRINT CHR$(223);CHR$(178);CHR$(178);CHR$(178);CHR$(178);CHR$(178);CHR$(223)
4600 RETURN
4610 REM --- BELL
4620 LOCATE ROW,COLUMN
4630 PRINT CHR$(220);CHR$(219);CHR$(219);CHR$(219);CHR$(219);CHR$(219);CHR$(220)
4640 LOCATE ROW+1,COLUMN
4650 PRINT CHR$(223);CHR$(223);CHR$(219);CHR$(219);CHR$(219);CHR$(223);CHR$(223)
4660 RETURN
4670 REM --- STAR/LEMON
4680 LOCATE ROW,COLUMN
4690 PRINT CHR$(220);CHR$(219);CHR$(219);CHR$(219);CHR$(219);CHR$(219);CHR$(220)
4700 LOCATE ROW+1,COLUMN
4710 PRINT CHR$(223);CHR$(223);CHR$(219);CHR$(219);CHR$(219);CHR$(223);CHR$(223)
4720 RETURN
4730 REM --- BAR/STAR
4740 LOCATE ROW,COLUMN
4750 PRINT CHR$(220);CHR$(220);CHR$(220);CHR$(219);CHR$(220);CHR$(220);CHR$(220)
4760 LOCATE ROW+1,COLUMN
4770 PRINT CHR$(223);CHR$(219);CHR$(223);CHR$(223);CHR$(223);CHR$(219);CHR$(223)
4780 RETURN
4790 REM --- BAR
4800 LOCATE ROW,COLUMN
4810 PRINT CHR$(220);CHR$(220);CHR$(220);CHR$(220);CHR$(220);CHR$(220);CHR$(220)
4820 LOCATE ROW+1,COLUMN
4830 PRINT CHR$(223);CHR$(223);CHR$(223);CHR$(223);CHR$(223);CHR$(223);CHR$(223)
4840 RETURN
4850 REM --- ORANGE/STAR
4860 LOCATE ROW,COLUMN
4870 PRINT CHR$(32);CHR$(223);CHR$(219);CHR$(219);CHR$(219);CHR$(223);CHR$(32)
4880 LOCATE ROW+1,COLUMN
4890 PRINT CHR$(219);CHR$(219);CHR$(32);CHR$(32);CHR$(32);CHR$(219);CHR$(219)
4900 RETURN
HR$(32)
4880 LOCATE ROW+1,COLUMN
4890 PRINT CHR$(219);CHR$(219);CHR$(32);CHR$(32);CHR$(32);CHR$(219);CHR$(219)
4