After seeing a few number guessing games, and how simple they are to make, I decided to try my hand at creating one.
I made this in the form of a scoring game, though, and called it Incorrections! Since it was catchy.
Scoring is simple. You lose points for wrong answers based on how far off you were from the correct answer, and correct answers give 10 points.
It's my first game, so it may be a little glitchy, but it's a good, challenging game.
(I also don't know how to do the source code drop-down at this point, so the code might end up on the post, here.)
score = 25
start:
Set Cursor 0,0
Print "Lets play 'Incorrections'"
print "Guess the number! Between 1 and 6."
print "Current score: ", score
Input "- I choose the number: ", guessed$
number = rnd (6)
If val(guessed$) = number
Cls
Print "Correct! 10 points!"
score = score + 10
Wait (3000)
cls
If score > 39
Print "You win! Congradulations!"
Print "Want to play again? Press any key!"
wait key
score = 25
cls
Goto start
Else
Goto start
Endif
Else
Cls
Print "Wrong!. The correct number was ", number
difference = val(guessed$) - number
If difference < 0
score = score + difference
Print difference, " points"
Wait (3000)
cls
Else
score = score - difference
Print "-", difference
Wait (3000)
cls
Endif
If score < -1
Print "Game over. 'Incorrections' beat you. Better luck next time."
Print "Press any key to try again, or Esc to exit."
Wait key
score = 25
cls
Goto start
Else
Goto start
Endif
Endif
Awesomness comes easy.