This is a simple JavaScript-based dice game for two players. In this game, You can roll a virtual dice by refreshing the site, and the player with the higher roll wins. If both players roll the same number, it's a draw.
To get started with this game, follow these instructions:
-
Clone or download the repository to your local machine.
-
Open the
index.html
file in your web browser. -
You will see two dice images on the screen, and the result of the game will be displayed as "Player 1 Wins," "Player 2 Wins," or "Draw!" depending on the outcome of the dice rolls.
-
Click the Refresh button to start the game.
-
Two dice images will appear on the screen, each showing a random number between 1 and 6.
-
The player with the higher number wins. If both players roll the same number, it's a draw.
-
The result of the game will be displayed at the top of the screen in the form of a message, such as "🚩Player 1 Wins," "🚩Player 2 Wins," or "Draw!"
This is made as a part of my full stack web developer journey by accessing Angela yu's course in Udemy