This code represents a simple "Dicee" game web application. The game simulates rolling two dice and displaying the result of each roll on the web page. It also announces the winner or declares a draw between two players based on the rolled dice values.
Certainly! Below is the README file for the "Dicee" web application, explaining its functionality and how to use it:
The Dicee web application is a simple two-player dice game that simulates rolling dice and displays the results on the web page. It also announces the winner or declares a draw between the two players based on the rolled dice values.
-
Open the
index.html
file in a web browser. -
The Dicee game user interface will be displayed, consisting of two dice images labeled "Player 1" and "Player 2" along with the main heading "Refresh Me."
-
To play the game, simply click the "Refresh Me" button (or refresh the web page) to roll the dice for both players.
-
Each time you refresh the page, the dice images will update, displaying a random number from 1 to 6, simulating the roll of a dice.
-
The web page will then declare the winner or a draw based on the rolled dice values:
- If the dice roll for "Player 1" is higher than "Player 2," the web page will display "🏆Player 1 Wins!"
- If the dice roll for "Player 2" is higher than "Player 1," the web page will display "🏆Player 2 Wins!"
- If both players roll the same value, the web page will display "📍Draw!"
-
To play another round, simply click the "Refresh Me" button again to roll the dice once more and see the updated results.
The Dicee web application consists of the following files:
-
index.html
: The HTML file containing the structure of the web page, including the main heading, dice images, and the "Refresh Me" button. -
styles.css
: The CSS file that defines the styles and appearance of the Dicee web application, including the layout, fonts, colors, and button styling. -
index.js
: The JavaScript file responsible for the logic of the Dicee game. It generates random dice numbers, updates the dice images, and determines the winner or a draw. -
images/
: This folder contains the dice images used in the application, from "dice1.png" to "dice6.png."
You can customize the Dicee web application by modifying the CSS styles (styles.css
) to change the colors, fonts, or layout to match your preferences.
The Dicee web application is compatible with modern web browsers, including Chrome, Firefox, Safari, and Edge.
Enjoy playing the Dicee game and have fun rolling the dice with your friends! 🎲🎲
-
The Dicee web application is developed by Sandip Mali.
-
Dice images used in the application are provided under the
images/
folder. These images are taken from a collection of dice images representing numbers 1 to 6.
- PLAYING LINK:- https://dicechallangegame.netlify.app/