Skip to content

About

Bash Battle: Rock Paper Scissors Project for Intro to Linux class

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Rock Paper Scissors

Code Overview

The program starts by welcoming the user to a Bash Battle and then prompting them to choose between Rock, Paper, or Scissors. Each choice is assigned to 1, 2, and 3 respectively. The program will then generate a random choice for the computer using the same options.

The game determines the winner using classic rules:

  • Rock beats Scissors
  • Scissors beats Paper
  • Paper beats Rock
  • Same choice = Tie

The program also color codes the outcomes of each battle:

  • Green = Wins
  • Yellow = Tie
  • Red = Loss

Some added features the game includes:

  • Trash-talking computer
  • Statistics such as total games, # of wins and losses, and win percentage
  • Secret Mode options such as Lizard and Spock

To make the script executable in a Linux shell, use the command chmod +x rps.sh

This code is a work-in-progress and requires testing in Linux VMs and containers. The final product will be available by December 8, 2026.

This file will be updated as changes progress!

About

Bash Battle: Rock Paper Scissors Project for Intro to Linux class

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages