Thanks to visit codestin.com
Credit goes to github.com

Skip to content

sovilleda07/rock-paper-scissors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🪨📄✂️ Rock Paper Scissors

A simple browser-based Rock–Paper–Scissors game built with HTML, CSS, and JavaScript.
Demo game

🎮 Overview

This is a web-based Rock Paper Scissors game where the player competes against the computer. The app runs directly in the browser and uses JavaScript to generate the computer’s move and determine the winner. The score is stored using localStorage, so it persists even if you refresh the page.


🚀 Features

  • Three selectable moves: Rock, Paper, and Scissors
  • Random computer move generation
  • Round result display
  • Scoreboard saved in browser storage
  • Reset score button
  • Simple and clean UI

💻 Technologies Used

  • HTML5: Structure of the game interface
  • CSS3: Styling
  • JavaScript: Game logic and DOM manipulation
  • LocalStorage: For saving game progress

📂 Project Structure

/
├── index.html # Main game UI
├── css/
│ └── styles.css # Styling
├── scripts/
│ └── scripts.js # Game logic
└── img/ # Rock, paper, scissors emojis

🧠 How It Works

  • The user clicks a move button.
  • The JavaScript function playGame() compares:
    • The player's move
    • The computer's randomly generated move
  • The result elements update:
    • Result message
    • Moves display
    • Scoreboard (wins, losses, ties)

The score uses localStorage to persist after refresh.


Live Demo

Experience the game live: Rock, Paper, Scissors Game


✂️ How to Play

  1. Open the game in your web browser.
  2. Click on your choice of Rock, Paper, or Scissors.
  3. View the computer's choice and the result.
  4. Play again!

▶️ How to Run

To run this project locally:

  1. Clone the repository:
  git clone https://github.com/sovilleda07/rock-paper-scissors.git
  1. Navigate to the project directory:
  cd rock-paper-scissors-game
  1. Open index.html in your preferred web browser

📜 License

This project is free for personal or educational use.

Releases

No releases published

Packages

No packages published