diff --git a/Dice Game/dicee.html b/Dice Game/dicee.html new file mode 100644 index 00000000..6a99707d --- /dev/null +++ b/Dice Game/dicee.html @@ -0,0 +1,34 @@ + + + + + Dicee + + + + + + +
+

Refresh Me

+ +
+

Player 1

+ +
+ +
+

Player 2

+ +
+ +
+ + + + + + + diff --git a/Dice Game/images/dice1.png b/Dice Game/images/dice1.png new file mode 100644 index 00000000..543a9eec Binary files /dev/null and b/Dice Game/images/dice1.png differ diff --git a/Dice Game/images/dice2.png b/Dice Game/images/dice2.png new file mode 100644 index 00000000..472bbacd Binary files /dev/null and b/Dice Game/images/dice2.png differ diff --git a/Dice Game/images/dice3.png b/Dice Game/images/dice3.png new file mode 100644 index 00000000..5bb30aad Binary files /dev/null and b/Dice Game/images/dice3.png differ diff --git a/Dice Game/images/dice4.png b/Dice Game/images/dice4.png new file mode 100644 index 00000000..2c116a94 Binary files /dev/null and b/Dice Game/images/dice4.png differ diff --git a/Dice Game/images/dice5.png b/Dice Game/images/dice5.png new file mode 100644 index 00000000..d566cd85 Binary files /dev/null and b/Dice Game/images/dice5.png differ diff --git a/Dice Game/images/dice6.png b/Dice Game/images/dice6.png new file mode 100644 index 00000000..8b98b3c3 Binary files /dev/null and b/Dice Game/images/dice6.png differ diff --git a/Dice Game/index.js b/Dice Game/index.js new file mode 100644 index 00000000..7823e475 --- /dev/null +++ b/Dice Game/index.js @@ -0,0 +1,47 @@ +// Generate random number +var randomNumber1 = Math.floor(Math.random() * 6) + 1; // 1-6 + +// Select the dice based on the random number generator +var diceImage1= "dice" + randomNumber1 + ".png"; // dice1.png - dice6.png + +// randomly select the dice image based on the random number generator +var diceImgSrc = "images/" + diceImage1; // images/dice1.png - images/dice6.png + +// get the image +var image1 = document.querySelectorAll("img")[0]; + +// set the image +image1.setAttribute("src", diceImgSrc); + + + +// Generate random number +var randomNumber2 = Math.floor(Math.random() * 6) + 1; + +// Select the dice based on the random number generator +var diceImage2= "dice" + randomNumber2 + ".png"; + +// randomly select the dice image based on the random number generator +var diceImgSrc2 = "images/dice" + randomNumber2 + ".png"; + +// get the image +var image2 = document.querySelectorAll("img")[1]; + +// set the image +image2.setAttribute("src", diceImgSrc2); + +// Set the title (Which players is Won) +if (randomNumber1 > randomNumber2) { + document.querySelector("h1").innerHTML = "Player 1 Won"; +} +else if (randomNumber1 === randomNumber2) { + document.querySelector("h1").innerHTML = "Match Draw"; +} +else { + document.querySelector("h1").innerHTML = "Player 2 Won"; +} + + + + + diff --git a/Dice Game/styles.css b/Dice Game/styles.css new file mode 100644 index 00000000..c5ad7404 --- /dev/null +++ b/Dice Game/styles.css @@ -0,0 +1,41 @@ +.container { + width: 70%; + margin: auto; + text-align: center; +} + +.dice { + text-align: center; + display: inline-block; + +} + +body { + background-color: #393E46; +} + +h1 { + margin: 30px; + font-family: 'Lobster', cursive; + text-shadow: 5px 0 #232931; + font-size: 8rem; + color: #4ECCA3; +} + +p { + font-size: 2rem; + color: #4ECCA3; + font-family: 'Indie Flower', cursive; +} + +img { + width: 80%; +} + +footer { + margin-top: 5%; + color: #EEEEEE; + text-align: center; + font-family: 'Indie Flower', cursive; + +} diff --git a/Drum Kit/Drum Kit Starting Files/images/crash.png b/Drum Kit/Drum Kit Starting Files/images/crash.png new file mode 100644 index 00000000..a992fa0f Binary files /dev/null and b/Drum Kit/Drum Kit Starting Files/images/crash.png differ diff --git a/Drum Kit/Drum Kit Starting Files/images/kick.png b/Drum Kit/Drum Kit Starting Files/images/kick.png new file mode 100644 index 00000000..b64877e7 Binary files /dev/null and b/Drum Kit/Drum Kit Starting Files/images/kick.png differ diff --git a/Drum Kit/Drum Kit Starting Files/images/snare.png b/Drum Kit/Drum Kit Starting Files/images/snare.png new file mode 100644 index 00000000..1e089bac Binary files /dev/null and b/Drum Kit/Drum Kit Starting Files/images/snare.png differ diff --git a/Drum Kit/Drum Kit Starting Files/images/tom1.png b/Drum Kit/Drum Kit Starting Files/images/tom1.png new file mode 100644 index 00000000..855b2111 Binary files /dev/null and b/Drum Kit/Drum Kit Starting Files/images/tom1.png differ diff --git a/Drum Kit/Drum Kit Starting Files/images/tom2.png b/Drum Kit/Drum Kit Starting Files/images/tom2.png new file mode 100644 index 00000000..3e9f3636 Binary files /dev/null and b/Drum Kit/Drum Kit Starting Files/images/tom2.png differ diff --git a/Drum Kit/Drum Kit Starting Files/images/tom3.png b/Drum Kit/Drum Kit Starting Files/images/tom3.png new file mode 100644 index 00000000..762cbf85 Binary files /dev/null and b/Drum Kit/Drum Kit Starting Files/images/tom3.png differ diff --git a/Drum Kit/Drum Kit Starting Files/images/tom4.png b/Drum Kit/Drum Kit Starting Files/images/tom4.png new file mode 100644 index 00000000..e79c49e1 Binary files /dev/null and b/Drum Kit/Drum Kit Starting Files/images/tom4.png differ diff --git a/Drum Kit/Drum Kit Starting Files/index.html b/Drum Kit/Drum Kit Starting Files/index.html new file mode 100644 index 00000000..5f52e773 --- /dev/null +++ b/Drum Kit/Drum Kit Starting Files/index.html @@ -0,0 +1,31 @@ + + + + + + Drum Kit + + + + + + +

Drum 🥁 Kit

+
+ + + + + + + +
+ + + + + + + diff --git a/Drum Kit/Drum Kit Starting Files/index.js b/Drum Kit/Drum Kit Starting Files/index.js new file mode 100644 index 00000000..a8b50aff --- /dev/null +++ b/Drum Kit/Drum Kit Starting Files/index.js @@ -0,0 +1,69 @@ +var noOfDrumButtons = document.querySelectorAll(".drum").length; + +for (var i=0; i