/randomNumberGame

I had a go at doing baller95's homework, in php.

Primary LanguagePHP

Random Number Game

For baller 95

A program to meet this spec, but for CLI php. Don't go digging too much if you ain't done you homework yet!

Develop and test a Java program that will allow the user to guess a number randomly generated by the computer (see below for random number generator info). Your program must perform the following functions:

  1. Randomly pick a number to be guessed (range between 1 and 100).

  2. Allow the user to guess the number.

  3. Inform the user if they have guessed too high, too low, or correctly.

  4. The user should be allowed to continue guessing until they guess correctly.

  5. Count the number of guesses taken by the user to guess the correct answer.

  6. Inform the user of the number of guesses once the number is guessed correctly.

  7. Allow the user to play another game (with a new random number).

  8. Inform the user of the average number of guesses for all games played.

Bonus 1: Allow the user to give up on any game, but be allowed to play another game. Bonus 2: Add a colder/warmer option based on how far away the user’s guess is from the actual number.

Current Status

  1. Complete
  2. Complete
  3. Complete
  4. Complete
  5. Complete
  6. Complete
  7. Complete
  8. Complete

Bonus 1: Complete (asks every 5 guesses) Bonus 2: Complete