diff --git a/Games/RockPaperScissors/index.html b/Games/RockPaperScissors/index.html index f895577..a7d06c7 100644 --- a/Games/RockPaperScissors/index.html +++ b/Games/RockPaperScissors/index.html @@ -10,11 +10,13 @@

0

-
- - -
-
+
+
+ + +
+
+

0

\ No newline at end of file diff --git a/Games/RockPaperScissors/main.js b/Games/RockPaperScissors/main.js index 3b95af1..77a680e 100644 --- a/Games/RockPaperScissors/main.js +++ b/Games/RockPaperScissors/main.js @@ -11,6 +11,7 @@ window.onload = () => { let choice = document.createElement("img"); choice.id = choices[i]; choice.src = `${choices[i]}.png`; + choice.setAttribute("draggable", "false"); choice.addEventListener("click", selectChoice); document.getElementById("choices").append(choice); } diff --git a/Games/RockPaperScissors/style.css b/Games/RockPaperScissors/style.css index 8409b61..a341b7b 100644 --- a/Games/RockPaperScissors/style.css +++ b/Games/RockPaperScissors/style.css @@ -39,12 +39,22 @@ h1{ /*background: #4fdc5e;*/ margin-top: 20px; } +section{ + backdrop-filter: blur(5px); + border-radius: 50px; + box-shadow: + inset 10px 10px 20px #fff, + 10px 10px 20px #333; +} #choices{ - width: 240px; - height: 80px; + width: 304px; + height: 90px; /*background: #f4a478;*/ + border-top: 2.5px #000000cc solid; margin: 0 auto; - margin-top: 10px; + border-radius: 30px; + display: flex; + justify-content: space-around; } #choices img{ @@ -56,11 +66,6 @@ h1{ padding: 2rem; display: flex; flex-direction: column; - backdrop-filter: blur(5px); - border-radius: 50px; - box-shadow: - inset 10px 10px 20px #fff, - 10px 10px 20px #333; } .choices{ @@ -69,6 +74,15 @@ h1{ border-radius: 25px; } +@keyframes pop{ + 0%{ + transform: scale(0.5); + } + 100%{ + transform: scale(1); + } +} + @media screen and (max-width: 500px){ body{ background-image: url("./mobile.jpg"); @@ -77,7 +91,4 @@ h1{ width: 180px; height: 180px; } - .choiBACK{ - - } } \ No newline at end of file diff --git a/img/dead/tiger.png b/img/dead/tiger.png index 820cb1a..f76cfa1 100644 Binary files a/img/dead/tiger.png and b/img/dead/tiger.png differ diff --git a/img/gone/Invis.png b/img/gone/Invis.png new file mode 100644 index 0000000..fdf950d Binary files /dev/null and b/img/gone/Invis.png differ diff --git a/img/gone/tiger.png b/img/gone/tiger.png new file mode 100644 index 0000000..bbb8e73 Binary files /dev/null and b/img/gone/tiger.png differ diff --git a/img/icon.png b/img/icon.png index 98a71a0..262a86d 100644 Binary files a/img/icon.png and b/img/icon.png differ diff --git a/img/tiger/senior.png b/img/tiger/senior.png index c0057b9..6fafb13 100644 Binary files a/img/tiger/senior.png and b/img/tiger/senior.png differ diff --git a/img/tiglet.png b/img/tiglet.png deleted file mode 100644 index b87f9f3..0000000 Binary files a/img/tiglet.png and /dev/null differ diff --git a/main.js b/main.js index 5db9f66..e335086 100644 --- a/main.js +++ b/main.js @@ -20,7 +20,8 @@ const imgTiger = { ////Summer: {}, ////Fall: {}, ////Winter: {}, - Dead: './img/dead/tiger.png' + Dead: './img/dead/tiger.png', + Gone: './img/gone/tiger.png' } let attributes = { @@ -99,29 +100,36 @@ function display(){ Dhealth.innerHTML = toCPercen(attributes.Hp); if(attributes.Age.value<=6){ - NameC.innerHTML = `Junior` + NameC.innerHTML = `Junior`; Aimg.src = imgTiger.Normal.tiger[0]; }else if(attributes.Age.value<18){ - NameC.innerHTML = `Teen` + NameC.innerHTML = `Teen`; Aimg.src = imgTiger.Normal.tiger[1]; }else if(attributes.Age.value<60){ - NameC.innerHTML = `Adult` + NameC.innerHTML = `Adult`; Aimg.src = imgTiger.Normal.tiger[2]; }else if(attributes.Age.value<100){ - NameC.innerHTML = `Senior` + NameC.innerHTML = `Senior`; Aimg.src = imgTiger.Normal.tiger[3]; }else{ - NameC.innerHTML = `Dead` + NameC.innerHTML = `Dead`; attributes.Life.dead = 1; btnHide(); Aimg.src = imgTiger.Dead; } if(attributes.Hp.value<=0){ + NameC.innerHTML = `Dead`; attributes.Life.dead = 1; btnHide(); Aimg.src = imgTiger.Dead; } + + if(attributes.Life.away){ + NameC.innerHTML = `Gone`; + btnHide(); + Aimg.src = imgTiger.Gone; + } } function play(){ @@ -173,10 +181,9 @@ function btnHide(){ } function sadDetection(){ - if(attributes.Joy.value <= attributes.Joy.abszero){ + if((attributes.Joy.value <= attributes.Joy.abszero)&&(attributes.Joy.value<0)){ if(Math.abs(attributes.Joy.value) >= Math.floor(Math.random()*100)){ attributes.Life.away = 1; - btnHide(); } } }