onhashchange

This commit is contained in:
Adrien MALINGREY 2023-03-31 01:55:12 +02:00
parent 785f1460fb
commit 6ee740cebd

@ -103,6 +103,12 @@ function loadSavedGame() {
}
}
onhashchange = function(event) {
loadSavedGame()
boxes.forEach(box => searchCandidatesOf(box))
refreshUI()
}
function searchCandidatesOf(box) {
box.candidates = new Set(VALUES)
box.neighbourhood.forEach(neighbour => box.candidates.delete(neighbour.value))