From b71a700ed5f27f5f3df810ba7ffd1fc3ebce93b0 Mon Sep 17 00:00:00 2001 From: Yashgabani845 Date: Tue, 14 May 2024 12:59:21 +0530 Subject: [PATCH 1/2] stone paper sicoors images corrected --- Games/Stone_paper_scissor/script.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Games/Stone_paper_scissor/script.js b/Games/Stone_paper_scissor/script.js index 62ef125546..31a8416f71 100644 --- a/Games/Stone_paper_scissor/script.js +++ b/Games/Stone_paper_scissor/script.js @@ -7,7 +7,7 @@ window.onload = function () { for (let i = 0; i < 3; i++) { let choice = document.createElement("img") choice.id = choices[i]; - choice.src = "./assets/" + choices[i] + ".png" + choice.src = "./public/" + choices[i] + ".png" document.getElementById("choice").append(choice) choice.addEventListener("click", selectchoice) } @@ -15,9 +15,9 @@ window.onload = function () { function selectchoice() { you = this.id - document.getElementById("your-choice").src = "./assets/" + you + ".png" + document.getElementById("your-choice").src = "./public/" + you + ".png" opponent = choices[Math.floor(Math.random() * 3)] - document.getElementById("opponent-choice").src = "./assets/" + opponent + ".png" + document.getElementById("opponent-choice").src = "./public/" + opponent + ".png" if (you == opponent) { let result = document.getElementById("opponent-score") From 2737dc0ef0035080c7ef6a6c1bf0508d90825fe5 Mon Sep 17 00:00:00 2001 From: Yashgabani845 Date: Tue, 14 May 2024 23:04:28 +0530 Subject: [PATCH 2/2] snake game bug fixed --- Games/Snake_Game/index.html | 2 +- Games/Snake_Game/style.css | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Games/Snake_Game/index.html b/Games/Snake_Game/index.html index 1a2629090a..04c9b60637 100644 --- a/Games/Snake_Game/index.html +++ b/Games/Snake_Game/index.html @@ -35,7 +35,7 @@

Snake Game

- +
Score: 0
HighScore: 0
diff --git a/Games/Snake_Game/style.css b/Games/Snake_Game/style.css index 3fe510d25b..ddd2cd60e7 100644 --- a/Games/Snake_Game/style.css +++ b/Games/Snake_Game/style.css @@ -16,7 +16,6 @@ button{ color: darkgreen; border: 2px solid green; - background: none; } @@ -27,11 +26,25 @@ button { left: 42rem; padding: 0.5rem 1rem; font-size: 2rem; - font-family: math; border-radius: 0.6rem; } +.instructions{ + border-radius: 1rem; + position: absolute; + font-size: 30px; + left: 10px; + top: 75px; + width: fit-content; + font-family: math; + color: darkgreen; + border: 2px solid green; + background: none; + padding: 0.5rem 1rem; + } + + button:hover { cursor: pointer; filter: drop-shadow(2px, 2px, 2px black);