How vaibhavsirana8474/stone_paper_scissor works
This is a browser-based rock-paper-scissors game. A player selects a move; the script generates a machine move, determines the round result, and updates the message and scores. The source shows the game logic and its DOM interactions. The HTML and CSS are represented from the repository tree, but their contents were not sampled, so their specific elements and styling links are not detailed.
Main entry points: script.js Click handler · index.html Game page
Components 8
Game interface
- Game page
index.html - Game styling
style.css
Game logic
- Click handler
script.js - Move selection
script.js - Round outcome
script.js - Draw message
script.js - Score update
script.js
Other components
- Player
Connections 9
- Player → Game page: selects move
- Game page → Click handler: click event
- Click handler → Move selection: chooses move
- Click handler → Round outcome: compares moves
- Click handler → Draw message: on tie
- Click handler → Score update: on win or loss
- Draw message → Game page: updates message
- Round outcome → Game page: updates message
- Score update → Game page: updates scores