I
Size: a a a
I
I
N
I
N
N
N
N
I
N
N
VC
let countGame = 0;
const countPoints = (event) => {
if (event.target.classList.contains("creature-pic")) {
countGame++;
} else if (!event.target.classList.contains("creature-pic")) {
console.log("you wrong");
};
localStorage.setItem("countGame", countGame);
};
document.addEventListener("click", countPoints);
const finalСount = () => {
let countGame = localStorage.getItem("countGame")
if (iterations == countGame) {
victory.classList.add("block");
} else if (iterations != countGame) {
lost.classList.add("block");
}
gamePoints.textContent = countGame;
};
finalStory.addEventListener("click", finalСount);
N
I
N
BB
N
АЛ
ПА