Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I want that answer in ruby The object of this game is to guess the word or phrase by selecting one letter at a time

image text in transcribed
image text in transcribed
I want that answer in ruby
The object of this game is to guess the word or phrase by selecting one letter at a time until the entire word is displayed. There is file of short phrases that you will load into an array You must display a string that shows the player how many characters are in the phrase. (Count each letter and space and display the positions such as ___- - -(sample only) Each time the player gets a letter right you will redisplay the above with the matching letter(s) filled in Example: R BY F-- Then if another letter is guessed display the "solution" with the correct letters that have been guessed RUBY F U 8*94 There are two players You may assign them names or just call them Player 1 and Player 2 When it is Player One's turn-you will randomly assign a point value for each letter that he guesses correctly. It will continue to be his turn until he guesses a letter that is not in the word or phrase. (don't change the point value until they guess a letter that is not in the word.) Then it is Player Two's turn. This player will continue with the word/phrase that the last Player started with and can continue guessing letters until there are none to guess or the player asked for a letter that is not in the phrase. If a player guesses a letter that is not there- the point value for the next player's guess will be altered with a random number. The total that a player scored will continue to be accumulated Once the entire word is completed- the person with the highest number of points wins The object of this game is to guess the word or phrase by selecting one letter at a time until the entire word is displayed. There is file of short phrases that you will load into an array You must display a string that shows the player how many characters are in the phrase. (Count each letter and space and display the positions such as ___- - -(sample only) Each time the player gets a letter right you will redisplay the above with the matching letter(s) filled in Example: R BY F-- Then if another letter is guessed display the "solution" with the correct letters that have been guessed RUBY F U 8*94 There are two players You may assign them names or just call them Player 1 and Player 2 When it is Player One's turn-you will randomly assign a point value for each letter that he guesses correctly. It will continue to be his turn until he guesses a letter that is not in the word or phrase. (don't change the point value until they guess a letter that is not in the word.) Then it is Player Two's turn. This player will continue with the word/phrase that the last Player started with and can continue guessing letters until there are none to guess or the player asked for a letter that is not in the phrase. If a player guesses a letter that is not there- the point value for the next player's guess will be altered with a random number. The total that a player scored will continue to be accumulated Once the entire word is completed- the person with the highest number of points wins

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Solaris 11.2 System Administration (oracle Press)

Authors: Harry Foxwell

1st Edition

007184421X, 9780071844215

More Books

Students also viewed these Databases questions

Question

=+8. The board of directors has chosen (their, its) officers.

Answered: 1 week ago