Welcome to the Dice game! This is a simple web-based game that allows two players to roll dice and determine the winner based on the outcome of their rolls.
- Visit the Dicee Game website.
- "Refresh" the page to roll the dice and see the results.
- The player with the higher dice roll wins! If the rolls are the same, it's a draw.
The project includes the following files and folders:
- images: This folder contains images of dice faces.
- index.html: The main HTML file that structures the game layout.
- script.js: The JavaScript file that defines the game logic.
- styles.css: The CSS file for styling the game.
The JavaScript (script.js
) file contains functions to generate random numbers, change dice images, and declare winners based on the dice rolls.
The initial dice rolls for Player 1 and Player 2 are displayed upon loading the page, and the winner is declared.
To play again, simply click the "Refresh" button or manually refresh the page. The game will generate new random dice rolls, allowing for endless rounds of fun!