A simple web-based implementation of the classic Rock Paper Scissors game where players compete against the computer.
- Interactive web interface
- Real-time score tracking
- Immediate feedback on game results
- Responsive design for all devices
- HTML5
- CSS3
- JavaScript (ES6+)
- Clone the repository:
git clone git@github.com:stevensuna/rps-game.git- Open
index.htmlin your web browser - Start playing!
- Click on one of three buttons: Rock, Paper, or Scissors
- The computer will make its choice randomly
- The winner is determined by these rules:
- Rock beats Scissors
- Scissors beats Paper
- Paper beats Rock
- Score is tracked: +1 for wins, -1 for losses
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
rock-paper-scissors/
├── index.html
├── styles.css
├── script.js
└── README.md
Feel free to submit issues and enhancement requests.
This project is open source and available under the MIT License.