This is a simple web-based dice game implemented using HTML, CSS, and JavaScript. The game randomly rolls two dice whenever the page is refreshed, determines the outcome (whether Player 1 wins, Player 2 wins, or it's a draw), and displays the result on the screen.
- Ensure you have a modern web browser installed (such as Chrome, Firefox, or Safari).
- Clone or download this repository to your local machine.
Run this link - https://santhosh-siddhardha.github.io/Dice-game/ (or) Open index.html in your web browser.
- Upon loading the page, the game automatically rolls two dice.
- The results will be displayed on the screen, showing the numbers rolled and the outcome (Player 1 wins, Player 2 wins, or Draw).
- Refresh the page to play again and see new results.
- index.html: Main HTML file that displays the game interface.
- style.css: CSS file for styling the game layout.
- index.js: JavaScript file containing the game logic.
- images folder: Contains the images of the dice.
- README.md: This file, providing information about the game.
- The game generates random numbers between 1 and 6 for two dice.
- It compares the numbers rolled: If Player 1's dice roll is higher than Player 2's, Player 1 wins. If Player 2's dice roll is higher than Player 1's, Player 2 wins. If both players roll the same number, it's a draw.
This game was developed using basic front-end web technologies (HTML, CSS, JavaScript) without any external libraries or frameworks. Feel free to explore the code and make modifications as needed.
Lingamuneni Santhosh Siddhardha [email protected]