diff --git a/Projects/DICE GAME/images/dice1.png b/Projects/DICE GAME/images/dice1.png new file mode 100644 index 0000000..543a9ee Binary files /dev/null and b/Projects/DICE GAME/images/dice1.png differ diff --git a/Projects/DICE GAME/images/dice2.png b/Projects/DICE GAME/images/dice2.png new file mode 100644 index 0000000..472bbac Binary files /dev/null and b/Projects/DICE GAME/images/dice2.png differ diff --git a/Projects/DICE GAME/images/dice3.png b/Projects/DICE GAME/images/dice3.png new file mode 100644 index 0000000..5bb30aa Binary files /dev/null and b/Projects/DICE GAME/images/dice3.png differ diff --git a/Projects/DICE GAME/images/dice4.png b/Projects/DICE GAME/images/dice4.png new file mode 100644 index 0000000..2c116a9 Binary files /dev/null and b/Projects/DICE GAME/images/dice4.png differ diff --git a/Projects/DICE GAME/images/dice5.png b/Projects/DICE GAME/images/dice5.png new file mode 100644 index 0000000..d566cd8 Binary files /dev/null and b/Projects/DICE GAME/images/dice5.png differ diff --git a/Projects/DICE GAME/images/dice6.png b/Projects/DICE GAME/images/dice6.png new file mode 100644 index 0000000..8b98b3c Binary files /dev/null and b/Projects/DICE GAME/images/dice6.png differ diff --git a/Projects/DICE GAME/index.html b/Projects/DICE GAME/index.html new file mode 100644 index 0000000..ebeddf4 --- /dev/null +++ b/Projects/DICE GAME/index.html @@ -0,0 +1,38 @@ + + + + + + + + + + Dice Game + + + +

DICE GAME

+
+

+ Wins +

+
+

Player 1

+ +
+ +
+

Player 2

+ +
+
+ 1 + +
+
+ 1 + +
+ + + \ No newline at end of file diff --git a/Projects/DICE GAME/index.js b/Projects/DICE GAME/index.js new file mode 100644 index 0000000..e656aee --- /dev/null +++ b/Projects/DICE GAME/index.js @@ -0,0 +1,23 @@ +var a= Math.random(); +a= a*6; +var first = Math.floor(a)+1; +var so1= "images/dice"+first+".png"; +var fin=document.querySelectorAll("img")[0]; +fin.setAttribute("src",so1); + +var b= Math.random(); +b= b*6; +var second = Math.floor(b)+1; +var so2= "images/dice"+second+".png"; +var fin2=document.querySelectorAll("img")[1]; +fin2.setAttribute("src",so2); + +if(first>second){ +document.querySelectorAll("h1")[0].innerHTML="PLAYER 1 WINS"; +} +else if(first