Hangman Help

  • Thread starter Dylan Rodriguez
  • Start date
D

Dylan Rodriguez

How do I print the dashes and letters to represent the word to be
guessed.

The letters guessed by the player are properly put into the respective
arrays.

Whatever I try to do I either get all dashes back or the whole word back

_ _ _ _ or f i s h, never f _ _ h

My arrays are @correct_guesses and @incorrect_guesses

How do I get it to say puts @correct_guesses in the right blanks and if
the guess is @incorrect_guesses to leave it blank
 
B

brabuhr

Whatever I try to do I either get all dashes back or the whole word back

_ _ _ _ =A0or f i s h, never f _ _ h

My arrays are @correct_guesses and @incorrect_guesses

How do I get it to say puts @correct_guesses in the right blanks and if
the guess is @incorrect_guesses to leave it blank

It might help us help you if you provide a sample of the code you are
trying that doesn't work. :)

Meanwhile, checkout:
http://ruby-doc.org/core/classes/String.html#M000830
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,204
Latest member
LaverneRua

Latest Threads

Top