freeze grid, fix containsDuplicates

This commit is contained in:
2020-11-14 01:24:43 +01:00
parent 3b8e9b85ea
commit 9b2f1f9d78
3 changed files with 18 additions and 26 deletions

View File

@@ -60,6 +60,7 @@ window.onload = function () {
box.previousValue = savedGame[i]
}
})
fixGridLink.href = savedGame
}
boxes.forEach(box => {
@@ -148,7 +149,9 @@ function oninput() {
}
function refreshBox(box) {
localStorage[location.href] = boxes.map(box => box.value || ".").join("")
let saveGame = boxes.map(box => box.value || UNKNOWN).join("")
localStorage[location.href] = saveGame
fixGridLink.href = saveGame
box.neighbourhood.concat([box]).forEach(neighbour => {
searchCandidatesOf(neighbour)