Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE ANSWER IN C Descriptions The idea of the never over 50 game is to allow the users to add up a random number in
PLEASE ANSWER IN C
Descriptions The idea of the never over 50 game is to allow the users to add up a random number in the range of 1 to 20 each turn to get a final number in the range of 40 to 50. Please consider the following game rules: If the player's score is less than 50 after each turn, they can choose to continue. If they choose to continue, the number of turns will increase by 1. The player's turn will automatically stop if the final score exceeds 50 or has lost the game with 0 points. The player also loses the game and gets 0 points if their final score is less than 40 after deciding to end their turns. If the player's final score is in the range of 40 to 50, then the final point is equal to the final score subtracting the number of turns the user took to get the final score. The application is also required to output the following screens/functions: Main menu screen This screen appears when the users first start the game. There are four different options, as shown in the following figure. The users can access the options by entering their assigned number or terminating the game by pressing number four. NEVER OVER 50 GAME 1. 2. 3. 4. Game Rules Edit Player Details Play Exit Please pick an option: If the users enter any other characters rather than the listed numbers, display the warning message to allow them to re-enter their key. NEVER OVER 50 GAME 1. 2. 3. 4. Game Rules Edit Player Details Play Exit Please pick an option: 5 Your chosen option is not listed, please try again: Game rules screen This screen appears when the users pick the game rule option in the main menu. They can press the zero key to go back to the main menu. The students can copy the game descriptions as described above for this section. GAME LES This game is to add up a randon number in the range of 1 to 29 each turn to get a final number in the range of 40 to 50 If the players score is less than 50 after each turn, they can choose to continue If they choose to continue, the number of turns will increase by 1. The players turn dll autonatically stop if the final score exceeds se or the player has lost the game with points. The player also loses the game and gets points if their final score is less than efter deciding to end their turns. If the players Final score is in the range of 40 to se, then the final point is equal to the final score subtracting the number of turns the user took to get the final score, Press o to go back to the main menu If the users enter any other characters rather than zero, display the warning message to allow them to re-enter their key GAME RULES This game aims to add up a random number in the range of 1 to ze each turn to get a final number in the range of 4 to 58. If the players score is less than 58 after each turn, they can choose to continue. If they choose to continue, the number of turns will increase by 1. The players turn will automatically stop If the final score exceeds se or the player has lost the game with points. The player also loses the game and gets points If their final score is less than de after deciding to end their turns. If the players final score is in the range of 4e to se, then the final point is equal to the final score subtracting the number of turns the user took to get the final score Press e to go back to the main menu: 3 Wrong option, press to go back to the main menu: Player details screen This screen appears when the users pick the edit player details option in the main menu. They can press the zero key to go back to the main menu or I to edit their name. In the beginning, the default name should be "Player". PLAYER DETAILS Player name: Player Press 1 to edit or press @ to go back to the main menu: If the users enter any other characters rather than the listed numbers, display the warning message to allow them to re-enter their key PLAYER DETAILS Player name: Player Press 1 to edit or press @ to go back to the main menu: 3 Wrong option, press 1 to edit or press e to go back to the main menu: If the users enter 1, the application should allow them to modify their name and update the details. PLAYER DETAILS Player name: Player Press 1 to edit or press o to go back to the main menu: 3 Wrong option, press 1 to edit or press o to go back to the main menu: 1 Please enter new details: Robert Player details changed Player name: Robert Press 1 to edit or press o to go back to the main menu: Gameplay screen This screen appears when the users pick the Play option in the main menu. They can press the key "y" to continue or "s" to stop the game. PLAY Turn 1, random number is 18 and your score is 18 Press 'y' to continue or 's' to stop: y Turn 2, random number is 4 and your score is 22 Press 'y' to continue or 's' to stop: s If they lose the game, display their final point (zero), along with their name and allow them to re-play the game again. If they enter the wrong key, kindly remind them and ask them to re- enter their choice again. PLAY Turn 1, random number is 18 and your score is 18 Press 'y' to continue or 's' to stop: y Turn 2, random number is 4 and your score is 22 Press 'y' to continue or is to stop: s Robert, You have lost the game, e is your final point Press 1 to play the game again or press @ to go back to the main menu: 3 wrong option, press 1 to play the game again or press o to go back to the main menu: Over 50 is also considered a lost game. PLAY Turn 1, random number is 16 and your score is 16 Press *y* to continue or 'st to stop: y Turn 2, random number is 3 and your score is 19 Press 'y' to continue or 'st to stop: y Turn 3, random number is 3 and your score is 22 Press 'y' to continue or 'st to stop: y Turn 4, random number is 6 and your score is 28 Pressy to continue or's to stop: y Turn 5, random number is 13 and your score is 41 Press yto continue or 'st to stop: y Turn 6, random number is 16 and your score is 57 Press 'y' to continue or 's' to stop: y Robert, You have lost the game, is your final point Press 1 to play the game again or press e to go back to the main menu: 4 Wrong option, press 1 to play the game again or press e to go back to the main menu: If they won the game, display their final point, along with their name and allow them to re- play the game again. If they enter the wrong key, kindly remind them and ask them to re-enter their choice again PLAY Turn 1, random number is 4 and your score is 4 Press 'y' to continue or 's' to stop: y Turn 2, random number is 7 and your score is 11 Press 'y' to continue or 's' to stop: y Turn 3, random number is 10 and your score is 21 Press 'y' to continue or 's to stop: Y Turn 4, random number is 10 and your score is 31 Press 'y' to continue or 's' to stop: y Turn 5, random number is 14 and your score is 45 Press 'y' to continue or 's' to stop: s Robert, You have won the game, your final point is 40 Press 1 to play the game again or press @ to go back to the main menuStep by Step Solution
There are 3 Steps involved in it
Step: 1
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