Coders Packet

Dice Roller Game using JavaScript

By Sravani

This is a funny game where 2 players play based on the number on the dice winner gets decided and also draw happens if the score is the same

It is about a funny game of children, where pressing the refresh button page refreshes and two dices will have a number from 1-6 if player1's score is greater than player 2 player 1 wins, and the other way round if player 2's score is greater player two wins and if the score is equal draw happens,

On refreshing the page we will get the new scores and also the winner will be decided for every round.

Here I used the Math. random function and changed the images of dice using that function and thus deciding the winner

Once try it you will be surely liking it.

Download project

Reviews Report

Submitted by Sravani (sravs123)

Download packets of source code on Coders Packet