🚠🐀 Checkpoint

./script.js:18108127/744:18108132/17136
./style.css:18108127/96
This commit is contained in:
Glitch (hello-webpage) 2020-07-30 08:30:43 +00:00
parent d1ea4dc995
commit e713359368
2 changed files with 11 additions and 18 deletions

View file

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

View file

@ -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 {