Skip to content

suyXcode/rock-paper-scissors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✊🖐️✌️ Rock Paper Scissors — Real-Time Multiplayer

A real-time PvP Rock Paper Scissors game built with React + Firebase Realtime Database.

Features

  • 🔴 Live multiplayer via Firebase (no page refresh needed)
  • 🔑 Room code system — share code with a friend to join
  • 🏆 Live scoreboard across multiple rounds
  • 🎨 Neon arcade UI design

Setup

1. Install dependencies

npm install

2. Firebase Setup

3. Configure environment

Copy .env.example to .env and fill in your Firebase config: cp .env.example .env

4. Run locally

npm start

5. Deploy to Vercel

npm install -g vercel vercel

How to Play

  1. Player 1 clicks Create Room → shares the code
  2. Player 2 clicks Join Room → enters the code
  3. Both players pick Rock, Paper, or Scissors
  4. Choices reveal simultaneously
  5. Host advances to next round

Tech Stack

  • React 18
  • Firebase Realtime Database
  • CSS3 (custom neon arcade theme)

💡 Features

  • ✨ Responsive, intuitive UI
  • 🎲 Randomized computer moves
  • 📊 Live score updates
  • 🚦 Clear result messages

📦 Installation

  • Clone the repo:
[git clone https://github.com/suyXcode/RockPaperScissors.git](https://github.com/suyXcode/rock-paper-scissors.git)
  • Or download as ZIP and extract it.

🚀 Usage

  • 👉 Simply open index.html in your browser (Chrome/Firefox/Edge):
  • Click on Rock, Paper, or Scissors.
  • Watch the computer’s choice and see the result.
  • Scores update automatically!

📌 Learn More

  • Want to understand how Rock-Paper-Scissors logic works? It’s a classic decision-making game
  • where:
  • ✔️ Rock beats Scissors
  • ✔️ Scissors beats Paper
  • ✔️ Paper beats Rock

🤝 Contributing

  • Contributions are warmly welcomed! If you want to add features (like animations, sound, difficulty levels, etc.):

    1. Fork the repo 👇
    2. Create a branch: git checkout -b feature/my-feature
    3. Make your changes & commit: git commit -m "Add some feature"
    4. Push: git push origin feature/my-feature
    5. Create a Pull Request ✔️

👨‍💻 Author(Froked From Another Repo)

Suyash Singh

GitHub

🎓 B.Tech CSE
💡 Data Science | Machine Learning | Web Development
🚀 Passionate about building practical and scalable applications

About

A real-time PvP Rock Paper Scissors game built with React + Firebase Realtime Database.

Topics

Resources

Stars

Watchers

Forks

Contributors