Skip to content

Commit

Permalink
Update util.js
Browse files Browse the repository at this point in the history
  • Loading branch information
avi-friedman-IL authored Jan 1, 2024
1 parent 8af2aee commit 41f1b73
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions js/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ function renderCell(location, value) {
const cellSelector = '.' + getClassName(location)
const elCell = document.querySelector(cellSelector)
elCell.innerHTML = value
elCell.style.backgroundColor = 'azure'
}

function getClassName(position) {
Expand All @@ -29,19 +30,21 @@ function getRandomColor() {
}
return color
}
const elTimer = document.querySelector('.timer span')
function getTimer() {
if(!gGame.isOn) return


gGame.secsPassed++;
elTimer.innerText = gGame.secsPassed
}







function onCellMarked(elCell) {

}

function checkGameOver() {

}
Expand Down

0 comments on commit 41f1b73

Please sign in to comment.