home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
cpmug
/
cpmug013.ark
/
DICE.BAS
< prev
next >
Wrap
BASIC Source File
|
1984-04-29
|
7KB
|
250 lines
1 REM WRITTEN BY: ROY A. WILSON
2 REM CERRITOS COLLEGE
3 REM NORWALK, CALIFORNIA
4 REM
5 REM
10 FOR I=1 TO 10:PRINT:NEXT I
25 PRINT TAB(20);"***** DICE *****":FOR I=1 TO 10:PRINT:NEXT I
20 PRINT "HI. WOULD YOU LIKE TO ROLL THE DICE WITH ME";
30 INPUT A$
40 T = 100
50 IF A$ = "Y" THEN 80
60 IF A$ = "YES" THEN 80
65 PRINT
70 PRINT"BEAT IT KID, YOU BOTHER ME."
72 PRINT
75 GOTO 1820
80 PRINT
90 PRINT"O.K., BUT I DON'T PLAY WITH STRANGERS."
95 PRINT"WHAT'S YOUR NAME?"
100 PRINT
110 INPUT N$
150 PRINT
160 PRINT
180 GOSUB 1830
185 IF G>0 THEN 210
190 PRINT"WOULD YOU LIKE THE RULES, ";N$;
200 GOTO 230
210 IF G>1 THEN 440
220 PRINT "WOULD YOU LIKE THE RULES AGAIN";
230 INPUT A$
240 IF LEFT$(A$,1)<>"Y" THEN 440
250 GOSUB 1830
260 PRINT"YOU MUST BET AT LEAST ONE DOLLAR TO PLAY,AND YOU"
265 PRINT"CANNOT BET MORE THAN YOU HAVE. IF YOU BET A NEGATIVE"
270 PRINT"AMOUNT, YOU WILL BE BETTING ON THE 'DON'T PASS' LINE."
272 PRINT
275 PRINT"HERE ARE THE RULES FOR THE 'PASS' LINE."
280 PRINT"IF YOU ROLL A SEVEN OR AN ELEVEN ON THE FIRST"
290 PRINT"ROLL OF THE DICE, YOU WIN THE BET."
300 PRINT
310 PRINT"IF YOU ROLL A TWO, THREE, OR TWELVE ON THE FIRST"
315 PRINT"ROLL OF THE DICE, YOU LOSE THE BET."
320 PRINT
330 PRINT"UNDERSTAND SO FAR?"
335 INPUT A$
336 IF LEFT$(A$,1)<>"Y" THEN PRINT"YOU'RE NOT TOO SWIFT..."
340 PRINT
350 PRINT"AFTER YOU HAVE YOUR POINT, YOU CONTINUE ROLLING"
355 PRINT"THE DICE UNTIL EITHER YOUR POINT COMES UP AGAIN"
360 PRINT"OR THE NUMBER SEVEN DOES."
365 PRINT
370 PRINT"IF YOUR POINT COMES UP BEFORE THE NUMBER SEVEN,"
375 PRINT"YOU WIN. HOWEVER, IF THE SEVEN APPEARS FIRST"
380 PRINT"YOU LOSE THE BET AND MUST START OVER AGAIN."
390 PRINT
400 PRINT
410 PRINT "READY TO PLAY, ";N$;
420 INPUT A$
430 IF LEFT$(A$,1) <> "Y" THEN 1790
440 GOSUB 1830
500 IF G>0 THEN 515
510 PRINT "OK ";N$;", HERE'S $100.00. SEE WHAT YOU CAN DO."
515 PRINT: V=0
516 PRINT" NOTE: A BET OF ZERO ENDS THE GAME."
520 PRINT
530 T$ = STR$(T)
540 PRINT "YOU HAVE $";T$;". HOW MUCH WOULD YOU LIKE TO BET";
550 INPUT B1
555 GOSUB 1830
560 B = INT(ABS(B1))
570 B$ = STR$(B)
572 IF B1 >= 0 THEN 588
573 IF ABS(B1) > T THEN 610
574 IF V>0 THEN 582
575 PRINT"NOW YOU'RE BETTING AGAINST THE SHOOTER."
576 PRINT:PRINT
577 PRINT" D O N ' T P A S S - B A R 1 2"
578 PRINT:PRINT
579 INPUT "IS THAT WHAT YOU WANT";A$
580 IF LEFT$(A$,1) <> "Y" THEN 540
582 M=1:V=1
585 GOTO 600
588 IF B1=0 THEN 650
590 IF ABS(B1)>B THEN 700
600 IF B<=T THEN 750
610 PRINT
620 PRINT"YOU DON'T HAVE THAT MUCH!"
630 PRINT
640 GOTO 520
650 PRINT
660 PRINT
670 PRINT "CHEAPSKATE. I DON'T ACCEPT SUCH SMALL BETS."
680 PRINT
690 GOTO 1820
700 PRINT
730 PRINT "WHAT KIND OF FUNNY MONEY BET IS THAT?"
740 GOTO 520
750 GOSUB 1830
760 PRINT "OK ";N$;", SHOOTER COMING OUT!"
790 GOSUB 1660
820 GOSUB 1040
830 IF T = 0 THEN 1370
840 IF R = 0 THEN 520
850 PRINT"YOUR POINT IS ";P;" YOUR BET IS $";B$
880 PRINT
890 PRINT " ROLL AGAIN";
900 INPUT A$
940 IF LEFT$(A$,1)="N" THEN 950
942 GOSUB 1830
945 GOTO 790
950 PRINT
960 PRINT"WELL, LET THE PAYING CUSTOMERS UP TO THE TABLE..."
965 GOTO 1000
970 PRINT"O.K., ";N$;","
980 PRINT "IF YOU DON'T WANT TO BET, YOU CAN'T PLAY!"
990 PRINT "TAKE YOUR MONEY AND GO HOME. THE GAME IS OVER."
1000 PRINT
1010 PRINT "YOU STARTED WITH $100. YOU NOW HAVE $";T$
1020 PRINT "PLEASE SEE THE CASHIER."
1030 GOTO 1460
1040 R = R+1
1050 IF R = 1 THEN 1090
1060 IF D=7 AND M=0 THEN 1280
1065 IF D=7 AND M=1 THEN 1190
1070 IF P=D AND M=0 THEN 1190
1075 IF P=D AND M=1 THEN 1280
1080 GOTO 1140
1090 IF D=7 AND M=0 THEN 1190
1095 IF D=7 AND M=1 THEN 1280
1100 IF D=11 AND M=0 THEN 1190
1105 IF D=11 AND M=1 THEN 1280
1110 IF D<=3 AND M=0 THEN 1280
1115 IF D<=3 AND M=1 THEN 1190
1120 IF D=12 THEN 1280
1130 P = D
1140 PRINT
1150 PRINT
1170 GOTO 1360
1180 PRINT
1190 PRINT: M=0
1200 PRINT
IF B1 < 0 THEN 1220
1210 PRINT"+++++++++++ P A S S B E T ++++++++++"
1215 GOTO 1222
1220 PRINT"+++++ D O N ' T P A S S B E T +++++"
1222 PRINT
1225 OUT 1,7
1230 PRINT"YOU WIN! YOUR BET WAS $";B$
1231 IF R>1 THEN PRINT "YOUR POINT WAS ";P,
1232 PRINT"YOU ROLLED A ";D
1233 FOR J = 1 TO 100
1234 NEXT J
1236 OUT 1,7
1240 T =T+B
1250 T$ = STR$(T)
1260 R = 0
1270 GOTO 1360
1280 PRINT:M=0
1290 PRINT
IF B1 < 0 THEN 1305
1300 PRINT"+++++++++++ P A S S B E T ++++++++++"
1302 GOTO 1307
1305 PRINT"+++++ D O N ' T P A S S B E T +++++"
1307 PRINT
1310 OUT 1,7
1320 PRINT"YOU LOSE. YOUR BET WAS $";B$
1325 IF R>1 THEN PRINT "YOUR POINT WAS ";P,
1326 PRINT "YOU ROLLED A ";D
1330 T = T-B
1340 T$ = STR$(T)
1350 R = 0
1360 RETURN
1370 PRINT
1380 PRINT"+++++++++++++++++++++++++++++++++++++++++++++"
1390 ON G+1 GOTO 1400,1440,1470,1500
1400 PRINT
1410 PRINT "YOU TURKEY ---- YOU LOST ALL YOUR MONEY!!!"
1420 PRINT " NOW WHAT WILL YOU TELL YOUR FAMILY?"
1430 GOTO 1560
1440 PRINT
1450 PRINT "AWW - TOO BAD. YOU DON'T HAVE ANYMORE MONEY."
1460 GOTO 1560
1470 PRINT
1480 PRINT"HEY, ";N$;", DON'T YOU GET TIRED OF LOSING?"
1485 PRINT"NOW YOUR MONEY IS ALL GONE."
1490 GOTO 1560
1500 PRINT
1510 PRINT "DON'T GO TO LAS VEGAS!!! BESIDES, YOU'RE BROKE."
1520 G = -1
1560 PRINT
1570 PRINT "WANT TO PLAY AGAIN";
1580 INPUT A$
1590 IF LEFT$(A$,1)="N" THEN 1790
1600 T = 100
1610 T$ = STR$(T)
1620 PRINT
1630 PRINT "ALRIGHT, YOU START OVER AGAIN WITH $100.00"
1640 G = G+1
1650 GOTO 150
1660 D1 = 6.99*RND
1670 IF D1 <1.0 THEN 1660
1680 D1 = INT(D1)
1690 D2 = 6.99*RND
1700 IF D2 < 1.0 THEN 1690
1710 D2 = INT(D2)
1720 D = D1+D2
1730 GOSUB 2000
1750 PRINT" ";D1;" ";D2
1780 RETURN
1790 GOSUB 1830
1820 PRINT,"G A M E I S O V E R "
1825 GOTO 5000
1830 FOR J=1 TO 18
1840 PRINT
1850 NEXT J
1860 RETURN
2000 REM +++++++ DRAW DICE +++++++++++++++++
2005 PRINT". . . . . . . . . . . . . ."
2010 ON D1 GOSUB 2100,2200,2200,2500,2500,2500
2020 ON D2 GOSUB 3100,3200,3200,3500,3500,3500
2030 ON D1 GOSUB 2300,2100,2300,2100,2300,2500
2040 ON D2 GOSUB 3300,3100,3300,3100,3300,3500
2050 ON D1 GOSUB 2100,2400,2400,2500,2500,2500
2060 ON D2 GOSUB 3100,3400,3400,3500,3500,3500
2065 PRINT"' ' ' ' ' ' ' ' ' ' ' ' ' '"
2070 RETURN
2100 PRINT": : ";
2110 RETURN
2200 PRINT": * : ";
2210 RETURN
2300 PRINT": * : ";
2310 RETURN
2400 PRINT": * : ";
2410 RETURN
2500 PRINT": * * : ";
2510 RETURN
2610 RETURN
3100 PRINT": :"
3110 RETURN
3200 PRINT": * :"
3210 RETURN
3300 PRINT": * :"
3310 RETURN
3400 PRINT": * :"
3410 RETURN
3500 PRINT": * * :"
3510 RETURN
5000 END