Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮 Interactive Rock-Paper-Scissors Game Engine

A persistent, logic-driven game application built with vanilla JavaScript, featuring state management and automated opponent AI.

🔗 Live Demo

Play Now


🛠️ Tech Stack

JavaScript HTML5 CSS3


✨ Key Features

🎯 Persistent State Management

  • Utilizes Web Storage API to maintain user state across sessions
  • Ensures 100% data retention with localStorage integration
  • Score and game history persist even after browser closure

🤖 Intelligent Opponent System

  • Localized random-choice algorithm powers automated computer opponent
  • Real-time win/loss/tie calculations for 5-round matches
  • Deterministic logic ensures fair gameplay

🎨 Dynamic UI Rendering

  • DOM manipulation for responsive feedback loops
  • Real-time score updates and result displays
  • Interactive visual feedback for user inputs and game outcomes

🏗️ Optimized Architecture

  • Modular code structure separating concerns:
    • Move-picking algorithms isolated from event handlers
    • Scalable function design for easy feature expansion
    • Clean separation between game logic and UI rendering

🎮 How to Play

  1. Launch the game at sriram629.github.io/Rock-Paper-Scissors-Game
  2. Select your move by clicking Rock, Paper, or Scissors
  3. Computer responds with its randomly generated move
  4. View results instantly with updated scoreboard
  5. Complete 5 rounds to see the overall match result
  6. Reset anytime using the "Reset Score" button

📁 Project Structure

Rock-Paper-Scissors-Game/
├── index.html          # Game interface structure & embedded JavaScript
├── style.css           # UI styling and responsive design
└── images/             # Game assets (rock, paper, scissors icons)

🎯 Technical Highlights

  • Event-Driven Programming: Efficient event handling with minimal overhead
  • State Persistence: localStorage API for cross-session data retention
  • Algorithm Design: Randomization logic for computer opponent
  • Responsive Design: Clean, accessible UI with CSS3
  • Vanilla JavaScript: Zero dependencies, pure DOM manipulation

🚀 Future Enhancement Opportunities

  • Add CSS animations for move selections and results
  • Implement difficulty levels (easy, medium, hard)
  • Create multiplayer support
  • Add sound effects and visual transitions
  • Integrate game statistics and win streaks

👨‍💻 Developer

Sri Rama Krishna Chowdary Maddipati


📄 License

This project is created for educational purposes. Feel free to fork, modify, and enhance!


Built with ❤️ using vanilla JavaScript - proving that powerful functionality doesn't always require frameworks.

About

A sleek, responsive Rock-Paper-Scissors game featuring a smart AI opponent, real-time score tracking, and smooth animations. Built with vanilla JavaScript and hosted on GitHub Pages.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages