Skip to content

Commit

Permalink
Improve error display
Browse files Browse the repository at this point in the history
  • Loading branch information
x-sheep committed Nov 5, 2023
1 parent e6e7cd3 commit 8e539da
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/variety/lineofsight.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,28 @@
if (this.checkOnly) {
break;
}
bd.border.setnoerr();
if (isvert) {
bd.cellinside(
Math.min(cell.bx, pos.bx),
cell.by,
Math.max(cell.bx, pos.bx),
cell.by
).seterr(1);
bd.borderinside(pos.bx, pos.by - found * 2, pos.bx, pos.by).seterr(
1
);
} else {
bd.cellinside(
cell.bx,
Math.min(cell.by, pos.by),
cell.bx,
Math.max(cell.by, pos.by)
).seterr(1);
bd.borderinside(pos.bx - found * 2, pos.by, pos.bx, pos.by).seterr(
1
);
}
cell.seterr(1);
}
}
Expand Down

0 comments on commit 8e539da

Please sign in to comment.