A#4b Guessing Game (Graphical Version)

due: Thursday, January 30
You can do this version of the program with a partner. You are to write a program that will allow the user to play a number guessing game. Your program will pick a random number between 1 and 100. The user will keep guessing until they pick the right number. If the guess is not correct the program should tell the user if they should Guess Higher or Guess Lower.

Once the user guesses the correct number the program should tell the user that and say how many guesses it took (with proper grammer - ie. don't say 1 guesses). Your program should also print a message if the user makes a bad guess (eg. first guess was 50, program says to guess higher and the user chooses 25). Also print an error message if the user makes a guess out of the valid range (ie. lower than 1 or higher than 100). Once the correct number is guessed the program should not allow any more guesses. You can use Input.pde to get the input. You can use the noLoop(); statement to stop void draw() from repeating.

Your program should give a visual cue as to the range the user should still be looking in. You can use a red and black bar as in the examples below or some other method of your own choosing that provides at least as much information as the examples.

Here is what the program could look like as the user is about to make their first guess:

Here is what the program could look like after a few guesses:

Here is after the user has successfully guessed:


      Marking Scheme

____
 22

Proper error messages (out of range) (2) _____
Proper bad guess messages            (3) _____
Proper higher/lower messages         (2) _____
Correct Win message                  (2) _____
Correct number of guesses            (2) _____
Proper grammar on guesses            (2) _____
Graphical range information          (4) _____
Process work                         (3) _____
Opening Comment                      (1) _____
Proper Indentation                   (1) _____