I'm writing this casino game program and I'm stuck. The object of the game is to guess whether the next random number will be higher than the previous one with 5 correct answers in a row being the jackpot. I can't figure out where I'm going wrong in my logic, so I figured I'd let another pair of eyes take a look at it. If anybody could give me some help, it'd be much appreciated.
REM:high -Low
CLS
PRINT "***************************************"
PRINT "*** WELCOME TO THE HIGH/LOW TABLE! ***"
PRINT "*** ***"
PRINT "*** $1 IS THE TABLE MINIMUM ***"
PRINT "***************************************"
PRINT
starthilo:
INPUT "What is your wager"; wager
IF wager < 1 THEN
PRINT "Wager to low. Please re-enter."
GOTO starthilo
ELSE
END IF
LET count = 0
DO WHILE count < 5
guess1:
RANDOMIZE TIMER
PRINT INT(50 * RND)
LET randomnum = INT(50 * RND)
INPUT "Is the number going to be higher or lower"; guess$
guess$ = "higher"
guess$ = "lower"
higher = 50
lower = 0
SELECT CASE guess$
CASE "higher"
IF randomnum < higher THEN
GOTO hilowin
ELSE
GOTO stophilo
END IF
CASE "lower"
IF randomnum > lower THEN
GOTO hilowin
ELSE
GOTO stophilo
END IF
END SELECT
hilowin:
PRINT "YOU WIN!"
balance = balance + wager * 100
GOTO guess1
stophilo:
PRINT "You Lose!"
INPUT "PRESS ENTER TO RETURN TO GAME ROOM!", enter
GOTO middle
count = count + 1
LOOP
middle:
Help With Program
Moderators:Administrator, Global Moderator