Number Guessing Game – Part Two

Objective
In this lesson, students will learn:

  • How to know whether the player has won or lost.
    •  How many guesses the player has remaining before the game finishes.
    • How many guesses the player has made.
    • What the status of the game is.
  • Find a way to say, “Hey, the game is over!”, and tell players how well they did.
    • Use a boolean (true/false) variable called gameWon is set to true if the game has been won and false if it hasn’t.
      If statements to check whether the game is over.
      – Use method called endGame that tells players whether they have won or lost.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s