From 13d58242e363bcd0f9f7228794cba6bed8c67cd5 Mon Sep 17 00:00:00 2001 From: rbozek Date: Fri, 5 Jan 2024 01:42:59 -0500 Subject: [PATCH] fix reset button to hide at beginning of game --- README.md | 2 ++ css/style.css | 2 +- js/app.js | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d21e05e..fbdd278 100644 --- a/README.md +++ b/README.md @@ -30,12 +30,14 @@ The goal is simple - choose a category and answer questions. Each question will ## :wrench: Basic Improvements (a.k.a. not quite Ice Box) +- Have player score pop - Change timer to display mins:seconds, rather than seconds only - Add more questions & more categories - Improve Flexbox layout ## :ice_cube::boxing_glove: Ice Box Features +- Add option to turn sounds off - Answer handling -> after player selects incorrect answer, pause on question, indicate which answer is correct (possibly with additional trivia/info), then click to move to next question - Score handling complexity -> instead of simply correct/incorrect, allow each question a "points maximum" for choosing correctly on first attempt, and subtract points for each incorrect guess - Category handling -> after finishing 1st category, player can maintain score and proceed on to other categories diff --git a/css/style.css b/css/style.css index 9565cc8..b469083 100644 --- a/css/style.css +++ b/css/style.css @@ -36,7 +36,7 @@ h2 { } #meditate-pic { - width:400px; + width: 400px; margin: 0 0 -60px 0; } diff --git a/js/app.js b/js/app.js index ddf1c5e..01025d8 100644 --- a/js/app.js +++ b/js/app.js @@ -21,6 +21,8 @@ const btnCategory3 = document.getElementById("btn-category-3") const question = document.getElementById("question-p") const answers = document.getElementById("answers-ul") const btnReset = document.getElementById("btn-reset") +btnReset.style.display = 'none' // THIS TESTING + const rulesBtnsDiv = document.getElementById("rules-btns-container") const btnContainer = document.getElementById("buttons-container") // for playClick audio purposes const questionContainer = document.getElementById("question-container") // fix for "question-container" little black box issue @@ -51,6 +53,7 @@ function startTimer() { countdown.style.display = '' countdown.style.margin = '10px' countdown.style.padding = '20px' + btnReset.style.display = '' } function updateTimer() { countdown.textContent = `Time remaining: ${timerSeconds}s` @@ -193,6 +196,7 @@ function resetGame(){ countdown.style.display = 'none' questionContainer.style.display = 'none' // fix for "question-container" little black box issue playerScoreContainer.style.display = 'none' + btnReset.style.display = 'none' countdown.textContent = `` question.textContent = '' // this line isnt needed? answers.innerHTML = ''