In this replay, the bot crashed before making their move. The stack trace was:
│ file:///app/src/tools/util.js:97
│ return [...new Array(end - start).keys()].map(num => num + start);
│ ^
│
│ RangeError: Invalid array length
│ at Module.range (file:///app/src/tools/util.js:97:13)
│ at inBetween (file:///app/src/conventions/h-group/hanabi-logic.js:174:15)
│ at file:///app/src/conventions/h-group/take-action.js:278:111
│ at Array.some (<anonymous>)
│ at HGroup.take_action (file:///app/src/conventions/h-group/take-action.js:278:56)
│ at Timeout._onTimeout (file:///app/src/action-handler.js:117:52)
│ at listOnTimeout (node:internal/timers:573:17)
│ at process.processTimers (node:internal/timers:514:7)
So, this line sometimes calls inBetween with giver == target. Maybe this is not the best solution, but to me it makes semantic sense to return false when giver == target.
In this replay, the bot crashed before making their move. The stack trace was:
So, this line sometimes calls
inBetween
withgiver == target
. Maybe this is not the best solution, but to me it makes semantic sense to return false whengiver == target
.