c project.
c project.
Programming Game
by Aditya Kumar
Function of Program
The program generates a random choice of rock, paper, The program displays the results, indicating the winner
or scissors for the computer. or a tie.
The user inputs their choice, and the program The program allows the user to play multiple rounds.
compares choices.
The program maintains a score to track the number of
The program determines a winner based on the rules of wins for the user and the computer.
the game.
Use Case Diagram of the
Rock, Paper, Scissors
Game
User System
Plays the game by choosing Generates a random choice,
rock, paper, or scissors. determines the winner, and
displays results.
Explaining the Use Case Diagram
1 1. Play Round 2 2. Get User Choice
The main use case that encompasses all the other The user enters their choice (rock, paper, or scissors).
steps.
1 Rock
2 Scissors
3 Paper
Rock beats scissors. Scissors beats paper. Paper beats rock. This forms a circular relationship where each choice
wins over one and loses to another.
Rock Paper Scissor
1 2
Simple Logic Randomization
The game's logic is straightforward, Random number generation is key to
relying on a few basic rules that can making the game fair and
be easily implemented in code. unpredictable.
3
Practice
This project provides a good
opportunity to practice basic C
programming concepts such as
input/output, conditional statements,
and random number generation.