Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Exercise 2-1 The following exercises are designed to further your understanding of Ruby programming by challenging you to make improvements to the chapter's game
Exercise 2-1 The following exercises are designed to further your understanding of Ruby programming by challenging you to make improvements to the chapter's game project, the Ruby Tall Tale game. 1. As currently designed, the Ruby Tall Tale game collects from the player five pieces of information that are used as input in the creation of the game's story. As a result, there is a limit to how dynamic the story can be. Review the story, and look for opportunities to replace other keywords with user input. To implement this challenge, you will have to add programming logic that prompts the player for additional input and then incor- porates that input into the story's text via embedded variables. 2. As a programmer, it is important to take credit for your hard work. Add a paragraph to the end of the story that provides the player with a little information about the game and its author. Add your URL as well. If you do not have a URL, use your school's URL. To implement this modification, add a fifth paragraph to the end of the story and then add statements to the end of the script that display the paragraph and pause execution to give the player a chance to read it. 3. Add a transitional message between the collection of story input and the telling of the story that lets the player know that input collection is done and that the game is ready to tell the story. To do so, you need to clear the console window and then display the transitional text. porates that input into the story's text via embedded variables. 2. As a programmer, it is important to take credit for your hard work. Add a paragraph to the end of the story that provides the player with a little information about the game and its author. Add your URL as well. If you do not have a URL, use your school's URL. To implementis modification, add a fifth paragraph to the end of the story and then add statements to the end of the script that display the paragraph and pause execution to give the player a chance to read it. 3. Add a transitional message between the collection of story input and the telling of the story that lets the player know that input collection is done and that the game is ready to tell the story. To do so, you need to clear the console window and then display the transitional text. 4. Modify the program so that the message that's displayed when the player elects not to play the game is also displayed at the end of the story. To do so, insert additional text messages using puts statements just before the else keyword in the Main Script Logic section. 5. As currently written, the game prompts the player to enter n to quit and y to play. If n is entered, the game halts. However, if anything else is entered, or if the Enter key is pressed with nothing entered, the game resumes. Change the game so that it can only be played when the player enters y. Do this by replacing the first set of script statements that follows with the second set of script statements that follows.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
the task is to improve the Ruby Tall Tale game by making certain modifications Here are the tasks th...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started