How aditya-rai08/rock-paper-scissors works
This is a small browser-based Rock–Paper–Scissors game. The player selects a move and number of rounds, then submits each round; the game generates a computer move, compares choices, updates scores, and displays round and final results. The game logic is all in script.js. The HTML structure was not sampled, so UI connections reflect the documented interface and DOM usage rather than verified markup details.
Main entry points: script.js Round handler · index.html Game page · images Move images · style.css Game styling
Components 10
Browser interface
- Game page
index.html - Game styling
style.css
Game flow
- Move selection
script.js - Round handler
script.js - Computer choice
script.js - Winner comparison
script.js - Score tracking
script.js - Result display
script.js
Visual assets
- Move images
images
Other components
- Player
Connections 13
- Player → Game page: plays
- Game page → Move selection: move events
- Game page → Round handler: submit round
- Move selection → Game page: updates selection
- Move selection → Move images: sets player image
- Round handler → Computer choice: requests choice
- Round handler → Winner comparison: compares choices
- Round handler → Score tracking: updates score
- Round handler → Result display: updates display
- Round handler → Game page: updates round UI
- Round handler → Move images: sets computer image
- Result display → Game page: shows results
- Game page → Game styling: uses styles