new builder heuristic based on distance from center + - some difficulty margin

master
Ondřej Hruška 5 years ago
parent f6a41cbe07
commit 49da1de933
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 10
      script.js

@ -742,8 +742,9 @@ class SettingsStorage {
version: 1,
log: 'info',
allowTemplateAugmenting: false,
retryTemplate: 30,
attemptTemplates: 50,
retryTemplate: 120,
attemptTemplates: 20,
difficulty: 35,
svgEffects: false,
dimBlocked: true,
logSolution: false,
@ -1200,8 +1201,7 @@ class Game {
if (neigh.freeSequence >= 3) {
candidates.push({
n,
cw: neigh.centerWeight,
neighs: neigh.neighbours,
cw: neigh.centerWeight
});
}
}
@ -1214,7 +1214,7 @@ class Game {
let top = [];
let topw = candidates[0].cw;
for(let cand of candidates) {
if (cand.cw <= topw + 18) {
if (cand.cw <= topw + this.cfg.difficulty) { // TODO this could vary by template
top.push(cand);
}
}

Loading…
Cancel
Save