C代写:CMPSC101 Rock, Paper, Scissors Game

代写C语言入门课,一个Rock, Paper, Scissors的游戏,也就是石头剪子布,比较简单。

Requirement

For your final project, you will emulate the Rock, Paper, Scissors game.

You may choose one person to work with for this final project. Group member selection opens on Wednesday, November 30th at 6:00 PM and closes Thursday, December 1st at 6:00 PM. You must submit your group selection using the form in Angel.

If you choose, and are approved, to work as a group, you will submit ONE assignment for both members. (If both members submit an assignment, both will be disqualified and neither will receive credit for submission.)

The program should meet the following requirements

  1. The game starts with a menu. The user is presented with the opportunity to review the rules of the game, or to actually play the game. (It’s up to you if you want to display a menu separately, or integrate the “display instructions” option within the “Rock, Paper, Scissors” choice (see 3.a. below) ).
  2. If the user requests to see the rules, the program displays the rules of the game.
  3. If the user requests to actually play the game:
    • a. The user enters his or her choice of “rock” “paper” or “scissors” at the keyboard. The user should be able to type out his/her choice and press enter.
    • b. The computer randomly picks its choice. (HINT: use the random number generator to generate a number between 0 and 2. Use the random number to represent rock, paper, or scissors.)
    • c. The program then reveals the computer’s choice, displays the user’s choice, and declares a winner (or tie).

The winner is determined according to the following rules

  • If one player chooses rock and the other player chooses scissors, then the rock wins. (Rock crushes scissors.)
  • If one player chooses paper and the other chooses rock, then paper wins. (Paper covers rock.)
  • If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors cuts paper).
  • If both players make the same choice, then the game is tie.

In order for this program to receive full credit

  • The user MUST be able to type in his/her choice: ROCK, PAPER, SCISSORS.
  • At minimum, the following functions must be used (you can choose to add others, depending on the way you implement the program):
    • void printInstructions();
    • int getComputerGuess();
    • int getUserGuess();

NOTE

  • There is ONLY ONE submission for this project. If you plan on completing the extra credit option (below), DO NOT SUBMIT THE PROGRAM UNTIL IT IS COMPLETE, INCLUDING THE EXTRA CREDIT.
  • The code MUST be submitted using a CPP file. No copy-and-paste code into a text box, no Word files, no non-CPP files. If an invalid submission is made, the program will not be evaluated and credit will not be granted.
  • Final projects MUST be submitted by 5:55 PM on December 14th. NO EXCEPTIONS AND NO EXTENSIONS WILL BE MADE. This assignment is in lieu of a final exam, and will be treated as such. DO NOT WAIT UNTIL THE LAST MINUTE TO SUBMIT YOUR ASSIGNMENT. Angel being down is NOT a valid excuse for a late submission.
  • Before clicking the final submit button, be sure that the correct file was uploaded. Once the file is uploaded, it WILL NOT BE RELEASED. This assignment is in lieu of a final exam, and will be treated as such. ALL SUBMISSIONS ARE FINAL.
  • DO NOT cheat. All code will be run through a plagiarism and code-duplication program that evaluates the code for cheating. Cheating, copying, unauthorized collaboration, or any other form of academic dishonesty will be treated as a major offense, and a sanction recommendation of failure for the course will be sent to the Academic Integrity Office.

EXTRA CREDIT OPTIONS

  • Up to 10 extra points for your overall class point total:
    • Convert your program to play The Big Bang Theory’s Sheldon Cooper’s improved version of this game: “Rock, Paper, Scissors, Lizard, Spock”. The rules for this new and improved game are listed in the “RPSLS Rule Matrix” file. Watch this video for more information.
    • Allow the user to play the game until they decide to quit.