Skip to content

Commit

Permalink
Fix missing images issue Aatmaj-Zephyr#81
Browse files Browse the repository at this point in the history
  • Loading branch information
jma26 committed Oct 12, 2022
1 parent bc0cd00 commit d7c3c4f
Show file tree
Hide file tree
Showing 19 changed files with 22 additions and 22 deletions.
12 changes: 6 additions & 6 deletions MemoryGame.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ var turns = 0; //Number of turns taken.
const Cards = []; //Array to store the Cards.
//Setting the Cards.
for (let j = 0; j < 8; j++) {
r = Math.floor(Math.random() * (90 - 64 + 1)) + 64; //Character set from unicode.
Cards.push(String.fromCharCode(r)); //Push twice.
Cards.push(String.fromCharCode(r));
randoNum = Math.floor(Math.random() * 17); // Random number from 1 to 16.
Cards.push(randoNum); //Push twice.
Cards.push(randoNum);
}
Cards.sort(() => 0.5 - Math.random()); //Random shuffling of Cards.
Cards.push(Cards[0]); //Ignore the Card at 0th positon.
Expand All @@ -23,7 +23,7 @@ for (let f = 1; f <= 16; f++) {
function Buttonclicked(a) {
//Function to be executed once button is clicked.
//a is the parameter which tells which button is clicked.
document.getElementById("button" + a).innerHTML = Cards[a]; //Flip the Card over.
document.getElementById("button" + a).src = `./images/${Cards[a]}.png`; // Flip the Card over
document.getElementById("button" + a).disabled = "disabled"; //Disable clicking the same Card.
document.getElementById("button" + a).style =
"opacity: 0.7;cursor: not-allowed;color:Blue";
Expand All @@ -45,10 +45,10 @@ function checkscore(a) {
"transition-duration: 0.8s;background-color:Tomato;color:White;";
//If invalid, then set the background background-color Orange.
window.setTimeout(function () {
document.getElementById("button" + a).innerHTML = "?";
document.getElementById("button" + a).src = `./images/question.png`;
document.getElementById("button" + a).style = style;
document.getElementById("button" + temp).style = style;
document.getElementById("button" + temp).innerHTML = "?";
document.getElementById("button" + temp).src = `./images/question.png`;
document.getElementById("button" + temp).disabled = "";
document.getElementById("button" + a).disabled = "";
}, 1200);
Expand Down
Binary file added images/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/question.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 16 additions & 16 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,99 +35,99 @@ <h1 class="h1">Memory game</h1>
<img
id="button1"
class="button"
src="/images/super-smash-bros/question.png"
src="./images/question.png"
onclick="Buttonclicked(1)"
/>
<img
id="button2"
class="button"
src="/images/super-smash-bros/question.png"
src="./images/question.png"
onclick="Buttonclicked(2)"
/>
<img
id="button3"
class="button"
src="/images/super-smash-bros/question.png"
src="./images/question.png"
onclick="Buttonclicked(3)"
/>
<img
id="button4"
class="button"
src="/images/super-smash-bros/question.png"
src="./images/question.png"
onclick="Buttonclicked(4)"
/>
<img
id="button5"
class="button"
src="/images/super-smash-bros/question.png"
src="./images/question.png"
onclick="Buttonclicked(5)"
/>
<img
id="button6"
class="button"
src="/images/super-smash-bros/question.png"
src="./images/question.png"
onclick="Buttonclicked(6)"
/>
<img
id="button7"
class="button"
src="/images/super-smash-bros/question.png"
src="./images/question.png"
onclick="Buttonclicked(7)"
/>
<img
id="button8"
class="button"
src="/images/super-smash-bros/question.png"
src="./images/question.png"
onclick="Buttonclicked(8)"
/>
</div>
<div class="row">
<img
id="button9"
class="button"
src="/images/super-smash-bros/question.png"
src="./images/question.png"
onclick="Buttonclicked(9)"
/>
<img
id="button10"
class="button"
src="/images/super-smash-bros/question.png"
src="./images/question.png"
onclick="Buttonclicked(10)"
/>
<img
id="button11"
class="button"
src="/images/super-smash-bros/question.png"
src="./images/question.png"
onclick="Buttonclicked(11)"
/>
<img
id="button12"
class="button"
src="/images/super-smash-bros/question.png"
src="./images/question.png"
onclick="Buttonclicked(12)"
/>
<img
id="button13"
class="button"
src="/images/super-smash-bros/question.png"
src="./images/question.png"
onclick="Buttonclicked(13)"
/>
<img
id="button14"
class="button"
src="/images/super-smash-bros/question.png"
src="./images/question.png"
onclick="Buttonclicked(14)"
/>
<img
id="button15"
class="button"
src="/images/super-smash-bros/question.png"
src="./images/question.png"
onclick="Buttonclicked(15)"
/>
<img
id="button16"
class="button"
src="/images/super-smash-bros/question.png"
src="./images/question.png"
onclick="Buttonclicked(16)"
/>
</div>
Expand Down

0 comments on commit d7c3c4f

Please sign in to comment.