Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Let's Play - Stone Paper Scissors

Python Platform Players Status Made%20with

πŸͺ¨ vs πŸ“„ vs βœ‚οΈ β€” the oldest duel in the book, now in Python

Two players. One keyboard. Zero mercy.

✨ Features

🀝 Local 2‑player β€” pass the keyboard, no accounts, no internet
⚑ Instant verdict β€” one input each, result printed immediately
πŸ”‘ Case-insensitive input β€” Stone, STONE, and stone all work
🧠 Classic rules β€” stone beats scissor, scissor beats paper, paper beats stone
πŸͺΆ Tiny footprint β€” a single file, pure Python, zero dependencies

πŸ•ΉοΈ How It Works

flowchart TD
    A([Start game]) --> B[Clear screen & greet players]
    B --> C[user1 enters a shape]
    C --> D[user2 enters a shape]
    D --> E{Compare shapes}
    E -->|user1's shape beats user2's| F[πŸŽ‰ user1 WINS]
    E -->|user2's shape beats user1's| G[πŸŽ‰ user2 WINS]
    E -->|Same shape| H[🀝 It's a tie β€” try again]
    E -->|Unrecognized word| I[❌ Invalid syntax]
Loading

πŸ† Rules at a Glance

user1 plays beats user2 plays
πŸͺ¨ stone crushes βœ‚οΈ scissor
πŸ“„ paper covers πŸͺ¨ stone
βœ‚οΈ scissor cuts πŸ“„ paper

Same shape on both sides β†’ tie. Anything else β†’ invalid input.


πŸš€ Getting Started

Prerequisites

  • Python 3 installed on your machine

Run it

git clone <your-repo-url>
cd <your-repo-folder>
python3 rps.py

Sample Session

HELLO GUYZ! SHAKE YOUR HANDS. AFTER SHAKING , Enter data:)
user1 ENTER YOUR SHAPE: stone
user2 ENTER YOUR SHAPE: scissor
CONGRATS user1 WINS! 

(Verified by actually running the script through every combination of stone / paper / scissor, plus a tie and an invalid word β€” all eight cases returned the correct message.)


βœ… Verification Notes

Being upfront about what was checked, since a README should never overpromise:

  • All 6 win conditions produce the correct winner.
  • All 3 tie conditions (stone/stone, paper/paper, scissor/scissor) correctly print "BOTH SHAPES ARE SAME!" with no crash.
  • Unrecognized input (e.g. rock) correctly falls through to "INVALID SYNTAX!".
  • Heads-up: os.system("cls") only clears the screen on Windows. On macOS/Linux it's a no-op (the cls command doesn't exist there), so the screen simply won't clear β€” harmless, but worth knowing if you're on Mac/Linux and wondering why old output lingers. Swap in os.system("cls" if os.name == "nt" else "clear") if you want it cross-platform.

πŸ—‚οΈ Project Structure

.
β”œβ”€β”€ rps.py            # the game
β”œβ”€β”€ README.md
└── assets/
    β”œβ”€β”€ banner.svg
    └── terminal-demo.svg

🀝 Contributing

Got an idea β€” best-of-3 rounds, a computer opponent, colored terminal output? PRs and issues are welcome.

πŸ“œ License

This project is licensed under the MIT License β€” free to use, copy, modify, and share.


πŸͺ¨ πŸ“„ βœ‚οΈ May the best shape win.

About

A simple Rock-Paper-Scissor game created for your fun. πŸͺ¨ πŸ“„ βœ‚οΈ

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages