summaryrefslogtreecommitdiff
path: root/pub/blankplays.js
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2025-09-24 15:30:07 -0400
committerpommicket <pommicket@gmail.com>2025-09-24 15:36:30 -0400
commit4ee0e5cd0425602d6c1e2357514f9d0876cf5148 (patch)
tree8374330d69ee8d51e08e0a76e65a3bdfc2568973 /pub/blankplays.js
parent569eeca1f591c76090e3efcfdef96f0c4e13e817 (diff)
Various fixes to extractor script
We no longer mislabel plays as invalid and the positions are actually correct now.
Diffstat (limited to 'pub/blankplays.js')
-rw-r--r--pub/blankplays.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/pub/blankplays.js b/pub/blankplays.js
index 13a1232..8b80804 100644
--- a/pub/blankplays.js
+++ b/pub/blankplays.js
@@ -75,6 +75,9 @@ function loadAttempt() {
let saveDataStr = localStorage.getItem(`attempt-${lexicon}-${challengeId}`);
if (!saveDataStr) return;
let saveData = JSON.parse(saveDataStr);
+ if (saveData.version !== 2) {
+ return;
+ }
let solution = saveData.solution.split(';');
for (let row = 0; row < N; row++) {
for (let col = 0; col < N; col++) {
@@ -105,7 +108,7 @@ function saveAttempt() {
for (let col = 0; col < N; col++)
solution.push(currAttempt[row][col].join(','));
let saveData = {
- version: 1,
+ version: 2,
solution: solution.join(';'),
finished: finished,
eliminated: eliminated.join(''),