Created
September 18, 2017 19:40
-
-
Save anonymous/4c3ce51a8f9718af87823a117132c145 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Programmer: REDACTED | |
'Date: 9/18/2017 | |
'Mission: Make a functioning game of high and low. One that you can lose. | |
CLS | |
INPUT "Welcome to HIGH and LOW! Do you know how to play"; Knowhow$ | |
'if they know how to play, skip the description | |
IF Knowhow$ = "Yes" THEN GOTO smartypants | |
PRINT "HIGH and LOW is a gambling game, but there is SKILL involved." | |
PRINT "The DEALER will roll a die, and show you what number it rolled to." | |
PRINT "The DEALER will then ask if you guess the next roll will be HIGHER or LOWER." | |
PRINT "For example, if you get a 2 on the first roll... pick HIGHER! 2 Is quite low!" | |
PRINT "But if you get a 6, you really should pick LOWER, because 6 is the highest!" | |
smartypants: | |
PRINT "Lets get started!" | |
CurrentRoll = INT(RND * 6) + 1 | |
winner: | |
PRINT CurrentRoll | |
LastRoll = CurrentRoll | |
CurrentRoll = INT(RND * 6) + 1 | |
INPUT "Will the next roll be Higher, or Lower"; Guess$ | |
IF Guess$ = "Higher" AND LastRoll <= CurrentRoll THEN GOTO winner ELSE IF Guess$ = "Lower" AND LastRoll >= CurrentRoll THEN GOTO winner | |
PRINT "You lose. The next roll was "; CurrentRoll | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment