From 9d0b2c4c64379e936a416c7b3659c178bac37069 Mon Sep 17 00:00:00 2001 From: jhamed147 <60305219@udst.edu.qa> Date: Sun, 15 Feb 2026 18:12:09 +0300 Subject: [PATCH] Fix word bank persistence --- script.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/script.js b/script.js index 43cfa50..99b2022 100644 --- a/script.js +++ b/script.js @@ -57,7 +57,8 @@ function loadWordBank() { } function saveWordBank() { - localStorage.setItem('devopsWords', JSON.stringify(wordBank)); + // ✅ BUG #1 FIX: Use the SAME key for saving and loading + localStorage.setItem('wordBank', JSON.stringify(wordBank)); } function displayWordBank() { @@ -315,4 +316,4 @@ function gameLost() { statusDiv.classList.add('show', 'loser'); gameState.currentPlayer = gameState.currentPlayer === 1 ? 2 : 1; -} +} \ No newline at end of file