HiLo - A Number Guessing Game
A PHP Program developed in parts
Algorithm:
Initialize:
- randomly invent a number between 0 and 100 ($mystery)
- set up ($up) and down ($down) to 100 and 0 respectively - these will track the reasonable boundaries of the user guesses, making it a little easier to guess
- initialise the number of guesses currently taken ($numguesses) to 0
- provide a spot for the user to take their guess (form)
- accept a "submit" to POST their guess
Game Progress:
- retrieve posted guess and other stuff (mystery, up and down)
- indicate another guess has been taken
- determine too low, too high or just right - adjusting boundaries if necessary
- feedback to user on their progress
Finesse
- manage form a little better
- store the number of guesses and a name and a date into a "highscores" table - need to make this and populate it with some test data first
Part 1 - variables
Part 2 - game play
Part 3 - posted turns
Part 4 - finesse
Part 5 - high scores