From 8e539da2f28bfdb5667b9ed081d2e3a5c43e40ce Mon Sep 17 00:00:00 2001 From: Lennard Sprong Date: Sun, 5 Nov 2023 16:25:35 +0100 Subject: [PATCH] Improve error display --- src/variety/lineofsight.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/variety/lineofsight.js b/src/variety/lineofsight.js index ebcc46b61..efe3daf47 100644 --- a/src/variety/lineofsight.js +++ b/src/variety/lineofsight.js @@ -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); } }