home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
cpmug
/
cpmug037.ark
/
CRAPS.BAS
< prev
next >
Wrap
BASIC Source File
|
1984-04-29
|
41KB
|
1,203 lines
REM ******************************************************
REM THE FOLLOWING SECTIONS SEEM TO BE DONE:
REM BIG EIGHT
REM BIG SIX
REM FIELD
REM COME
REM PLACE
REM HARDWAYS
REM LINE
REM ODDS
REM ******************************************************
REM THIS IS THE GAME OF CRAPS. I WILL TRY AND INCLUDE ALL
REM BETS AVAILABLE ONE AT A TIME.
PRINT"If you would like an explaination of the accounting"
INPUT" practices used in this program put in an 'X' now ";LINE X$
IF X$="X" THEN GOSUB 800
INPUT"How much money are you starting with? ";LINE OLD.WINNINGS$
RANDOMIZE
REAL.OLD.WINNINGS=VAL(OLD.WINNINGS$)
OLD.WINNINGS=VAL(OLD.WINNINGS$)
FIRST%= - 1
DIM COME.BET(12),COME.POINT%(12), \
PLACE.POINT%(12),PLACE(12),LINE.ODDS(12), \
PLACE.ODDS.AMOUNT(12),COME.ODDS.AMOUNT(12),\
DICE.ROLL1%(100),DICE.ROLL2%(100),DICE.ROLL.TOTAL%(100)
REM ***************************************************
REM ************* BETS ****************************
REM ***************************************************
1.11 IF AFTER.ROLL% THEN \
PRINT :\
PRINT DIE.ONE%;"+";DIE.TWO%;"=";ROLL%,"Was the Roll"
IF AFTER.ROLL% AND WINNINGS<>OLD.ROLL.WINNINGS THEN \
PRINT"Before the roll you had...$";OLD.ROLL.WINNINGS :\
PRINT"you now have...$";WINNINGS :\
PRINT"Your net gain or loss on last roll was ";OLD.ROLL.WINNINGS-WINNINGS :\
PRINT"Your balance for game now $";WINNINGS
PRINT
4:
IF AFTER.ROLL% THEN \
INPUT"Hit return when ready";LINE TEMP$
AFTER.ROLL%=0
PRINT CHR$(12)
IF FIRST% AND LINE.BET<1 THEN \
PRINT"COMING OUT!! GET ON THE LINE!!!"
IF FIRST% AND LINE.BET>1 THEN PRINT "STILL COMING OUT!!"
PRINT
PRINT"To take bets off when coming out only answer with 'OFF'..."
PRINT"To take bets off answer with 'PLACE', 'HARD' or 'FIELD', etc."
PRINT
PRINT"To take odds on the line or place, or come answer with 'ODDS'"
PRINT"To get list of current bets answer next question with 'BETS'"
PRINT"To get list of available bets answer next question with 'LIST'"
PRINT"When betting first put in the bet code <CR> then the bet <CR>"
PRINT"If you want to quit put in an 'S' or 'STOP'...."
PRINT
INPUT"BET..........";LINE BETS$
RANDOMIZE
BETS$=UCASE$(BETS$)
IF BETS$="S" OR BETS$="STOP" THEN GOTO 9999
IF VAL(BETS$)>19 THEN \
PRINT"There aren't that many bets available!!!" :\
GOTO 1.11
IF BETS$="LIST" THEN GOSUB 5000 :\
GOTO 1.11
IF BETS$="OFF" THEN \
OFF%=-1 :\
GOTO 1.11
IF BETS$="BETS" THEN GOSUB 4500 :\
GOTO 1.11
IF BETS$="PLACE" THEN GOSUB 12 :\
GOTO 1.11
IF BETS$="FIELD" THEN GOSUB 14 :\
GOTO 1.11
IF BETS$="HARD" THEN GOSUB 15 :\
GOTO 1.11
IF BETS$="ODDS" THEN GOSUB 16 :\
GOTO 1.11
IF VAL(BETS$)<1 THEN GOTO 100
BETS%=VAL(BETS$)
ON BETS% GOSUB 10.1,10.2,10.3,10.4,10.5,10.6, \
10.7,10.8,10.9,11,11.1,11.2,11.3,11.4, \
11.5,11.6,11.7
GOTO 1.11
10.1 INPUT "How much do you want to bet on the line?";LINE LINE.BET$
IF VAL(LINE.BET$)<1 THEN RETURN
LET LINE.BET=VAL(LINE.BET$)
WINNINGS=WINNINGS - LINE.BET
RETURN
10.2 INPUT "How much do you want to bet on the Hard four?";LINE HARD4$
IF VAL(HARD4$)<1 THEN RETURN
HARD4=VAL(HARD4$)
WINNINGS=WINNINGS - HARD4
RETURN
10.3 INPUT "How much do you want to bet on the Hard 10?";LINE HARD10$
IF VAL(HARD10$)<1 THEN RETURN
LET HARD10=VAL(HARD10$)
WINNINGS=WINNINGS - HARD10
RETURN
10.4 INPUT "How much do you want to bet on the Hard 6?";LINE HARD6$
IF VAL(HARD6$)<1 THEN RETURN
LET HARD6=VAL(HARD6$)
WINNINGS=WINNINGS - HARD6
RETURN
10.5 INPUT "How much do you want to bet on the Hard 8?";LINE HARD8$
IF VAL(HARD8$)<1 THEN RETURN
LET HARD8=VAL(HARD8$)
WINNINGS=WINNINGS - HARD8
RETURN
10.6 IF FIRST% THEN \
PRINT"No come bets when coming out!!" :\
RETURN
INPUT"How much do you want to bet on the Come Line?";LINE COME$
IF VAL(COME$)<1 THEN RETURN
COME=VAL(COME$)
WINNINGS=WINNINGS - COME
RETURN
10.7 INPUT"How much do you want on the BIG SIX?";LINE BIG.SIX$
IF VAL(BIG.SIX$)<1 THEN RETURN
LET BIG.SIX=VAL(BIG.SIX$)
WINNINGS=WINNINGS - BIG.SIX
RETURN
10.8 INPUT"How much do you want on the BIG EIGHT?";LINE BIG.EIGHT$
IF VAL(BIG.EIGHT$)<1 THEN RETURN
LET BIG.EIGHT=VAL(BIG.EIGHT$)
WINNINGS=WINNINGS - BIG.EIGHT
RETURN
10.9 INPUT"How much do you want on the FIELD?";LINE FIELD$
IF VAL(FIELD$)<1 THEN RETURN
LET FIELD=VAL(FIELD$)
WINNINGS=WINNINGS - FIELD
RETURN
11 INPUT"What number do you want to Place? ";PLACE.POINT$
IF VAL(PLACE.POINT$)<1 THEN GOTO 11
NUMBER.PLACE%=VAL(PLACE.POINT$)
PLACE.POINT%(NUMBER.PLACE%)=VAL(PLACE.POINT$)
IF (PLACE.POINT%(NUMBER.PLACE%)=4 OR PLACE.POINT%(NUMBER.PLACE%)= \
10) OR (PLACE.POINT%(NUMBER.PLACE%)=5 OR \
PLACE.POINT%(NUMBER.PLACE%)=9) THEN \
PRINT"Remember, you must bet in UNITS OF 5 on that number" :\
PRINT"How much do you want to place on the ";PLACE.POINT%(NUMBER.PLACE%) :\
INPUT PLACE(NUMBER.PLACE%)
WINNINGS=WINNINGS - PLACE(NUMBER.PLACE%)
IF PLACE.POINT%(NUMBER.PLACE%)=6 OR \
PLACE.POINT%(NUMBER.PLACE%)=8 THEN \
PRINT"Remember, you must bet in UNITS OF SIX on that number" :\
PRINT"How much do you want to place on the ";PLACE.POINT%(NUMBER.PLACE%) :\
INPUT PLACE(NUMBER.PLACE%)
WINNINGS=WINNINGS - PLACE(NUMBER.PLACE%)
PRINT"You have placed the following bets so far"
PRINT"NUMBER BET"
FOR I%=4 TO 10
IF PLACE(I%)>0 THEN \
PRINT PLACE.POINT%(I%); :\
PRINT TAB(25);PLACE(I%)
NEXT I%
INPUT"Would you like to place any more bets? ";LINE Y$
Y$=UCASE$(Y$)
IF Y$="Y" OR Y$="YES" THEN GOTO 11 ELSE RETURN
REM **********************************************************
REM ** THE FOLLOWING SECTION WILL TAKE ONE TIME AND HORN BETS*
REM **********************************************************
11.1 REM HORN BET
INPUT"How much on the horn?";LINE HORN$
HORN$=UCASE$(HORN$)
LET HORN=VAL(HORN$)
WINNINGS=WINNINGS-HORN
RETURN
11.2 REM SINGLE ROLL BET ON THE SEVEN
INPUT"How much on the Seven?...";LINE SEVEN$
SEVEN$=UCASE$(SEVEN$)
SEVEN=VAL(SEVEN$)
WINNINGS=WINNINGS-SEVEN
RETURN
11.3 REM SINGLE ROLL BET ON ANY CRAPS
INPUT"How much on Any Craps?...";LINE ANY$
ANY$=UCASE$(ANY$)
ANY=VAL(ANY$)
WINNINGS=WINNINGS-ANY
RETURN
11.4 REM SINGLE ROLL BET ON THE ELEVEN
INPUT"How much on the Eleven?...";LINE ELEVEN$
ELEVEN$=UCASE$(ELEVEN$)
ELEVEN=VAL(ELEVEN$)
WINNINGS=WINNINGS-ELEVEN
RETURN
11.5 REM SINGLE ROLL BET ON THE TWO
INPUT"How much on the Two?...";LINE EYES$
EYES$=UCASE$(EYES$)
EYES=VAL(EYES$)
WINNINGS=WINNINGS-EYES
RETURN
11.6 REM SINGLE ROLL BET ON THE TWELVE
INPUT"How much on the Twelve?...";LINE TWELVE$
TWELVE$=UCASE$(TWELVE$)
TWELVE=VAL(TWELVE$)
WINNINGS=WINNINGS-TWELVE
RETURN
11.7 REM SINGLE ROLL BET ON THE THREE
INPUT"How much on the Three?...";LINE THREE$
THREE$=UCASE$(THREE$)
THREE=VAL(THREE$)
WINNINGS=WINNINGS-THREE
RETURN
REM **********************************************************
REM ** THE FOLLOWING SECTION WILL BE USED FOR TAKING BETS **
REM ** OFF IF THE PLAYER SHOULD SO ELECT **
REM **********************************************************
12: REM TAKE OFF PLACE BETS
INPUT"What is the number of the place bet you want off?";LINE PLACE$
IF VAL(PLACE$)<1 THEN GOTO 12
WINNINGS=WINNINGS+PLACE(VAL(PLACE$))
PLACE(VAL(PLACE$))=0
PRINT"You now have $";WINNINGS
INPUT"Want to take off another?...";LINE Y$
Y$=UCASE$(Y$)
IF Y$="Y" OR Y$="YES" THEN GOTO 12 ELSE RETURN
14: REM TAKE OFF FIELD
IF FIELD>0 THEN \
WINNINGS=WINNINGS+FIELD
PRINT"Field Bet is off, you now have $";WINNINGS
FIELD=0
RETURN
15: REM HARDWAYS
INPUT"Which hardways do you want off?..(No. or 'A')";LINE HARDWAY$
HARDWAY$=UCASE$(HARDWAY$)
IF HARDWAY$="ALL" OR HARDWAY$="A" THEN GOTO 15.5
HARDWAY%=VAL(HARDWAY$)
FOR I%=4 TO 10 STEP 2
IF I%=4 AND HARD4>0 THEN \
WINNINGS=WINNINGS+HARD4 :\
HARD4=0
IF I%=6 AND HARD6>0 THEN \
WINNINGS=WINNINGS+HARD6 :\
HARD6=0
IF I%=8 AND HARD8>0 THEN \
WINNINGS=WINNINGS+HARD8 :\
HARD8=0
IF I%=10 AND HARD10>0 THEN \
WINNINGS=WINNINGS+HARD10 :\
HARD10=0
NEXT I%
RETURN
15.5: REM TAKE OFF ALL HARDWAYS AT ONCE
WINNINGS=WINNINGS+(HARD4+HARD6+HARD8+HARD10)
HARD4=0 : HARD6=0 : HARD8=0 : HARD10=0
RETURN
REM *********************************************************
REM ** THIS SECTION WILL BE USED FOR THE TAKING OF ODDS **
REM ** THIS WILL INCLUDE PLACE BETS AS WELL AS LINE BETS **
REM *********************************************************
16:
PRINT"To take the odds on any place, come, or line bet answer "
PRINT"the next question with one of the following:"
PRINT" PLACE"
PRINT" LINE"
PRINT" COME"
PRINT"Should you want a list of 'ODDS' odds answer next questions "
PRINT"with 'ODDS'....."
PRINT
INPUT"Place, Line, or Come Odds?.....";LINE ODD$
IF ODD$="PLACE" THEN GOTO 16.1
IF ODD$="LINE" THEN GOTO 20
IF ODD$="COME" THEN GOTO 25
IF ODDS$="ODDS" THEN GOSUB 700 :\
GOTO 16
REM PLACE-BET ODDS
16.1 INPUT"Which Place Bet did you want odds on?...";LINE PLACE$
IF PLACE$="ODDS" THEN GOSUB 700 :\
GOTO 16.1
PLACE.ODDS%=VAL(PLACE$)
IF PLACE(PLACE.ODDS%)<1 THEN \
PRINT"You don't have anything on the";PLACE(PLACE.ODDS%) :\
RETURN
PRINT"How much odds on the ";PLACE.ODDS%;" Maximum $";PLACE(PLACE.ODDS%)
INPUT ODDS.AMOUNT
WINNINGS=WINNINGS-ODDS.AMOUNT
PLACE.ODDS.AMOUNT(PLACE.ODDS%)=ODDS.AMOUNT
INPUT"Would you care to add odds to another bet?..";LINE Y$
Y$=UCASE$(Y$)
IF Y$="ODDS" THEN GOSUB 700 :\
GOTO 16
IF Y$="Y" OR Y$="YES" THEN GOTO 16 ELSE RETURN
REM ODDS ON LINE BET
20:
IF NOT FIRST% THEN \
PRINT"You can put as much as $";LINE.BET;" odds on your line bet.."
21 INPUT"How much would you like to bet?...";LINE LINE.ODDS$
IF LINE.ODDS$="ODDS" THEN GOSUB 700 :\
GOTO 21
LINE.ODDS(POINT%)=VAL(LINE.ODDS$)
WINNINGS=WINNINGS-LINE.ODDS(POINT%)
RETURN
REM COME BET ODDS
25 INPUT"Which Come Bet did you want odds on?...";LINE COME$
COME.ODDS%=VAL(COME$)
IF COME$="ODDS" THEN GOSUB 700 :\
GOTO 25
IF COME.BET(COME.ODDS%)<1 THEN \
PRINT"You don't have anything on the";COME.BET(COME.ODDS%) :\
RETURN
PRINT"How much odds on the ";COME.ODDS%;" Maximum $";COME.BET(COME.ODDS%)
INPUT ODDS.AMOUNT
WINNINGS=WINNINGS-ODDS.AMOUNT
COME.ODDS.AMOUNT(COME.ODDS%)=ODDS.AMOUNT
INPUT"Would you care to add odds to another bet?..";LINE Y$
Y$=UCASE$(Y$)
IF Y$="Y" OR Y$="YES" THEN GOTO 16 ELSE RETURN
100 IF NOT FIRST% THEN GOTO 120
REM **************************************************************
REM ** THE FOLLOWING IS THE ROLL AND PAYOFFS FOR LINE.BET BETS **
REM **************************************************************
REM ***************** FIRST ROLL (COMING OUT) ****************
110:
GOSUB 6000
ON ROLL% - 1 GOSUB 150,150,160,160,160, \
190,160,160,160,190,150
IF ROLL%=3 AND THREE>0 THEN \
WINNINGS=WINNINGS+(THREE*15)+THREE :\
THREE=0
IF ROLL%=2 AND TWO>0 THEN \
WINNINGS=WINNNINGS+(TWO*30)+TWO :\
TWO=0
IF ROLL%=12 AND TWELVE>0 THEN \
WINNINGS=WINNINGS+(TWELVE*30)+TWELVE :\
TWELVE=0
IF ROLL%=11 AND ELEVEN>0 THEN \
WINNINGS=WINNINGS+(ELEVEN*15)+ELEVEN :\
ELEVEN=0
GOTO 1.11
REM *****************SECOND ROLL (NOT COMING OUT)***************
120:
FIRST%=0
GOSUB 6000
IF ROLL%=3 AND THREE>0 THEN \
WINNINGS=WINNINGS+(THREE*15)+THREE :\
THREE=0
IF ROLL%=2 AND TWO>0 THEN \
WINNINGS=WINNNINGS+(TWO*30)+TWO :\
TWO=0
IF ROLL%=12 AND TWELVE>0 THEN \
WINNINGS=WINNINGS+(TWELVE*30)+TWELVE :\
TWELVE=0
IF ROLL%=11 AND ELEVEN>0 THEN \
WINNINGS=WINNINGS+(ELEVEN*15)+ELEVEN :\
ELEVEN=0
ON ROLL% - 1 GOSUB \
180,180,170,170,170,140,170,170,170,195,180
IF ROLL%=POINT% THEN GOSUB 130
GOTO 1.11
REM ***********************************************
REM ** WIN ON LINE BY MAKING POINT **
REM************************************************
130 PRINT "YOU WIN - - BY MAKING YOUR POINT." :\
WINNINGS=WINNINGS+(LINE.BET*2) :\
LINE.BET=0
IF LINE.ODDS(ROLL%)>0 THEN GOSUB 668
FIRST%= - 1
RETURN
REM ******************************************************
REM ** SEVEN IS ROLLED - NOT ON COME OUT **
REM ******************************************************
140 PRINT "YOU LOSE - - BY FAILING TO MAKE POINT BEFORE ROLLING 7." :\
LINE.BET=0
GOSUB 300 REM PLACE BETS & HARDWAYS GO DOWN
IF ANY>0 THEN LET ANY=0
IF TWELVE>0 THEN LET TWELVE=0
IF THREE>0 THEN LET THREE=0
IF TWO>0 THEN LET TWO=0
IF ELEVEN>0 THEN LET ELEVEN=0
IF SEVEN>0 THEN \
WINNINGS=WINNINGS+(SEVEN*8) :\
PRINT"Winner on the Seven...." :\
SEVEN=0
IF BIG.SIX>0 OR BIG.EIGHT>0 THEN GOSUB 450
IF COME>0 THEN \
PRINT"Winner on the come line!!..." :\
WINNINGS=WINNINGS+(COME*2) :\
COME=0
FOR I%=4 TO 10
IF COME.BET(I%)>0 THEN \
PRINT"Come Bet on the ";ROLL%;"coming down!!" :\
COME.BET(I%)=0
NEXT I%
FOR I%=4 TO 10
IF LINE.ODDS(I%)>0 THEN \
PRINT"You have also lost your line odds!!! " :\
LINE.ODDS(I%)=0
NEXT I%
FIRST%= - 1
RETURN
REM *******************************************************
REM ** 2,3, OR 12 IS ROLLED - COMING OUT **
REM********************************************************
150 PRINT "YOU LOSE ON THE FIRST ROLL - 2,3, OR 12 ." :\
LINE.BET=0
IF FIELD>0 THEN GOSUB 500
FIRST%= - 1
RETURN
160:
REM *******************************************************
REM ** THIS SECTION TAKES CARE OF FIRST ROLLS IF THEY **
REM ** HAPPEN TO BE A 4,5,6,8,9, OR A 10 **
REM *******************************************************
IF FIELD>0 AND (ROLL%<5 OR ROLL%>8) THEN \
GOSUB 500
IF COME.BET(ROLL%)>0 THEN \
PRINT "Winner on the come!!... ";ROLL% :\
WINNINGS=WINNINGS+(COME.BET(ROLL%)*2) :\
COME.BET(ROLL%)=0
IF (BIG.SIX>0 OR BIG.EIGHT>0) AND (ROLL%=6 OR ROLL%=8) THEN \
GOSUB 400
IF NOT OFF% THEN \
GOSUB 350 :\
GOSUB 600
IF (DIE.ONE%=DIE.TWO%) AND NOT OFF% THEN \
ON ROLL% - (ROLL%/2) GOSUB 110,205,250,260,210
IF FIELD>0 AND (ROLL%>4 AND ROLL%<9) THEN \
PRINT"Field Bets are lost (damn!)..." :\
FIELD=0
IF NOT OFF% AND PLACE(ROLL%)>0 THEN GOSUB 550
FIRST%=0
RETURN
170:
REM ******************************************************
REM ** THIS SECTION TAKES CARE OF ROLLS IF THEY ARE NOT **
REM ** COMING OUT AND HAPPEN TO BE A 4,5,6,8,9, OR 10 **
REM ******************************************************
IF (BIG.SIX>0 OR BIG.EIGHT>0) AND (ROLL%=6 OR ROLL%=8) THEN \
GOSUB 400
IF DIE.ONE%=DIE.TWO% THEN \
ON ROLL% - (ROLL%/2) GOSUB 110,205,250,260,210
IF COME.BET(ROLL%)>0 THEN \
PRINT"Winner on the come ";ROLL% :\
WINNINGS=WINNINGS+(COME.BET(ROLL%)*2) :\
COME.BET(ROLL%)=0
IF COME > 0 THEN LET COME.BET(ROLL%)=COME :\
COME=0
IF DIE.ONE%<>DIE.TWO% THEN \
GOSUB 350
IF FIELD>0 AND (ROLL%<5 OR ROLL%>8) THEN \
GOSUB 500
GOSUB 600
IF FIELD>0 AND (ROLL%=5 OR ROLL%=6 OR ROLL%=8) THEN \
PRINT"Field Bets are lost (double-damn!!).." :\
FIELD=0
IF PLACE(ROLL%)>0 THEN GOSUB 550
FIRST%=0
RETURN
180:
REM **********************************************************
REM ** THIS SECTION TAKES CARE OF 2,3, OR 12 ROLL IF NOT **
REM ** COMING OUT **
REM **********************************************************
IF COME>0 THEN \
PRINT"Come Line bets just went away..." :\
COME=0
IF ANY>0 THEN LET WINNINGS=WINNINGS+(ANY*7)+ANY :\
ANY=0
IF FIELD>0 THEN GOSUB 500
FIRST%=0
RETURN
REM **********************************************************
REM ** THIS SECTION IS WHEN FIRST ROLL IS 7 OR 11 **
REM **********************************************************
190 PRINT "YOU WIN ON THE FIRST ROLL - 7 OR 11." :\
WINNINGS=WINNINGS+(LINE.BET*2) :\
LINE.BET=0
IF ANY>0 THEN LET ANY=0
IF TWELVE>0 THEN LET TWELVE=0
IF THREE>0 THEN LET THREE=0
IF TWO>0 THEN LET TWO=0
IF ELEVEN>0 THEN LET ELEVEN=0
IF SEVEN>0 THEN \
WINNINGS=WINNINGS+(SEVEN*8) :\
PRINT"Winner on the Seven...." :\
SEVEN=0
IF NOT OFF% THEN GOSUB 300
IF ROLL%=7 AND OFF% THEN \
FOR I%=4 TO 10 :\
WINNINGS=WINNINGS+COME.ODDS.AMOUNT(ROLL%) :\
COME.ODDS.AMOUNT(ROLL%)=0 :\
NEXT I%
IF FIELD>0 AND ROLL%=7 THEN \
PRINT "You have just lost your $";FIELD;"field bet" :\
FIELD=0
IF FIELD>0 AND ROLL%=11 THEN \
GOSUB 500
IF (BIG.SIX>0 OR BIG.EIGHT>0) AND ROLL%=7 THEN GOSUB 450
FIRST%= - 1
RETURN
195:
REM **************************************************************
REM ** THIS SECTION PAYS ON THE COME IF ROLL IS 11 **
REM **************************************************************
IF COME > 0 THEN \
WINNINGS=WINNINGS+(COME*2)
PRINT "Win on the come line......"
COME=0
FIRST%=0
IF FIELD>0 THEN GOSUB 500
RETURN
200:
REM ***********************************************************
REM ** PAYOFF ON HARD 4 & 10 *****************************
REM ***********************************************************
205:
IF HARD4<1 THEN RETURN
PRINT"Winner on the Hard 4!!..."
WINNINGS=WINNINGS+(HARD4*8)
RETURN
210:
IF HARD10<1 THEN RETURN
PRINT"Winner on the Hard 10"
WINNINGS=WINNINGS+(HARD10*8)
RETURN
250:
REM ***************************************************
REM ** PAYOFF ON HARD 6 & 8 *************************
REM ***************************************************
IF HARD6<1 THEN RETURN
PRINT"Winner on the Hard 6!!..."
WINNINGS=WINNINGS+(HARD6*10)
PRINT "WINNINGS NOW = $";WINNINGS
RETURN
260:
IF HARD8<1 THEN RETURN
PRINT"Winner on the Hard 8!!..."
WINNINGS=WINNINGS+(HARD8*10)
RETURN
RETURN
300:
REM *******************************************************
REM ** LOSSES WHEN SEVEN IS ROLLED ***
REM *******************************************************
REM HARDWAYS
IF HARD4>0 OR HARD6>0 OR HARD8>0 OR HARD10>0 THEN \
PRINT"Your hardways just fell...." :\
HARD4=0
HARD6=0
HARD8=0
HARD10=0
IF LINE.ODDS(ROLL%)>0 THEN \
PRINT"You have lost your odds on the line!!.."
LINE.ODDS=0
FOR I%=4 TO 10
IF PLACE(I%)>0 THEN \
PRINT"Place Bet on the ";i%; "coming down!!" :\
PLACE(I%)=0
NEXT I%
NUMBER.PLACE%=0
FOR I%=4 TO 10
IF COME.BET(I%)>0 THEN \
PRINT"Come Bet on the ";I%;"coming down!!" :\
COME.BET(ROLL%)=0
NEXT I%
FOR I%=4 TO 10
IF PLACE.ODDS.AMOUNT(I%)>0 THEN \
PRINT"Odds on the ";I%;"coming down!!" :\
PLACE.ODDS.AMOUNT(I%)=0
NEXT I%
FOR I%=4 TO 10
IF COME.ODDS.AMOUNT(I%)>0 THEN \
PRINT"Odds on the ";I%;"coming down!!" :\
COME.ODDS.AMOUNT(I%)=0
NEXT I%
IF FIELD>0 AND ROLL%=7 THEN \
PRINT "You have just lost your $";FIELD;"field bet" :\
FIELD=0
RETURN
350:
REM ***********************************************************
REM ** HARDWAYS GO DOWN ***
REM ***********************************************************
IF ROLL%=4 AND DIE.ONE% <> DIE.TWO% AND HARD4>0 THEN :\
PRINT"Hard 4 just went down...." :\
HARD4=0
IF ROLL%=6 AND DIE.ONE% <> DIE.TWO% AND HARD6>0 THEN :\
PRINT"HARD 6 just went down...." :\
HARD6=0
IF ROLL%=8 AND DIE.ONE% <> DIE.TWO% AND HARD8>0 THEN :\
PRINT"HARD 8 just went down...." :\
HARD8=0
IF ROLL%=10 AND DIE.ONE% <> DIE.TWO% AND HARD10>0 THEN :\
PRINT"HARD 10 just went down...." :\
HARD10=0
RETURN
400:
REM ************************************************************
REM ** BIG SIX & EIGHT **
REM ************************************************************
IF ROLL%<>6 THEN GOTO 440
IF BIG.SIX>0 THEN LET WINNINGS=WINNINGS+(BIG.SIX*2) :\
PRINT"Lucked out on the big six..." :\
BIG.SIX=0 :\
RETURN
440 IF BIG.EIGHT>0 THEN LET WINNINGS=WINNINGS+(BIG.EIGHT*2) :\
PRINT"Lucked out on the big eight..." :\
BIG.EIGHT=0
RETURN
450:
REM ************************************************************
REM ** BIG SIX & EIGHT GO DOWN **
REM ************************************************************
IF BIG.SIX>0 THEN \
PRINT"Suprise!! You just lost your big six bet" :\
BIG.SIX=0
IF BIG.EIGHT>0 THEN \
PRINT"Suprise!! You just lost your big eight bet" :\
BIG.EIGHT=0
RETURN
500:
REM *************************************************
REM ** FIELD BETS **
REM *************************************************
IF ROLL% <> 11 THEN GOTO 505
PRINT"Win on the field !! " :\
PRINT"You now have $";FIELD*2;" on the field." :\
LET FIELD=FIELD*2 :\
INPUT"Do you want to leave it? ";LINE Y$ :\
Y$=UCASE$(Y$)
IF LEFT$(Y$,1)="Y" THEN RETURN
WINNINGS=WINNINGS+FIELD :\
FIELD=0 :\
RETURN
505 IF ROLL% <> 2 THEN GOTO 510
PRINT"Win on the field !! " :\
PRINT"You now have $";FIELD*3;" on the Field." :\
LET FIELD=FIELD*3 :\
INPUT"Do you want to leave it? ";LINE Y$ :\
Y$=UCASE$(Y$)
IF LEFT$(Y$,1)="Y" THEN RETURN
WINNINGS=WINNINGS+FIELD :\
FIELD=0 :\
RETURN
510 IF ROLL% <> 12 THEN GOTO 520
PRINT"Win on the field !! " :\
PRINT"You now have $";FIELD*4;" on the Field." :\
LET FIELD=FIELD*4 :\
INPUT"Do you want to leave it? ";LINE Y$ :\
Y$=UCASE$(Y$)
IF LEFT$(Y$,1)="Y" THEN RETURN
WINNINGS=WINNINGS+FIELD :\
FIELD=0 :\
RETURN
520:
IF ROLL%=7 THEN RETURN
PRINT"Win on the field !! " :\
PRINT"You now have $";FIELD*2;" on the Field." :\
LET FIELD=FIELD*2 :\
INPUT"Do you want to leave it? ";LINE Y$ :\
Y$=UCASE$(Y$)
IF LEFT$(Y$,1)="Y" THEN RETURN
WINNINGS=WINNINGS+FIELD :\
FIELD=0
RETURN
550:
REM ***********************************************************
REM ** PLACE BET WINS **
REM ***********************************************************
IF PLACE(ROLL%)>0 THEN GOTO 560 ELSE GOTO 570
560 PLACE(ROLL%)=PLACE(ROLL%)+INT((PLACE(ROLL%)) * 1.8) :\
PRINT"You now have $";INT%(PLACE(ROLL%)); :\
PRINT" on the ";ROLL% :\
INPUT"Do you want to leave it on?";LINE Y$
Y$=UCASE$(Y$)
IF LEFT$(Y$,1)="Y" THEN RETURN
WINNINGS=WINNINGS+INT%((PLACE(ROLL%)))
PLACE(ROLL%)=0
570 IF PLACE(ROLL%)>0 THEN GOTO 571 ELSE GOTO 575
571 PLACE(ROLL%)=PLACE(ROLL%)+INT%(PLACE(ROLL%)) * 1.8 :\
PRINT"You now have $";INT%(PLACE(ROLL%)); :\
PRINT" on the ";ROLL% :\
INPUT"Do you want to leave it on?";LINE Y$
Y$=UCASE$(Y$)
IF LEFT$(Y$,1)="Y" THEN RETURN
WINNINGS=WINNINGS+INT%((PLACE(ROLL%)))
PLACE(ROLL%)=0
575 IF PLACE(ROLL%)>0 THEN GOTO 576 ELSE GOTO 580
576 PLACE(ROLL%)=PLACE(ROLL%)+ INT%(PLACE(ROLL%)) * 1.4 :\
PRINT"You now have $";INT%(PLACE(ROLL%)); :\
PRINT" on the ";ROLL% :\
INPUT"Do you want to leave it on?";LINE Y$
Y$=UCASE$(Y$)
IF LEFT$(Y$,1)="Y" THEN RETURN
WINNINGS=WINNINGS+ INT%((PLACE(ROLL%)))
PLACE(ROLL%)=0
580 IF PLACE(ROLL%)>0 THEN GOTO 581 ELSE GOTO 585
581 PLACE(ROLL%)=PLACE(ROLL%)+ INT%(PLACE(ROLL%)) * 1.4 :\
PRINT"You now have $";INT%(PLACE(ROLL%)); :\
PRINT" on the ";ROLL% :\
INPUT"Do you want to leave it on?";LINE Y$
Y$ = UCASE$(Y$)
IF LEFT$(Y$,1)="Y" THEN RETURN
WINNINGS=WINNINGS + INT%((PLACE(ROLL%)))
PLACE(ROLL%)=0
585 IF PLACE(ROLL%)>0 THEN GOTO 586 ELSE GOTO 590
586 PLACE(ROLL%)=PLACE(ROLL%) + INT%(PLACE(ROLL%)) * 1.166666667 :\
PRINT"You now have $";INT%(PLACE(ROLL%)); :\
PRINT" on the ";ROLL% :\
INPUT"Do you want to leave it on?";LINE Y$
Y$=UCASE$(Y$)
IF LEFT$(Y$,1)="Y" THEN RETURN
WINNINGS=WINNINGS + INT%((PLACE(ROLL%)))
PLACE(ROLL%)=0
590 IF PLACE(ROLL%)>0 THEN GOTO 591 ELSE RETURN
591 PLACE(ROLL%)=PLACE(ROLL%) + INT%(PLACE(ROLL%)) * 1.66666667 :\
PRINT"You now have $";INT%(PLACE(ROLL%)); :\
PRINT" on the ";ROLL% :\
INPUT"Do you want to leave it on?";LINE Y$
Y$=UCASE$(Y$)
IF LEFT$(Y$,1)="Y" THEN RETURN
WINNINGS=WINNINGS + INT%((PLACE(ROLL%)*1.66666667))
PLACE(ROLL%)=0
RETURN
600:
REM ***********************************************************
REM ** THIS SECTION WILL DEAL WITH PAYING OFF ANY ODDS **
REM ** BETS THERE HAPPEN TO BE **
REM ***********************************************************
605 IF PLACE.ODDS.AMOUNT(ROLL%)>0 THEN GOTO 606 ELSE GOTO 618
606 PLACE.ODDS.AMOUNT(ROLL%)=PLACE.ODDS.AMOUNT(ROLL%) + INT%(PLACE.ODDS.AMOUNT(ROLL%)) * 3 :\
PRINT"You now have $";INT%(PLACE.ODDS.AMOUNT(ROLL%)); :\
PRINT" on the Place Odds ";ROLL% :\
INPUT"Do you want to leave it on?";LINE Y$
Y$=UCASE$(Y$)
IF LEFT$(Y$,1)="Y" THEN RETURN
WINNINGS=WINNINGS + INT%((PLACE.ODDS.AMOUNT(ROLL%)))
PLACE.ODDS.AMOUNT(ROLL%)=0
618 IF PLACE.ODDS.AMOUNT(ROLL%)>0 THEN GOTO 616 ELSE GOTO 628
616 PLACE.ODDS.AMOUNT(ROLL%)=PLACE.ODDS.AMOUNT(ROLL%) + INT%(PLACE.ODDS.AMOUNT(ROLL%)) * (3/2) :\
PRINT"You now have $";INT%(PLACE.ODDS.AMOUNT(ROLL%)); :\
PRINT" on the Place Odds ";ROLL% :\
INPUT"Do you want to leave it on?";LINE Y$
Y$=UCASE$(Y$)
IF LEFT$(Y$,1)="Y" THEN RETURN
WINNINGS=WINNINGS + INT%((PLACE.ODDS.AMOUNT(ROLL%)))
PLACE.ODDS.AMOUNT(ROLL%)=0
628 IF PLACE.ODDS.AMOUNT(ROLL%)>0 THEN GOTO 626 ELSE GOTO 638
626 PLACE.ODDS.AMOUNT(ROLL%)=PLACE.ODDS.AMOUNT(ROLL%) + INT%(PLACE.ODDS.AMOUNT(ROLL%)) * (6/5) :\
PRINT"You now have $";INT%(PLACE.ODDS.AMOUNT(ROLL%)); :\
PRINT" on the Place Odds ";ROLL% :\
INPUT"Do you want to leave it on?";LINE Y$
Y$=UCASE$(Y$)
IF LEFT$(Y$,1)="Y" THEN RETURN
WINNINGS=WINNINGS + INT%((PLACE.ODDS.AMOUNT(ROLL%)))
PLACE.ODDS.AMOUNT(ROLL%)=0
638 IF COME.ODDS.AMOUNT(ROLL%)>0 THEN GOTO 639 ELSE GOTO 648
639 COME.ODDS.AMOUNT(ROLL%)=COME.ODDS.AMOUNT(ROLL%) + INT%(COME.ODDS.AMOUNT(ROLL%)) * 3 :\
WINNINGS=WINNINGS + INT%((COME.ODDS.AMOUNT(ROLL%)))
COME.ODDS.AMOUNT(ROLL%)=0
648 IF COME.ODDS.AMOUNT(ROLL%)>0 THEN GOTO 646 ELSE GOTO 658
646 COME.ODDS.AMOUNT(ROLL%)=COME.ODDS.AMOUNT(ROLL%) + INT%(COME.ODDS.AMOUNT(ROLL%)) * (3/2) :\
WINNINGS=WINNINGS + INT%((COME.ODDS.AMOUNT(ROLL%)))
COME.ODDS.AMOUNT(ROLL%)=0
658 IF COME.ODDS.AMOUNT(ROLL%)>0 THEN GOTO 656 ELSE GOTO 668
656 COME.ODDS.AMOUNT(ROLL%)=COME.ODDS.AMOUNT(ROLL%) + INT%(COME.ODDS.AMOUNT(ROLL%)) * (6/5) :\
WINNINGS=WINNINGS + INT%((COME.ODDS.AMOUNT(ROLL%)))
COME.ODDS.AMOUNT(ROLL%)=0
668 IF LINE.ODDS(ROLL%)>0 THEN GOTO 666 ELSE GOTO 678
666 IF ROLL%=6 OR ROLL%=8 THEN \
LINE.ODDS(ROLL%)=LINE.ODDS(ROLL%) + INT%(LINE.ODDS(ROLL%)) * (6/5)
IF ROLL%=4 OR ROLL%=10 THEN \
LINE.ODDS(ROLL%)=LINE.ODDS(ROLL%)+(LINE.ODDS(ROLL%)*2)
IF ROLL%=5 OR ROLL%=9 THEN \
LINE.ODDS(ROLL%)=LINE.ODDS(ROLL%)+(LINE.ODDS(ROLL%)*(3/2))
WINNINGS=WINNINGS + INT%((LINE.ODDS(ROLL%)))
LINE.ODDS(ROLL%)=0
RETURN
678 RETURN
700:
REM *******************************************************
REM ** THIS SECTION IS A LIST OF ODDS PAYED ON THE ODDS **
REM *******************************************************
PRINT"4 AND 10 ";TAB(20);"2 TO 1"
PRINT"5 AND 9 ";TAB(20);"3 TO 2"
PRINT"6 AND 8 ";TAB(20);"6 T0 5"
RETURN
800:
REM *******************************************************
REM ** THE FOLLOWING IS AN ATTEMPT TO EXPLAIN THE **
REM ** ACCOUNTING USED IN THIS PROGRAM **
REM *******************************************************
PRINT"Certain assumptions have been made in this program which might"
PRINT"help and explain to the player how he can tell how he is doing"
PRINT"and how much he has won or lost after each roll."
PRINT" The first point is that all money put on the table is"
PRINT" considered to be lost until the bet is actually won"
PRINT" i.e. Every bet is a minus amount unless it is either"
PRINT" taken off or won. What this means is that if you are"
PRINT" just starting out and bet $10.00 then the balance will"
PRINT" show you to be $10.00 in the hold, etc."
PRINT
PRINT" The amounts shown after each roll (net win or loss)"
PRINT" is the difference between what you started with and"
PRINT" what you have after the roll. If you have been"
PRINT" losing steadily this figure will show up as a minus"
PRINT" figure even though you might have gained in actuality."
PRINT
PRINT" All this may seem confusing but after you work with"
PRINT" it for a little while I suspect it will remain just"
PRINT" as murkey as it does right now!!!"
PRINT
RETURN
4500:
REM **************************************************************
REM ** THIS SECTION WILL TELL THE PLAYER WHAT BETS HE OR SHE **
REM ** HAS OUT, HOW MUCH HE HAS BET ON EACH ONE AND HOW MUCH **
REM ** TOTAL IS BET - THIS, IN THEORY CAN BE CALLED AT ANY TIME **
REM **************************************************************
PRINT CHR$(12)
IF LINE.BET>0 THEN PRINT "LINE BET";TAB(25);"$";LINE.BET
IF HARD4>0 THEN PRINT"HARD 4";TAB(25);"$";HARD4;TAB(30);
IF HARD6>0 THEN PRINT"HARD 6"; TAB(60);"$";HARD6
IF HARD8>0 THEN PRINT"HARD 8";TAB(25);"$";HARD8;TAB(30);
IF HARD10>0 THEN PRINT"HARD 10";TAB(60);"$";HARD10
IF FIELD>0 THEN PRINT"FIELD";TAB(25);"$";FIELD;TAB(30);
IF COME>0 THEN PRINT "COME LINE";TAB(60);"$";COME
IF BIG.EIGHT>0 THEN PRINT "BIG 8";TAB(25);"$";BIG.EIGHT;TAB(60);
IF BIG.SIX>0 THEN PRINT "BIG 6";TAB(60);"$";BIG.SIX
IF HORN>0 THEN PRINT"HORN";TAB(25);"$";HORN;TAB(60);
IF TWO>0 THEN PRINT"TWO";TAB(60);"$";TWO
IF THREE>0 THEN PRINT"THREE";TAB(25);"$";THREE;TAB(60);
IF TWELVE>0 THEN PRINT"TWELVE";TAB(60);"$";TWELVE
IF SEVEN>0 THEN PRINT"SEVEN";TAB(25);"$";SEVEN;TAB(60);
IF ELEVEN>0 THEN PRINT"ELEVEN";TAB(60);"$";ELEVEN
IF ANY>0 THEN PRINT"ANY CRAPS";TAB(25);"$";ANY;TAB(60);
FOR I%=4 TO 10
IF COME.BET(I%)>0 THEN \
PRINT "COME BET on the "; :\
PRINT I%;TAB(25);COME.BET(I%) :\
COME.TOTAL=COME.TOTAL + COME.BET(I%)
NEXT I%
FOR I%=4 TO 10
IF PLACE(I%)>0 THEN \
PRINT"PLACE ";I%;TAB(25);"$";PLACE(I%) :\
TOTAL.PLACE=TOTAL.PLACE + PLACE(I%)
NEXT I%
FOR I%=4 TO 10
IF LINE.ODDS(I%)>0 THEN \
PRINT"LINE ODDS ";TAB(25);LINE.ODDS(I%)
IF PLACE.ODDS.AMOUNT(I%)>0 THEN \
PRINT"PLACE ODDS AMOUNT ";I%;TAB(25);"$";PLACE.ODDS.AMOUNT(I%)
IF COME.ODDS.AMOUNT(I%)>0 THEN \
PRINT"COME ODDS AMOUNT ";I%;TAB(25);"$";COME.ODDS.AMOUNT(I%)
TOTAL.ODDS=TOTAL.ODDS + \
LINE.ODDS(I%) + PLACE.ODDS.AMOUNT(I%) + COME.ODDS.AMOUNT(I%)
NEXT I%
TOTAL.BETS=LINE.BET+HARD4+HARD6+HARD8+HARD10+COME.TOTAL+ \
FIELD+TOTAL.PLACE+TOTAL.ODDS+COME+BIG.EIGHT+BIG.SIX \
+TWO+TWELVE+THREE+SEVEN+ANY+HORN
IF TOTAL.BETS<1 THEN LET TOTAL.BETS=0
PRINT"TOTAL BETS OUT=$";TOTAL.BETS
PRINT"Your total bets, wins and losses are $";INT%(WINNINGS)
PRINT"You started with $";OLD.WINNINGS
PRINT"Your Balance is $";OLD.WINNINGS+INT%(WINNINGS)
COME.TOTAL=0
TOTAL.PLACE=0
TOTAL.ODDS=0
LET TOTAL.BETS=0
PRINT
IF FIRST% THEN \
PRINT "You are coming out!" ELSE \
PRINT "The Point is ";POINT%
PRINT
INPUT"If you want to quit put in an 'S' or 'STOP' Else hit return..";LINE TEMP$
IF TEMP$="S" OR TEMP$="STOP" THEN GOTO 9999
RANDOMIZE
RETURN
5000:
REM ******************************************************************
REM * THE FOLLOWING WILL BE THE MASTER LIST FOR BETS AVAILABLE *
REM * THIS LIST IS IN A IN A GOSUB SO THAT THE PLAYER *
REM * CAN CALL IT UP ANYTIME HE WANTS TO BET TO SEE IT *
REM ******************************************************************
PRINT CHR$(12)
PRINT"The following is a list of the available bets along with"
PRINT"the odds for that bet. To make a specific bet the player"
PRINT"need only put in the code number for a given bet when asked"
PRINT"for a bet."
PRINT"1 LINE BET EVEN"; REM: LINE.BET
PRINT TAB(40);"12 7 7 TO 1" REM: SEVEN
PRINT"2 HARDWAY 4 7 to 1"; REM: HARD2
PRINT TAB(40);"13 ANY CRAPS 7 TO 1" REM: ANY
PRINT"3 HARDWAY 10 7 to 1"; REM: HARD10
PRINT TAB(40);"14 11 15 TO 1" REM: ELEVEN
PRINT"4 HARDWAY 6 9 to 1"; REM: HARD6
PRINT TAB(40);"15 2 30 TO 1" REM: EYES
PRINT"5 HARDWAY 8 9 to 1"; REM: HARD8
PRINT TAB(40);"16 12 30 TO 1" REM: TWELVE
PRINT"6 COME BET EVEN"; REM: COME.BET(%)
PRINT TAB(40);"17 3 15 TO 1" REM: THREE
PRINT"7 BIG SIX EVEN"; REM: BIG.SIX
PRINT TAB(40);"ODDS LINE ODDS VARIES" REM: LINE.ODDS()
PRINT"8 BIG EIGHT EVEN"; REM: BIG.EIGHT
PRINT TAB(40);"ODDS PLACE ODDS VARIES" REM: PLACE.ODDS.AMOUNT()
PRINT"9 FIELD VARIES"; REM: FIELD
PRINT TAB(40);"ODDS COME ODDS VARIES" REM: COME.ODDS.AMOUNT()
PRINT"10 PLACE BET EVEN" REM: PLACE(%)
PRINT"11 HORN BET VARIES" REM: HORN()
IF FIRST% THEN \
PRINT "You are coming out!" ELSE \
PRINT "The Point is ";POINT%
INPUT"When you are through looking at this hit return";LINE TEMP$
RETURN
REM **********************************************
REM ** ROLL DICE **
REM **********************************************
6000 LET DIE.ONE%=INT%(6*RND + 1)
DIE.TWO%=INT%(6*RND + 1)
ROLL%=DIE.ONE% + DIE.TWO%
THROW%=THROW%+1
DICE.ROLL1%(THROW%)=DIE.ONE%
DICE.ROLL2%(THROW%)=DIE.TWO%
DICE.ROLL.TOTAL%(THROW%)=ROLL%
IF FIRST% THEN LET POINT%=ROLL%
PRINT CHR$(12)
PRINT "First die=" ; DIE.ONE% ; TAB(15) ; "Second Die=" ; DIE.TWO%
PRINT
PRINT"Point rolled is ";ROLL%
PRINT
PRINT"Point is ";POINT%
OLD.ROLL.WINNINGS=WINNINGS
INPUT"Hit return when you are ready for more";LINE TEMP$
RANDOMIZE
AFTER.ROLL%=-1
PRINT CHR$(12)
RETURN
9999:
REM ************************************************************
REM ** THIS IS THE NORMAL END OF THE PROGRAM. IT WILL WRITE **
REM ** OUT TO A FILE CALLED CRAPS.DAT WHAT ROLLS WERE MADE **
REM ** IN THE SEQUENCE IN WHICH THEY WERE ROLLED FOR LATER **
REM ** PERUSAL. IT SHOULD ALSO PUT A SPACE IN THE FILE EVERY**
REM ** TIME A SEVEN IS ROLLED. **
REM ************************************************************
TRUE%=-1
NUL.STRING$="***************"
IF END #1 THEN 9999.1
CRAPS.DAT$="CRAPS.DAT"
FILE CRAPS.DAT$
WHILE TRUE%
READ #1;LINE DUMMY$
WEND
9999.1 FOR I%=1 TO THROW%
PRINT USING "## ## ##";#1; \
DICE.ROLL1%(I%),DICE.ROLL2%(I%),DICE.ROLL.TOTAL%(I%)
IF DICE.ROLL.TOTAL%(I%)=7 THEN \
PRINT #1;NUL.STRING$
9999.2 NEXT I%
CLOSE 1
STOP
END