A simple web-based dice game that simulates a two-player dice roll and determines the winner.
This project implements a simple dice game using HTML, CSS, and JavaScript. It generates random rolls for two players, displays their corresponding dice faces, and determines the winner or a tie based on the rolls.
- Open the
dicee.html
file in a web browser. - Click the "Roll Dice" button to play the game.
- Observe the dice faces displayed for each player and the winner/tie result.
- The
Math.random()
function is used to generate random numbers for both players' dice rolls. - Corresponding dice face images are loaded based on the rolled numbers.
- The program compares the two rolls to determine the winner or if it's a tie.
- The result is displayed in the heading (
<h1>
) element.
There is no specific installation required. You can simply open the dicee.html
file in a web browser to play the game.