diff --git a/buckets.js b/buckets.js index 1d2073a..6800db1 100644 --- a/buckets.js +++ b/buckets.js @@ -62,10 +62,10 @@ class Buckets { best = result; return } - if (best.length == result.length) { + if (best[0].length == result[0].length) { best.push(result); } - if (best.length > result.length) { + if (best[0].length > result[0].length) { best = result; } }) @@ -92,6 +92,7 @@ class Buckets { const action = possibleActions[i]; if (result.hasTarget(target)) { + debugger state.matching.add(result.string()); }