Skip to content

Commit

Permalink
Merge pull request #15 from Terrible-creeper/patch-1
Browse files Browse the repository at this point in the history
更新script內看牌錯誤
  • Loading branch information
KageRyo authored Apr 14, 2023
2 parents 2042e49 + 455ca17 commit 020d900
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ function lookCard() {
flip.forEach(card => card.removeEventListener('click', flipCard));
// 重置第一次點擊
const lookCardback = document.querySelectorAll(".memory-card");
firstCard = null;
// 偷看
lookCardback.forEach(card => card.classList.add('flip'));
setTimeout(() => {
Expand Down Expand Up @@ -255,4 +256,4 @@ hard.addEventListener('click', difficultyChoose);
// 重置的點擊事件
reset.addEventListener('click', resetGame);
// 偷看的點擊事件
look.addEventListener('click', lookCard);
look.addEventListener('click', lookCard);

0 comments on commit 020d900

Please sign in to comment.