mirror of
https://codeberg.org/JasterV/MEMORY-CARD-GAME.git
synced 2026-04-26 18:20:03 +00:00
🚠🐀 Checkpoint
./script.js:18108127/744:18108132/17136 ./style.css:18108127/96
This commit is contained in:
parent
d1ea4dc995
commit
e713359368
2 changed files with 11 additions and 18 deletions
22
script.js
22
script.js
|
|
@ -80,16 +80,14 @@ imgDivArray.forEach(targetCard => {
|
|||
}, 300);
|
||||
}
|
||||
} else {
|
||||
if (hardMode) {
|
||||
looseGame(currentUser);
|
||||
} else {
|
||||
discoveredCards.pop();
|
||||
|
||||
setTimeout(() => {
|
||||
lastCard.classList.add("flipped-cell");
|
||||
targetCard.classList.add("flipped-cell");
|
||||
}, 500);
|
||||
}
|
||||
discoveredCards.pop();
|
||||
setTimeout(() => {
|
||||
lastCard.classList.add("flipped-cell");
|
||||
targetCard.classList.add("flipped-cell");
|
||||
if (hardMode) {
|
||||
looseGame(currentUser);
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -175,8 +173,8 @@ function scoreBarController(barId) {
|
|||
|
||||
setUserLost(username) {
|
||||
let userContainer = this.getUser(username);
|
||||
userContainer.lastElementChild.innerHTML = `<p style="display:flex;align-items:center;justify-content:center">Lost! - ${tries -
|
||||
1} <img class="card-pairs" src="https://cdn.glitch.com/56d96ce9-5171-477f-8560-558ec3af0051%2Fpair-card.svg?v=1596096914492"> in a row! </p>`;
|
||||
userContainer.lastElementChild.innerHTML = `<p>Lost! - ${tries -
|
||||
1} pairs in a row! </p>`;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -275,12 +275,6 @@ strong {
|
|||
background: #479EEB;
|
||||
}
|
||||
|
||||
.card-pairs {
|
||||
width: 30px;
|
||||
margin-left: 6px;
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
@media (max-width: 980px) {
|
||||
body {
|
||||
padding: 0 90px;
|
||||
|
|
@ -302,6 +296,7 @@ strong {
|
|||
margin-left: 0;
|
||||
margin-top: 2rem;
|
||||
width: 100%;
|
||||
min-height: 170px;
|
||||
}
|
||||
|
||||
.left-card, .score-container {
|
||||
|
|
|
|||
Loading…
Reference in a new issue