The Dice Game is a simple and fun two-player game where each player rolls a dice, and the player with the higher roll wins. It can be a great way to pass the time and enjoy a friendly competition, Simply Just by refreshing the Website to rolls the two dices.
Objective
The objective of the game is to roll a higher number on the dice than your opponent.
How to Play
Setup: The game is set up with two dice images displayed on a webpage and a heading to announce the winner.
Rolling the Dice: Each player rolls a virtual dice. The dice roll is simulated using random number generation in JavaScript.
Displaying the Result: The result of each roll is displayed by updating the source of the dice images to show the corresponding dice face (1 through 6).
Determining the Winner: After both dice have been rolled, the numbers are compared:
If Player 1's number is higher, the heading displays "Congratulation Player 1 Winner!".
If Player 2's number is higher, the heading displays "Congratulation Player 2 Winner!".
If both numbers are the same, the heading displays "Draw Match! ".