diff --git a/frontend/public/games/Flappy Block/script.js b/frontend/public/games/Flappy Block/script.js index af98699f..ff18492c 100644 --- a/frontend/public/games/Flappy Block/script.js +++ b/frontend/public/games/Flappy Block/script.js @@ -54,7 +54,7 @@ function update() { pipes.splice(i, 1); createPipe(); score++; - document.getElementById("score").innerText = `Score: ${score}`; + document.getElementById("score").textContent = `Score: ${score}`; } if (block.x < pipe.x + pipe.width && diff --git a/frontend/public/games/Sliding Puzzle/script.js b/frontend/public/games/Sliding Puzzle/script.js index 26baff6c..f7450b7a 100644 --- a/frontend/public/games/Sliding Puzzle/script.js +++ b/frontend/public/games/Sliding Puzzle/script.js @@ -12,7 +12,7 @@ function createPuzzle() { } function render() { - puzzle.innerHTML = ""; + puzzle.textContent = ""; tiles.forEach((num, i) => { let tile = document.createElement("div"); tile.classList.add("tile"); diff --git a/frontend/public/games/flappyBird/flappy.js b/frontend/public/games/flappyBird/flappy.js index e6dbae00..689b263f 100644 --- a/frontend/public/games/flappyBird/flappy.js +++ b/frontend/public/games/flappyBird/flappy.js @@ -52,7 +52,7 @@ bottomPipeImg= new Image(); bottomPipeImg.src="bottompipe.png"; requestAnimationFrame(update); -setInterval(placePipes, 1500); //1.5 sec +clearInterval(window.__interval); window.__interval = setInterval(placePipes, 1500); //1.5 sec document.addEventListener("keydown",moveBird); }; context.drawImage(birdImg, bird.x, bird.y, bird.width, bird.height);