I've been working on creating a memory game where players need to match pairs of cards. The game functions correctly during the first round, but afterwards, if I click on a single card, it automatically gets matched. I've been struggling to find and fix this bug despite investing a significant amount of time into it. Any suggestions or help would be greatly appreciated. Thank you!
Check out my Memory Game on CodePen
let symbol = [
"diamond",
"paper-plane-o",
"anchor",
"bolt",
"cube",
"leaf",
"bomb",
"bicycle",
];
// more JavaScript code for the memory game goes here
// CSS styling for the memory game deck and score panel
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
// HTML structure for the memory game webpage
</head>
<body>
<div class="container">
<header>
<h1>Memory Game</h1>
</header>
<section class="score-panel">
// HTML content for displaying moves, timer, stars, and restart button
</section>
<ul class="deck"></ul>
</div>
<script src="[link to external library]"></script>
<script src="js/app.js"></script>
</body>
</html>