Skip to content

mm-intro-prog/ruby-number-guessing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

ruby-number-guessing

Number Guessing Game

We're going to write a number guessing game in ruby.

The game should:

  • Ask for the player's name
  • Greet the player by name and explain the game
  • Ask for the maximum number to select as the secret number
  • Pick a secret number at random between 1 and the number entered
  • Ask the player (by name) to guess a number
  • Tell the player if they guessed correctly
  • If they guessed the number correctly, congratulate them for winning and then tell them how many guesses it took for them to win.
  • If they did not guess correctly, tell them whether their guess was too high or too low.

Make sure to build methods to help break down the problem and make the code easier to read.

About

A simple number guessing game in Ruby.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages