-
Notifications
You must be signed in to change notification settings - Fork 0
/
CRAPS.BAS
87 lines (86 loc) · 2.63 KB
/
CRAPS.BAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
2 PRINT CHR$(26):WIDTH 80
5 PRINT TAB(33);"CRAPS":PRINT
10 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY"
12 PRINT:PRINT:PRINT
15 LET R=0
20 PRINT"2,3,12 ARE LOSERS; 4,5,6,8,9,10 ARE POINTS; 7,11 ARE NATURAL WINNERS."
21 LET T=1:PRINT:PRINT "ENTER A NEGATIVE BET TO QUIT."
22 PRINT: PRINT "ENTER A RANDOM NUMBER BETWEEN 1 AND 100 TO START THE GAME ";
23 INPUT Z:PRINT
24 LET X=(RND(0))
25 LET T =T+1
26 IF T<=Z GOTO 24
27 PRINT:PRINT"INPUT THE AMOUNT OF YOUR WAGER ";
28 INPUT F:IF F<0 THEN 341
29 PRINT
30 PRINT "I WILL NOW THROW THE DICE: ":PRINT
40 LET E=INT(7*RND(1))
41 LET S=INT(7*RND(1))
42 LET X=E+S
50 IF X=7 GOTO 180
55 IF X=11 GOTO 180
60 IF X=1 GOTO 40
62 IF X=2 GOTO 195
65 IF X=0 GOTO 40
70 IF X=2 GOTO 200
80 IF X=3 GOTO 200
90 IF X=12 GOTO 200
125 IF X=5 GOTO 220
130 IF X =6 GOTO 220
140 IF X=8 GOTO 220
150 IF X=9 GOTO 220
160 IF X =10 GOTO 220
170 IF X=4 GOTO 220
180 PRINT X "- NATURAL....A WINNER!!!!"
185 PRINT:PRINT X"PAYS EVEN MONEY, YOU WIN"F"DOLLARS."
190 GOTO 210
195 PRINT X"- SNAKE EYES....YOU LOSE."
196 PRINT:PRINT "YOU LOSE"F "DOLLARS."
197 LET F=0-F
198 GOTO 210
200 PRINT USING "##";X;:PRINT " - CRAPS...YOU LOSE."
205 PRINT:PRINT "YOU LOSE"F"DOLLARS."
206 LET F=0-F
210 LET R= R+F
211 GOTO 320
220 PRINT X "IS THE POINT. I WILL ROLL AGAIN:":PRINT
230 LET H=INT(7*RND(1))
231 LET Q=INT(7*RND(1))
232 LET O=H+Q
240 IF O=1 GOTO 230
250 IF O=7 GOTO 290
255 IF O=0 GOTO 230
260 IF O=X GOTO 310
270 PRINT USING "##";O;:PRINT " - NO POINT. I WILL ROLL AGAIN:"
280 GOTO 230
290 PRINT O "- CRAPS. YOU LOSE."
291 PRINT:PRINT "YOU LOSE"F"DOLLARS."
292 F=0-F
293 GOTO 210
300 GOTO 320
310 PRINT X"- A WINNER.........CONGRATS!!!!!!!!"
311 PRINT:PRINT X "AT 2 TO 1 ODDS PAYS YOU...LET ME SEE..."2*F"DOLLARS."
312 LET F=2*F
313 GOTO 210
320 PRINT:' PRINT "DO YOU WANT TO CONTINUE ";
330 ' INPUT M$
331 IF R<0 GOTO 334
332 IF R>0 GOTO 336
333 IF R=0 GOTO 338
334 PRINT CHR$(22);" YOU ARE NOW BEHIND $";-R;CHR$(8);". ";CHR$(22)
335 GOTO 340
336 PRINT CHR$(22);" YOU ARE NOW AHEAD $";R;CHR$(8);". ";CHR$(22)
337 GOTO 340
338 PRINT CHR$(22);" YOU ARE NOW EVEN.";" ";CHR$(22)
340 GOTO 27:' IF LEFT$(M$,1)="Y" GOTO 27
341 IF R<0 GOTO 350
342 IF R>0 GOTO 353
343 IF R=0 GOTO 355
350 PRINT:PRINT"TOO BAD, YOU ARE IN THE HOLE. COME AGAIN.":PRINT
351 GOTO 360
353 PRINT:PRINT"CONGRATULATIONS---YOU CAME OUT A WINNER. COME AGAIN!":PRINT
354 GOTO 360
355 PRINT:PRINT"CONGRATULATIONS---YOU CAME OUT EVEN, NOT BAD FOR AN AMATEUR!":
PRINT
360 RUN "MENU"