From 7b09eca244ff40972938718326ba1410277e2dab Mon Sep 17 00:00:00 2001 From: ReverM Date: Thu, 11 Sep 2025 20:38:31 -0400 Subject: [PATCH 1/2] Bug and enhancement for Bosanowa Made editing more nice, by disallowing the cursor to go on borders in edit mode. Fixed a bug where numbers above 255 were not encoded. Fixed a bug where going in answer mode on a cell that is not a circle, in number mode, then clicking the cell would place a number. --- src/variety/bosanowa.js | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/src/variety/bosanowa.js b/src/variety/bosanowa.js index 56394abfc..eabff9ba5 100644 --- a/src/variety/bosanowa.js +++ b/src/variety/bosanowa.js @@ -30,7 +30,8 @@ }, inputqnum_bosanowa: function() { - var pos = this.getpos(0.31); + var threshold = this.puzzle.playmode ? 0.31 : 1; + var pos = this.getpos(threshold); if (!pos.isinside()) { return; } @@ -121,6 +122,30 @@ border.drawaround(); } }, + inputqnum: function() { + var cell = this.getcell(); + if ( + cell.isnull || + cell === this.mouseCell || + (cell.ques !== 0 && this.puzzle.playmode) + ) { + return; + } + + if ( + this.cursor.modesnum && + this.puzzle.playmode && + !this.cursor.checksnum(this.inputPoint) && + cell.noNum() + ) { + this.setcursorsnum(cell); + } else if (cell !== this.cursor.getc()) { + this.setcursor(cell); + } else { + this.inputqnum_main(cell); + } + this.mouseCell = cell; + }, inputclean_all: function() { var pos = this.getpos(0.31); if (this.prevPos.equals(pos)) { @@ -146,7 +171,15 @@ enablemake: true, enableplay: true, moveTarget: function(ca) { - return this.moveTBorder(ca); + if (this.puzzle.editmode) { + if (this.cursor.onborder() || this.cursor.oncross()) { + // If switching from playmode on border, makes going back to cells only easier + return this.moveTBorder(ca); + } + return this.moveTCell(ca); + } else { + return this.moveTBorder(ca); + } }, keyinput: function(ca) { @@ -572,6 +605,8 @@ pstr = qn.toString(16); } else if (qn >= 16 && qn < 256) { pstr = "-" + qn.toString(16); + } else if (qn >= 256 && qn < 4096) { + pstr = "+" + qn.toString(16); } else { count++; } From 4c1c74f13b7aec546e707f1a2d2f93ce9fcab21e Mon Sep 17 00:00:00 2001 From: ReverM Date: Tue, 23 Sep 2025 10:59:15 -0400 Subject: [PATCH 2/2] Reverted input changes --- src/variety/bosanowa.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/variety/bosanowa.js b/src/variety/bosanowa.js index eabff9ba5..c0c779bc4 100644 --- a/src/variety/bosanowa.js +++ b/src/variety/bosanowa.js @@ -30,8 +30,7 @@ }, inputqnum_bosanowa: function() { - var threshold = this.puzzle.playmode ? 0.31 : 1; - var pos = this.getpos(threshold); + var pos = this.getpos(0.31); if (!pos.isinside()) { return; } @@ -122,6 +121,7 @@ border.drawaround(); } }, + inputqnum: function() { var cell = this.getcell(); if ( @@ -171,15 +171,7 @@ enablemake: true, enableplay: true, moveTarget: function(ca) { - if (this.puzzle.editmode) { - if (this.cursor.onborder() || this.cursor.oncross()) { - // If switching from playmode on border, makes going back to cells only easier - return this.moveTBorder(ca); - } - return this.moveTCell(ca); - } else { - return this.moveTBorder(ca); - } + return this.moveTBorder(ca); }, keyinput: function(ca) {