Giter Club home page Giter Club logo

cop2220_p2's Introduction

COP_2220 Rock/Paper/Scissors

Please excuse the mess as this is only my second attempt at coding in the C language.

Below information is taken from the project description

A program that implements a Rock/Paper/Scissors game that allows the user to play the computer. The program should prompt the user to enter R, P,or S for Rock, Paper, or Scissors, then it should randomly generate the computer’s choice and determine who won and display the result. The program should allow the user to continue playing until the user decides to stop, displaying the score (number of times that the computer won, the number of times that the player won and the number of ties).

In this game, Rock beats (breaks) Scissors, Scissors beats (cuts) Paper, and Paper beats (covers) Rock.

The program should do error handling on the input values and require the Player toenter R, P, S or Q (for quit). The program should accept both upper and lower case letters. The program output should look like the example output in the last section, including spacing and error handling.

Other Requirements

  1. The program must use at least three functions, excluding the flush Scanf function provided below, with appropriate parameters and return values in addition tomain. You may create and use as many functions as you wish.
  2. Make sure that your project is organized with function declarations, then the main function, then the other functions.
  3. You must not use global variables.
  4. The program must use at least one while or for loop.
  5. The program must use at least one switch statement.
  6. The program must use at least one if...else if...else multi-way statement.
  7. The program must randomly choose the computer’s choice or R, P, orS.
  8. Avoid the use of hard coded numbers. Use constants instead.

cop2220_p2's People

Contributors

kwieben avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.