A simple web-based implementation of the classic game "Stone, Paper, Scissors.", allows users to play against a computer-generated random input. The website is built using Browser Object Model (BOM) features, specifically incorporating alert, prompt, confirm, and HTML manipulation using JavaScript.
-
User Interaction: The game involves user interaction through prompts and alerts, allowing the player to make choices during the game.
-
Random Computer Input: The computer generates a random input (stone, paper, or scissors) to play against the user.
-
BOM Learning Application: This project serves as an application of Browser Object Model (BOM) learning. It demonstrates how to interact with the browser and manipulate HTML elements using JavaScript.
-
HTML: The structure of the website is built using HTML.
-
JavaScript: The game logic and interaction with the BOM features are implemented using JavaScript.
-
Open the
index.html
file in a web browser. -
The game will prompt the user to choose between stone, paper, or scissors.
-
The computer will generate a random choice as well.
-
The game will determine the winner based on the classic rules of Stone, Paper, Scissors.
-
The result will be displayed through an alert, indicating whether the user won, lost, or it's a tie.
-
Enjoy playing the game and have fun!
-
index.html
: The main HTML file containing the structure of the web page. -
stone_paper_scissor.css
: CSS file for styling the web page (optional, if included). -
stone_paper_scissor.js
: JavaScript file containing the game logic and BOM interactions.
- This project was created as a learning exercise to apply Browser Object Model (BOM) concepts in JavaScript.
Feel free to contribute, report issues, or provide feedback!