🏄🌄 Checkpoint

./script.js:18108132/222
./style.css:18108127/144
This commit is contained in:
Glitch (hello-webpage) 2020-07-30 08:42:41 +00:00
parent e713359368
commit 543d29d54c
2 changed files with 14 additions and 5 deletions

View file

@ -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);
}
}
}

View file

@ -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;
}
}