Skip to content

goranbyte/rock-paper-scissors-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Rock Paper Scissors CLI

A command line implementation of the classic Rock Paper Scissors game written in C.

The player competes against a computer that randomly selects its move.
The game tracks the number of wins, total rounds played and calculates the win rate.

Features

  • Player vs computer gameplay
  • Random bot choice
  • Score tracking
  • Win rate calculation
  • Continuous gameplay loop
  • Option to exit the game

Controls

  • 1 – Paper
  • 2 – Rock
  • 3 – Scissors
  • 0 – Exit game

How It Works

  1. The player selects a move
  2. The computer randomly generates its move
  3. The result is determined:
    • win
    • lose
    • draw
  4. Score and number of games are updated
  5. The game continues until the player exits

Technologies

  • C programming language
  • Standard C libraries
  • stdlib.h for random numbers
  • time.h for random seed

What I Learned

  • Organizing code using functions
  • Using switch statements
  • Implementing game logic
  • Generating random values with rand()
  • Tracking game statistics
  • Using loops for continuous gameplay

Author

Software engineering student at ITS

Screenshots

Screenshot from 2026-03-17 10-37-27

About

Command line Rock Paper Scissors game written in C with score tracking and win rate calculation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages