纠正仓库内容为衍生项目,标明 campaign-200-r2 最新版

This commit is contained in:
toshiocn
2026-10-19 16:56:31 +08:00
parent a492c5b80e
commit fdca4f67ea
1396 changed files with 392768 additions and 19530 deletions
+4
View File
@@ -0,0 +1,4 @@
import fs from 'node:fs';import {solve} from '../rules.mjs';
const pack=JSON.parse(fs.readFileSync('levels.json')),notes=JSON.parse(fs.readFileSync('design.json')),plan=JSON.parse(fs.readFileSync('plan.json'));let removed=0;
for(const l of pack.levels){for(const c of l.cells.filter(c=>c.clue!==undefined&&c.clue!==1)){const clue=c.clue;delete c.clue;if(solve(l,{limit:2}).length!==1)c.clue=clue;else{removed++;console.log('removed redundant',l.order,c.id,clue);if(l.order===10){l.caption='从1开始,走遍全部格,收尾时不要留下孤格。';plan.levels[9].caption=l.caption;}}}notes.find(n=>n.level.id===l.id).level=l;}
for(const [name,data]of [['levels.json',pack],['design.json',notes],['plan.json',plan]])fs.writeFileSync(name,JSON.stringify(data,null,2));console.log('Pruned',removed,'auxiliary numbers');