Question
Th e following exercises are designed to further your understanding of Ruby programming by challenging you to make improvements to the chapters game project, the
Th e following exercises are designed to further your understanding of Ruby programming by challenging you to make improvements to the chapters game project, the Ruby Tall Tale game. 1. As currently designed, the Ruby Tall Tale game collects from the player ve pieces of information that are used as input in the creation of the games 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 incorporates that input into the storys 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 schools URL. To implement this modi cation, add a fth 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 thats 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 rst 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
Get Instant Access with AI-Powered 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