Phase II Hangman

Given this description, where the secret word picked by the Human Player is not saved in the program, how does the human player check (using the check_guess method) the (random) guess made by the computer player.

Is it simply a matter of the human typing in the indices where the guess is a match?

-Ahmed

Yes, the human player will have to type in the correct indices of the guessed letter by the computer that is a match.

Thanks Michael. Was able to get this to work, phase II inclusive. Will implement phase III now.

Was looking at the provided solution to evaluate my approach toward this problem and notices a concept that (AFAIK) has not been (formally) covered in any material thus far. Looks like a means to validate the quality of the user input. Is this something that will be covered in the main course, or is it expected that these holes be covered at the current stage?

input_validation

The begin rescue block will be covered on the second week of the main course. You can think of the begin and rescue block as an error-handling if-else statement.
Here is a simplified way of it works:
First, you run statements after the begin keyword.
If those statements throw no errors, then the block is finished and you happily move on.
Else if there is an error, whatever statements after the rescue keyword is executed.
The rescue block can be specified to different types of errors, for example, StandardError or ArgumentError hence you can have multiple rescue block for different conditions.
Last keyword there is retry. What retry does is it will run the begin rescue block again from the beginning.
Here is a link to Ruby Exceptions if you want to learn more: https://www.tutorialspoint.com/ruby/ruby_exceptions.htm

Have fun!

Michael