An interactive Dicee Game built with HTML, CSS, and JavaScript. Roll the dice and see the results! Check out the code on GitHub for a fun web-based gaming experience.
- An interactive Dicee Game built with HTML, CSS, and JavaScript. Roll the dice and see the results! Check out the code on GitHub for a fun web-based gaming experience.
- In the Dicee project, there is a folder called images, add the images of dice6.png as the source to both of the elements.
- Inside index.js, create a new variable called randomNumber1 then set the value of this variable to a random number between 1 and 6. Test it out in the console to make sure it works as expected.
- Use the random number you created in the last step to pick out a random dice image between dice1.png to dice 6.png then place this image inside the left element.
- Change the text in the h1, (which currently says Refresh Me) to show which user won or if there was a draw depending on the dice values of player 1 (left) and player 2 (right).