mirror of
https://codeberg.org/JasterV/MEMORY-CARD-GAME.git
synced 2026-04-26 18:20:03 +00:00
🏄🌄 Checkpoint
./script.js:18108132/222 ./style.css:18108127/144
This commit is contained in:
parent
e713359368
commit
543d29d54c
2 changed files with 14 additions and 5 deletions
|
|
@ -67,13 +67,12 @@ imgDivArray.forEach(targetCard => {
|
|||
|
||||
if (discoveredCards.length % 2 == 0) {
|
||||
discoveredCards.push(targetCard);
|
||||
tries++;
|
||||
console.log(tries);
|
||||
} else {
|
||||
let lastCard = discoveredCards[discoveredCards.length - 1];
|
||||
tries++;
|
||||
if (areEqualCards(targetCard, lastCard)) {
|
||||
discoveredCards.push(targetCard);
|
||||
|
||||
|
||||
if (isGameEnd(discoveredCards, imgDivArray)) {
|
||||
setTimeout(() => {
|
||||
winGame(currentUser);
|
||||
|
|
@ -87,7 +86,7 @@ imgDivArray.forEach(targetCard => {
|
|||
if (hardMode) {
|
||||
looseGame(currentUser);
|
||||
}
|
||||
}, 500);
|
||||
}, 300);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
12
style.css
12
style.css
|
|
@ -277,7 +277,11 @@ strong {
|
|||
|
||||
@media (max-width: 980px) {
|
||||
body {
|
||||
padding: 0 90px;
|
||||
padding: 60px 90px;
|
||||
}
|
||||
|
||||
.cell {
|
||||
height: 90px;
|
||||
}
|
||||
|
||||
.cards-row {
|
||||
|
|
@ -348,4 +352,10 @@ strong {
|
|||
.score-container {
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 420px) {
|
||||
body {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue