Description

Display a menu of choices in the main function that includes:

"1. Play Gork" and "2. Exit."

If the user chooses "2. Exit", nothing else should happen, so the program should end.

If the user chooses "1. Play Gork," the program should do the following:

  • Call a welcome function to welcome the player:
    • Display a welcome message including the name of your game and Version 1.0.
    • Display the background story that includes the following information (format for display however you would like): You are in charge of a top secret military mission when your space ship makes an emergency landing on the largest moon of planet Gork. The space ship is damaged. Oxygen levels in the space ship begin to drop.
  • Ask the user how many personnel are on the ship and return the response.
  • At the top of the file, import your file from - Calculator and remove the main program from that file. Also, remove any print statements from these functions.
  • Call a menu function that has a parameter for the number of personnel.
  • Pass the number of personnel to the menu function when it is called.
  • This function will allow the user to make a choice:
    • Option 1. Attempt repairs on the ship. If this option is selected, display this message: "Toxic material on the moon has corroded the launch gear and the launch exploded."
    • Option 2. Request an emergency rescue from mission command. If this option is selected: Notify the user that the oxygen was depleted before the rescue team arrived. There were 4 people killed. Display the percentage of personnel who were rescued. Note: You must call a function created for lab 3 to get this value. Be careful not to display a negative number. If the initial team has less than 4 personnel, display no (0%) survivors and skip the calculation.
    • Option 3. Break protocol and reveal the top secret space ship's location to the Russians on a nearby moon to ask for their assistance. If this option is selected, the Russians agree to send a rescue ship, but secretly attempt to hack into the ships systems remotely, which triggers an automatic shutdown of all communications systems and locks all mission critical storage units, including one of the storage unit that holds emergency oxygen tanks. One quarter (.25) of all personnel are lost. Calculate the number of surviving personnel and display the result. Be careful not to display a negative number. Note: You must call a function created for lab 3 to get this value. If the user selects anything other than options 1, 2 or 3 the game should display "You have been eaten by a Grue."
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.