Fix issue with not returning best result

master
Buddy Sandidge 5 years ago
parent b76e031352
commit 7a3ca3a302

@ -62,10 +62,10 @@ class Buckets {
best = result; best = result;
return return
} }
if (best.length == result.length) { if (best[0].length == result[0].length) {
best.push(result); best.push(result);
} }
if (best.length > result.length) { if (best[0].length > result[0].length) {
best = result; best = result;
} }
}) })
@ -92,6 +92,7 @@ class Buckets {
const action = possibleActions[i]; const action = possibleActions[i];
if (result.hasTarget(target)) { if (result.hasTarget(target)) {
debugger
state.matching.add(result.string()); state.matching.add(result.string());
} }

Loading…
Cancel
Save