A simple and interactive Rock Paper Scissors game built with vanilla HTML, CSS, and JavaScript. Challenge the computer and see if you can win!
This is a beginner-friendly web project that demonstrates fundamental web development concepts including DOM manipulation, event handling, and game logic. Play the classic Rock Paper Scissors game against a computer opponent right in your browser!
- Choose your move: Rock ✊, Paper ✋, or Scissors ✌️
- The computer will randomly select its move
- The winner is determined by the classic rules:
- Rock beats Scissors
- Scissors beats Paper
- Paper beats Rock
- Keep track of your score and try to beat the computer!
- 🎯 Simple Gameplay - Click to play, instant results
- 🤖 Computer Opponent - Random computer moves
- 📊 Score Tracking - Keep track of wins, losses, and ties
- 🎨 Clean UI - Simple and intuitive interface
- 📱 Responsive Design - Works on desktop and mobile devices
- ⚡ Fast & Lightweight - No frameworks, pure vanilla JavaScript
All you need is a modern web browser! No installation required.
- Google Chrome (recommended)
- Firefox
- Safari
- Microsoft Edge
- Or any modern browser
-
Download or Clone the Repository
git clone [https://github.com/yourusername/rock-paper-scissors.git](https://github.com/KarlAngeloFlores/RPS.github.io.git)
or download the ZIP file and extract it.
-
Open the Game
- Navigate to the project folder
- Double-click on
index.html - The game will open in your default browser Using VS Code Live Server:
-
Install the "Live Server" extension
-
Right-click on
index.html -
Select "Open with Live Server"
- HTML5 - Structure and content
- CSS3 - Styling and layout
- JavaScript (ES6) - Game logic and interactivity
Contains the game structure including:
- Title and instructions
- Button elements for player choices
- Display areas for results and scores
Handles all visual styling:
- Layout and positioning
- Button styles and hover effects
- Color schemes and typography
- Responsive design for different screen sizes
Core game functionality:
- Event listeners for button clicks
- Random computer choice generation
- Score tracking and updates
- DOM manipulation to display results
This project demonstrates:
- DOM Manipulation - Selecting and updating HTML elements
- Event Handling - Responding to user clicks
- Conditional Logic - If/else statements for game rules
- Random Number Generation - Computer's random choices
- Functions - Organizing code into reusable blocks
- Variables - Storing game state and scores
Want to make this project your own? Try adding:
- 🎨 Different color schemes or themes
- 🏆 High score tracking (using localStorage)
- 🔊 Sound effects for wins/losses
- ⏱️ Timer for quick-play mode
- 🎭 Animated transitions and effects
- 📈 Statistics (win rate, total games played)
- 🌟 Different difficulty levels
- 🎮 Extended version (Rock Paper Scissors Lizard Spock)
This is a beginner project, but contributions are welcome!
- Fork the repository
- Create your feature branch (
git checkout -b feature/awesome-feature) - Commit your changes (
git commit -m 'Add awesome feature') - Push to the branch (
git push origin feature/awesome-feature) - Open a Pull Request
This project is free to use for learning purposes. Feel free to modify and distribute as needed.
Your Name
- GitHub: @KarlAngeloFlores
- Thanks to the web development community
- Inspired by classic Rock Paper Scissors game
- Built as a learning project for beginners
⭐ If you found this helpful, please give it a star!
🎮 Happy Gaming!