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.