Skip to content

Commit

Permalink
fix: 修复扫描错误路径
Browse files Browse the repository at this point in the history
  • Loading branch information
iDerekLi committed May 31, 2022
1 parent f50780b commit 616f207
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/seaGold.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ class SeaGold {
const curNode = this.getNode(this.gameInfo.curPos);
const bestNode = this.getBestNode(bmmap);
const path = this.getRoutePath(bmmap, curNode, bestNode);
if (!Array.isArray(path)) {
throw new Error(`路径 ${JSON.stringify(path)} 无法在地图 ${JSON.stringify(this.getMaze(bmmap))} 行进.`);
}
const commands = this.getCommands(path);
if (commands.length <= 0) {
return false;
Expand Down

0 comments on commit 616f207

Please sign in to comment.