Skip to content

Commit

Permalink
fix reset button to hide at beginning of game
Browse files Browse the repository at this point in the history
  • Loading branch information
rbozek committed Jan 5, 2024
1 parent 1c92224 commit 13d5824
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ h2 {
}

#meditate-pic {
width:400px;
width: 400px;
margin: 0 0 -60px 0;
}

Expand Down
4 changes: 4 additions & 0 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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`
Expand Down Expand Up @@ -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 = ''
Expand Down

0 comments on commit 13d5824

Please sign in to comment.