Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rock Paper Scissors Game

A simple web-based implementation of the classic Rock Paper Scissors game where players compete against the computer.

Features

  • Interactive web interface
  • Real-time score tracking
  • Immediate feedback on game results
  • Responsive design for all devices

Technologies Used

  • HTML5
  • CSS3
  • JavaScript (ES6+)

Setup and Installation

  1. Clone the repository:
git clone git@github.com:stevensuna/rps-game.git
  1. Open index.html in your web browser
  2. Start playing!

How to Play

  1. Click on one of three buttons: Rock, Paper, or Scissors
  2. The computer will make its choice randomly
  3. The winner is determined by these rules:
    • Rock beats Scissors
    • Scissors beats Paper
    • Paper beats Rock
  4. Score is tracked: +1 for wins, -1 for losses

JavaScript Concepts Used

This project demonstrates several key JavaScript concepts:

  • DOM Manipulation: Event listeners and dynamic content updates
  • Variables: Storing game state, choices, and scores
  • Functions: Modular code organization for game logic
  • Conditionals: Game rules implementation
  • Objects: Storing win conditions and messages
  • Event Handling: Processing player interactions
  • Template Literals: Dynamic message generation
  • Array Methods: Managing game choices
  • Random Number Generation: Computer choice selection

File Structure

rock-paper-scissors/
├── index.html
├── styles.css
├── script.js
└── README.md

Contributing

Feel free to submit issues and enhancement requests.

License

This project is open source and available under the MIT License.

About

Project: Rock Paper Scissors

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages