From eb1425535c41723087f048204c22e36786897895 Mon Sep 17 00:00:00 2001 From: Lennard Sprong Date: Thu, 27 Jul 2023 13:30:44 +0000 Subject: [PATCH 01/12] Translated using Weblate (English) Currently translated at 100.0% (774 of 774 strings) Translation: pzprjs/FailCode Translate-URL: https://hosted.weblate.org/projects/pzprjs/failcode/en/ --- src/res/failcode.en.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/res/failcode.en.json b/src/res/failcode.en.json index 4e1cab1fb..5c2cb0044 100644 --- a/src/res/failcode.en.json +++ b/src/res/failcode.en.json @@ -549,7 +549,7 @@ "lnSnLine.lither": "There is only one tree.", "lnStarNe.starbattle": "The number of stars in a line is wrong.", "lnWrongAngle.kouchoku": "Some segments meet at the wrong angle.", - "lookairBC.lookair": "A mass of shaded cells can looks other same size mass of shaded cells.", + "lookairBC.lookair": "Two squares of the same size can see each other.", "lpNoNum.onsen": "A loop has no numbers.", "lpNoNum.pipelink": "A loop has no numbers.", "lpNumGt2.onsen": "A loop has more than one number.", @@ -674,7 +674,7 @@ "nmRange.trainstations": "A number is out of range.", "nmSame2x2.kazunori": "There is a 2x2 block of the same number.", "nmSame2x2.snakepit": "A snake loops back on itself.", - "nmShade5Ne.lookair": "the number is not equal to the number of shaded cells in the cell and four adjacent cells.", + "nmShade5Ne.lookair": "The number is not equal to the number of shaded cells in the cell and the four adjacent cells.", "nmShadeDiagNe.context": "The number of shaded cells diagonally adjacent to a shaded number is not correct.", "nmShadeGt.interbd": "The number of shaded cells around a number is not correct.", "nmShadeGt.kaidan": "The number of circles around a number is not correct.", From ce554e8de6075dacdcb87b180be741b9a467570f Mon Sep 17 00:00:00 2001 From: Lennard Sprong Date: Sat, 29 Jul 2023 19:05:02 +0000 Subject: [PATCH 02/12] Translated using Weblate (English) Currently translated at 100.0% (774 of 774 strings) Translation: pzprjs/FailCode Translate-URL: https://hosted.weblate.org/projects/pzprjs/failcode/en/ --- src/res/failcode.en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/res/failcode.en.json b/src/res/failcode.en.json index 5c2cb0044..5dd46a68b 100644 --- a/src/res/failcode.en.json +++ b/src/res/failcode.en.json @@ -303,7 +303,7 @@ "bsNotEvol.evolmino": "The block doesn't have the same shape as the previous block with one additional square.", "bsSameNum.fillomino": "Adjacent areas have the same number.", "bsSameShape.chainedb": "A chain contains two identical blocks.", - "bsSameShape.lits": "Some Tetrominos that are the same shape are Adjacent.", + "bsSameShape.lits": "Some tetrominoes that have the same shape are adjacent.", "bsSameShape": "Two blocks that have the same shape are adjacent.", "bsSizeEq.fillmat": "Tatamis of the same size are adjacent.", "bsSnake.hebi": "Different snakes are adjacent.", From 211d9dcf98cff6db4dd1c8c18fc910e17c970265 Mon Sep 17 00:00:00 2001 From: Lennard Sprong Date: Mon, 31 Jul 2023 16:49:48 +0200 Subject: [PATCH 03/12] Add Sashikazune --- src-ui/changes.html | 2 +- src-ui/img/sashikazune.png | Bin 0 -> 111 bytes src-ui/js/ui/KeyPopup.js | 3 +- src-ui/js/ui/Misc.js | 1 + src-ui/list.html | 1 + src/pzpr/variety.js | 1 + src/res/failcode.en.json | 2 + src/variety/loute.js | 163 +++++++++++++++++++++++++++++-------- test/script/sashikazune.js | 28 +++++++ 9 files changed, 163 insertions(+), 38 deletions(-) create mode 100644 src-ui/img/sashikazune.png create mode 100644 test/script/sashikazune.js diff --git a/src-ui/changes.html b/src-ui/changes.html index b086de226..6f0023083 100644 --- a/src-ui/changes.html +++ b/src-ui/changes.html @@ -33,6 +33,7 @@
Latest types (all types)
diff --git a/src-ui/img/sashikazune.png b/src-ui/img/sashikazune.png new file mode 100644 index 0000000000000000000000000000000000000000..3821150f6348625ba5047ffafb9a97e2f5f057bd GIT binary patch literal 111 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~wg8_H*W+vF zHKZ;GK3)40C?f9Z;us<^H90|n)4+%?kI_w~A+`Z1E||ffJD0c02gqdbboFyt=akR{ E0PJTOb^rhX literal 0 HcmV?d00001 diff --git a/src-ui/js/ui/KeyPopup.js b/src-ui/js/ui/KeyPopup.js index 2075fd594..d623ca4a4 100644 --- a/src-ui/js/ui/KeyPopup.js +++ b/src-ui/js/ui/KeyPopup.js @@ -179,7 +179,8 @@ ui.keypopup = { detour: [10, 0], maxi: [10, 0], tetrochain: [10, 0], - brownies: [127, 0] + brownies: [127, 0], + sashikazune: [10, 0] }, //--------------------------------------------------------------------------- diff --git a/src-ui/js/ui/Misc.js b/src-ui/js/ui/Misc.js index 19e4e0c22..1efe9ed4a 100755 --- a/src-ui/js/ui/Misc.js +++ b/src-ui/js/ui/Misc.js @@ -163,6 +163,7 @@ function toBGimage(pid) { "rassi", "remlen", "roundtrip", + "sashikazune", "satogaeri", "scrin", "simplegako", diff --git a/src-ui/list.html b/src-ui/list.html index a44d83b2e..3034e7a3e 100644 --- a/src-ui/list.html +++ b/src-ui/list.html @@ -231,6 +231,7 @@

パズルの種類のリスト
  • +
  • diff --git a/src/pzpr/variety.js b/src/pzpr/variety.js index 9c6cd664a..9c8366340 100755 --- a/src/pzpr/variety.js +++ b/src/pzpr/variety.js @@ -315,6 +315,7 @@ roma: [0, 0, "ろーま", "Roma", "", { alias: "rome" }], roundtrip: [0, 0, "Round Trip", "Round Trip"], sashigane: [0, 0, "さしがね", "Sashigane", "loute"], + sashikazune: [0, 0, "さしカズね", "Sashikazune", "loute"], satogaeri: [ 0, 1, diff --git a/src/res/failcode.en.json b/src/res/failcode.en.json index 5dd46a68b..1220966d2 100644 --- a/src/res/failcode.en.json +++ b/src/res/failcode.en.json @@ -188,6 +188,7 @@ "bkNumGe2": "A block has multiple numbers.", "bkNumGe3.news": "An area has more than two letters.", "bkNumGt2.magnets": "A room has more than two poles.", + "bkNumGt2.sashikazune": "A block has more than two numbers.", "bkNumGt3.hakoiri": "A box has more than three shapes.", "bkNumLt2.magnets": "A room has half a magnet.", "bkNumLt2.news": "An area has less than two letters.", @@ -611,6 +612,7 @@ "nmDiag.snakepit": "A snake touches itself diagonally.", "nmDiffDistNe.hanare": "The distance of the paired numbers is not equal to their difference.", "nmDiffDistNe.putteria": "The distance of the paired numbers is not equal to their difference.", + "nmDistNe.sashikazune": "A number is not equal to the distance to the region's corner.", "nmDivEq2.kropki": "The number is double the other between two adjacent cells without shaded circle.", "nmDivide.hakoiri": "The shapes are divided.", "nmDivide.tontonbeya": "Identical symbols are divided in a room.", diff --git a/src/variety/loute.js b/src/variety/loute.js index b97966039..62bfaaa3c 100644 --- a/src/variety/loute.js +++ b/src/variety/loute.js @@ -7,7 +7,7 @@ } else { pzpr.classmgr.makeCustom(pidlist, classbase); } -})(["loute", "sashigane"], { +})(["loute", "sashigane", "sashikazune"], { //--------------------------------------------------------- // マウス入力系 "MouseEvent@loute": { @@ -27,7 +27,7 @@ } } }, - MouseEvent: { + "MouseEvent@loute,sashigane#1": { mouseinput: function() { // オーバーライド if (this.inputMode === "undef" || this.inputMode === "circle-unshade") { @@ -134,11 +134,21 @@ cell.draw(); } }, + "MouseEvent@sashikazune": { + inputModes: { + edit: ["number", "clear"], + play: ["border", "subline"] + }, + autoedit_func: "qnum", + autoplay_func: "border" + }, //--------------------------------------------------------- // キーボード入力系 KeyEvent: { - enablemake: true, + enablemake: true + }, + "KeyEvent@loute,sashigane": { moveTarget: function(ca) { if (ca.match(/shift/)) { return false; @@ -250,6 +260,12 @@ return this.qdir === 5; } }, + "Cell@sashikazune": { + minnum: 1, + maxnum: function() { + return Math.max(this.board.cols, this.board.rows); + } + }, Board: { cols: 8, @@ -257,7 +273,7 @@ hasborder: 1 }, - BoardExec: { + "BoardExec@loute,sashigane": { adjustBoardData: function(key, d) { this.adjustNumberArrow(key, d); } @@ -275,9 +291,7 @@ component.shape = 0; var clist = component.clist, - d = clist.getRectSize(), - bd = this.board; - + d = clist.getRectSize(); /* 四角形のうち別エリアとなっている部分を調べる */ /* 幅が1なので座標自体は調べなくてよいはず */ var subclist = this.board @@ -298,33 +312,64 @@ } } else { component.shape = 1; /* 幅が1のL字型 */ - for (var i = 0; i < clist.length; i++) { - clist[i].place = 1; - } /* L字型ブロックのセル */ - - /* 端のセル */ - var isUL = d.x1 === dl.x1 && d.y1 === dl.y1, - isUR = d.x2 === dl.x2 && d.y1 === dl.y1, - isDL = d.x1 === dl.x1 && d.y2 === dl.y2, - isDR = d.x2 === dl.x2 && d.y2 === dl.y2; - if (isUL || isDR) { - bd.getc(d.x1, d.y2).place = 2; - bd.getc(d.x2, d.y1).place = 2; - } else if (isDL || isUR) { - bd.getc(d.x1, d.y1).place = 2; - bd.getc(d.x2, d.y2).place = 2; - } + this.setCellPlaces(clist, d, dl); + } + }, - /* 角のセル */ - if (isUL) { - bd.getc(d.x2, d.y2).place = 3; - } else if (isDL) { - bd.getc(d.x2, d.y1).place = 3; - } else if (isUR) { - bd.getc(d.x1, d.y2).place = 3; - } else if (isDR) { - bd.getc(d.x1, d.y1).place = 3; - } + setCellPlaces: function(clist, d, dl) { + var bd = this.board; + for (var i = 0; i < clist.length; i++) { + clist[i].place = 1; + } /* L字型ブロックのセル */ + + /* 端のセル */ + var isUL = d.x1 === dl.x1 && d.y1 === dl.y1, + isUR = d.x2 === dl.x2 && d.y1 === dl.y1, + isDL = d.x1 === dl.x1 && d.y2 === dl.y2, + isDR = d.x2 === dl.x2 && d.y2 === dl.y2; + if (isUL || isDR) { + bd.getc(d.x1, d.y2).place = 2; + bd.getc(d.x2, d.y1).place = 2; + } else if (isDL || isUR) { + bd.getc(d.x1, d.y1).place = 2; + bd.getc(d.x2, d.y2).place = 2; + } + + /* 角のセル */ + if (isUL) { + bd.getc(d.x2, d.y2).place = 3; + } else if (isDL) { + bd.getc(d.x2, d.y1).place = 3; + } else if (isUR) { + bd.getc(d.x1, d.y2).place = 3; + } else if (isDR) { + bd.getc(d.x1, d.y1).place = 3; + } + } + }, + + "AreaRoomGraph@sashikazune": { + setCellPlaces: function(clist, d, dl) { + var bd = this.board; + var corner = null; + + if (d.x1 === dl.x1 && d.y1 === dl.y1) { + corner = bd.getc(d.x2, d.y2); + } else if (d.x1 === dl.x1 && d.y2 === dl.y2) { + corner = bd.getc(d.x2, d.y1); + } else if (d.x2 === dl.x2 && d.y1 === dl.y1) { + corner = bd.getc(d.x1, d.y2); + } else if (d.x2 === dl.x2 && d.y2 === dl.y2) { + corner = bd.getc(d.x1, d.y1); + } else { + return; + } + + for (var i = 0; i < clist.length; i++) { + var c2 = clist[i]; + c2.place = + 1 + + ((Math.abs(c2.bx - corner.bx) + Math.abs(c2.by - corner.by)) >> 1); } } }, @@ -350,6 +395,8 @@ this.drawCircledNumbers(); } else if (this.pid === "loute") { this.drawCircles(); + } else { + this.drawQuesNumbers(); } this.drawBorderQsubs(); @@ -382,9 +429,6 @@ } } }, - "Grahpic@sashigane": { - hideHatena: true - }, //--------------------------------------------------------- // URLエンコード/デコード処理 @@ -529,6 +573,14 @@ this.outbstr += cm; } }, + "Encode@sashikazune": { + decodePzpr: function(type) { + this.decodeNumber16(); + }, + encodePzpr: function(type) { + this.encodeNumber16(); + } + }, //--------------------------------------------------------- FileIO: { decodeData: function() { @@ -564,6 +616,16 @@ this.encodeBorderAns(); } }, + "FileIO@sashikazune": { + decodeData: function() { + this.decodeCellQnum(); + this.decodeBorderAns(); + }, + encodeData: function() { + this.encodeCellQnum(); + this.encodeBorderAns(); + } + }, //--------------------------------------------------------- // 正解判定処理実行部 @@ -675,5 +737,34 @@ rooms[id].clist.seterr(1); } } + }, + "AnsCheck@sashikazune": { + checklist: [ + "checkNumberDistance", + "checkNumber3Count", + "checkBorderDeadend", + "checkLblock" + ], + + checkNumberDistance: function() { + this.checkAllCell(function(cell) { + return ( + cell.isValidNum() && cell.place !== 0 && cell.place !== cell.getNum() + ); + }, "nmDistNe"); + }, + + checkNumber3Count: function() { + this.checkAllBlock( + this.board.roommgr, + function(cell) { + return cell.isNum() && cell.place !== 0; + }, + function(w, h, a, n) { + return a <= 2; + }, + "bkNumGt2" + ); + } } }); diff --git a/test/script/sashikazune.js b/test/script/sashikazune.js new file mode 100644 index 000000000..dc2f62b77 --- /dev/null +++ b/test/script/sashikazune.js @@ -0,0 +1,28 @@ +/* sashikazune.js */ + +ui.debug.addDebugData("sashikazune", { + url: "6/6/3k4h345r1g3h2l", + failcheck: [ + [ + "bkNotLshape", + "pzprv3/sashikazune/6/6/3 . . . . . /4 . . 3 4 5 /. . . . . . /. . . . . . /1 . 3 . . 2 /. . . . . . /0 0 1 0 1 /1 1 1 0 1 /1 0 1 0 1 /0 1 0 0 1 /0 1 0 0 1 /0 0 0 0 0 /1 1 0 0 0 0 /0 0 1 0 0 0 /0 1 1 0 0 0 /0 0 0 0 0 0 /1 1 1 1 1 0 /" + ], + [ + "nmDistNe", + "pzprv3/sashikazune/6/6/3 . . . . . /4 . . 3 4 5 /. . . . . . /. . . . . . /1 . 3 . . 2 /. . . . . . /1 0 0 0 0 /1 0 0 0 0 /0 0 1 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 0 /0 1 1 0 0 0 /1 1 1 0 0 0 /0 0 0 0 0 0 /0 0 0 0 0 0 /" + ], + [ + "bkNumGt2", + "pzprv3/sashikazune/6/6/3 . . . . . /4 . . 3 4 5 /. . . . . . /. . . . . . /1 . 3 . . 2 /. . . . . . /0 0 0 0 0 /1 0 0 0 0 /1 0 0 0 0 /1 0 0 0 0 /0 0 1 0 0 /0 0 0 0 0 /1 0 0 0 0 0 /0 0 0 0 0 0 /0 0 0 0 0 0 /0 1 1 0 0 0 /1 1 1 0 0 0 /" + ], + [ + "bdDeadEnd", + "pzprv3/sashikazune/6/6/3 . . . . . /4 . . 3 4 5 /. . . . . . /. . . . . . /1 . 3 . . 2 /. . . . . . /0 0 0 0 1 /0 0 0 0 1 /0 0 0 0 1 /0 0 0 0 1 /0 0 0 0 1 /0 0 0 0 0 /1 0 0 0 0 0 /0 0 0 0 0 0 /0 0 0 0 0 0 /0 0 0 0 0 0 /1 1 1 1 1 0 /" + ], + [ + null, + "pzprv3/sashikazune/6/6/3 . . . . . /4 . . 3 4 5 /. . . . . . /. . . . . . /1 . 3 . . 2 /. . . . . . /0 0 1 1 1 /1 1 1 1 1 /1 0 1 1 1 /1 0 0 1 1 /0 1 0 0 1 /0 0 0 0 0 /1 1 0 0 0 0 /0 0 1 0 0 0 /0 1 1 0 0 0 /0 1 1 1 0 0 /1 1 1 1 1 0 /" + ] + ], + inputs: [] +}); From bc27ad8c33244fedc595c0d3f3dac44861abe26a Mon Sep 17 00:00:00 2001 From: Nishinanntoka Date: Wed, 2 Aug 2023 09:24:51 +0000 Subject: [PATCH 04/12] Translated using Weblate (Japanese) Currently translated at 98.2% (231 of 235 strings) Translation: pzprjs/Genre Rules Translate-URL: https://hosted.weblate.org/projects/pzprjs/rules/ja/ --- src-ui/res/rules.ja.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src-ui/res/rules.ja.yaml b/src-ui/res/rules.ja.yaml index 08d05a509..f99883af7 100644 --- a/src-ui/res/rules.ja.yaml +++ b/src-ui/res/rules.ja.yaml @@ -508,3 +508,7 @@ brownies: "1. 盤面にある○をタテヨコいずれかに移動して、盤 2. ○の移動は矢印で表しますが、矢印は途中で折れ曲がったりせず、また他の矢印や○や黒マスとぶつかることはありません。" mrtile: "1. 盤面のいくつかのマスを黒くぬりましょう。\n2. タテヨコでひとつながりになった黒マスのカタマリを「タイル」と呼びます。盤面にあるタイルはどれも、そのタイルと同じ大きさで同じ形のものと点で接するようにします。回転や裏返しをして同じになるものは「同じ形」とします。\n 3. 数字は、その数字を含むタイルのマス数を表します。最初からある黒マスを白マスにしたり動かしたりしてはいけません。" +magnets: "1.1×2マスのブロックのいくつかに、磁石を配置します。磁石の入らないブロックは、黒マスになります。\n2.磁石の両側にはそれぞれ、+(N極)と-(S極)がひとつずつあります。同じ極どうしは、タテヨコに接しません。\n\ + 3.盤面の外の数は、その列に入る+と-の数を表します。" +tetrominous: "点線に沿って線を引き、盤面をテトロミノ(4マスのブロック)に分割します。同じ形のペントミノをいくつ配置してもかまいません(使わなくてもよい)。\n\ + 1.同じ形のブロックが隣り合ってはいけません。回転や反転で一致するものは同じ形とみなします。\n2.文字は、そのマスが入るブロックの形を表します。2つ以上の文字が入ったブロックや、文字が1つも入らないブロックができてもかまいません。" From ca58120ad753b9c2d62cbc3e9fa2436eeedc2aef Mon Sep 17 00:00:00 2001 From: Nishinanntoka Date: Wed, 2 Aug 2023 09:44:39 +0000 Subject: [PATCH 05/12] Translated using Weblate (Japanese) Currently translated at 99.6% (284 of 285 strings) Translation: pzprjs/Player Translate-URL: https://hosted.weblate.org/projects/pzprjs/player/ja/ --- src-ui/res/p.ja.json | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src-ui/res/p.ja.json b/src-ui/res/p.ja.json index 088aa0674..5dd874100 100644 --- a/src-ui/res/p.ja.json +++ b/src-ui/res/p.ja.json @@ -143,7 +143,7 @@ "inputmode.info-line": "線の繋がりチェック", "inputmode.info-blk": "黒マス繋がりチェック", "inputmode.info-ublk": "白マス繋がりチェック", - "inputmode.info-room": "Check room connection", + "inputmode.info-room": "へやの繋がりチェック", "inputmode.info-road": "経路チェック", "disptype": "表示形式", "context_marks": "矢印を表示する", @@ -185,15 +185,15 @@ "voxas_tatami": "タタミルール(境界の十字交差禁止)", "tren_new": "白マスひとつながりルールを追加", "nuriuzu_connect": "黒マスひとつながりルールを追加", - "bdwalk_height": "Maximum height is unknown", + "bdwalk_height": "盤面にある数字より大きい階数があってもよい", "pentopia_transparent": "Transparent (矢印のマスが黒マスになる場合もあります。)", "koburin_minesweeper": "マインスイーパモード (数字は斜めのマスを含みます)", "akichi_maximum": "最大値が数字より小さくても可", - "magnets_anti": "Anti-Magnets (adjacent poles of different magnets must be equal)", - "heyapin_overlap": "Pins must overlap 2 or more regions", + "magnets_anti": "Anti-Magnets (磁石が必ず同じ極で隣り合う)", + "heyapin_overlap": "ピンは必ず複数の部屋にまたがる", "variant": "変種ルール", "time": "経過時間:", - "timer.menu": "Show timer", + "timer.menu": "タイマーを表示", "check": "チェック", "check.variant": "本家ルールでチェック", "undo": "戻", @@ -278,5 +278,9 @@ "about.author": "は はっぱ/連続発破", "network.title": "ネットワークプレイ", "network.start": "始める", - "network.share": "共有用URL:" + "network.share": "共有用URL:", + "inputmode.copysymbol": "コピー", + "preset.fleet3": "サイズ3", + "preset.fleet4": "サイズ4", + "preset.fleet5": "サイズ5" } From 64bf1b8d55bb3d44809aa994317332c630ae4a5e Mon Sep 17 00:00:00 2001 From: Nishinanntoka Date: Wed, 2 Aug 2023 10:04:19 +0000 Subject: [PATCH 06/12] Translated using Weblate (Japanese) Currently translated at 99.6% (773 of 776 strings) Translation: pzprjs/FailCode Translate-URL: https://hosted.weblate.org/projects/pzprjs/failcode/ja/ --- src/res/failcode.ja.json | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/res/failcode.ja.json b/src/res/failcode.ja.json index 400e21a3d..4f5bc6850 100644 --- a/src/res/failcode.ja.json +++ b/src/res/failcode.ja.json @@ -54,7 +54,7 @@ "bdwInvalidUp.bdwalk": "▼のエレベーターで昇っています。", "bdwMismatch.bdwalk": "エレベーターのマスを通らずに階を移動しています。", "bdwSkipElevator.bdwalk": "エレベーターで階を移動していません。", - "bdwTopFloor.bdwalk": "The line goes above the top floor.", + "bdwTopFloor.bdwalk": "線が最上階よりも上を通っています。", "bkArafEqual.araf": "面積が数字と一致しています。", "bkArafTooBig.araf": "面積が大きすぎるブロックがあります。", "bkArafTooSmall.araf": "面積が小さすぎるブロックがあります。", @@ -748,5 +748,29 @@ "nmConnected.oyakodori": "鳥どうしがつながっています。", "nmAdjacentGt2.tontonbeya": "同じ記号のカタマリであって、2つ以上のカタマリとつながっているものがあります。", "nmDivide.tontonbeya": "同じ記号が部屋の中でタテヨコにひとつながりになっていません。", - "nmNumberEq.oyakodori": "同じ種類の鳥が同じ巣に入っています。" + "nmNumberEq.oyakodori": "同じ種類の鳥が同じ巣に入っています。", + "bkShadeDivide.invlitso": "白マスが領域内でタテヨコに連なっていません。", + "bkShadeGt4.invlitso": "領域に白マスが4つ以下しかありません。", + "bkShadeLt4.invlitso": "領域に白マスが5つ以上あります。", + "nmVertexNe.vslither": "ループが通る頂点の数が正しくありません。", + "csLt4": "", + "csGt4": "黒マスの数が4より多いです。", + "exPlusNe.magnets": "列に入る「+」の数が正しくありません。", + "exMinusNe.magnets": "列に入る「-」の数が正しくありません。", + "nmAdjacent.magnets": "同じ極が隣り合っています。", + "nmCircleNe.brownies": "数字が、タテヨコナナメに接する○の数と一致していません。", + "bankGt.battleship": "艦の数が多すぎます。", + "bankLt.battleship": "配置されていない艦があります。", + "bkCircleNe.fracdiv": "数字が、ブロック内の(黒丸の数)÷(マスの数)と一致していません。", + "bkNumLt2.magnets": "磁石が一方の極しかありません。", + "nmAdjDiff.magnets": "磁石が同じ極で隣り合っていません。", + "nmTouchNe.tslither": "マスの周りの頂点や辺にループが訪れる回数が正しくありません。", + "shDiag.battleship": "異なる艦がナナメに接しています。", + "bkMissingNum": "ブロックにすべての数字が入っていません。", + "bkNumGt2.sashikazune": "1つのブロックに数字が3個以上入っています。", + "exShadeNe.battleship": "列に入る艦の数が正しくありません。", + "bkPinNe.heyapin": "部屋にあるピンの数が正しくありません。", + "bkNumGt2.magnets": "領域の中に同じ極が2つ以上入っています。", + "nmDistNe.sashikazune": "数字が、角からのマス数と一致していません。", + "cxOverlap.heyapin": "ピンが複数の部屋にまたがっていません。" } From cc05c3ed6eaa68f8865cc67fedd11b890d2dd027 Mon Sep 17 00:00:00 2001 From: Lennard Sprong Date: Thu, 3 Aug 2023 11:31:39 +0000 Subject: [PATCH 07/12] Translated using Weblate (Japanese) Currently translated at 99.7% (774 of 776 strings) Translation: pzprjs/FailCode Translate-URL: https://hosted.weblate.org/projects/pzprjs/failcode/ja/ --- src/res/failcode.ja.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/res/failcode.ja.json b/src/res/failcode.ja.json index 4f5bc6850..1adcc2025 100644 --- a/src/res/failcode.ja.json +++ b/src/res/failcode.ja.json @@ -753,7 +753,7 @@ "bkShadeGt4.invlitso": "領域に白マスが4つ以下しかありません。", "bkShadeLt4.invlitso": "領域に白マスが5つ以上あります。", "nmVertexNe.vslither": "ループが通る頂点の数が正しくありません。", - "csLt4": "", + "csLt4": "黒マスの数が4より少ないです。", "csGt4": "黒マスの数が4より多いです。", "exPlusNe.magnets": "列に入る「+」の数が正しくありません。", "exMinusNe.magnets": "列に入る「-」の数が正しくありません。", From 3b56b38702e90dc2b94a7f44829221a7e4167738 Mon Sep 17 00:00:00 2001 From: Lennard Sprong Date: Fri, 4 Aug 2023 15:37:26 +0200 Subject: [PATCH 08/12] sashikazune: Add directional aux marks --- src/variety/loute.js | 63 +++++++++++++++++++++++++++++++++++++- test/script/sashikazune.js | 16 +++++++++- 2 files changed, 77 insertions(+), 2 deletions(-) diff --git a/src/variety/loute.js b/src/variety/loute.js index 62bfaaa3c..a67e699bb 100644 --- a/src/variety/loute.js +++ b/src/variety/loute.js @@ -137,7 +137,16 @@ "MouseEvent@sashikazune": { inputModes: { edit: ["number", "clear"], - play: ["border", "subline"] + play: ["diraux", "border", "subline"] + }, + mouseinput_other: function() { + if (this.inputMode === "diraux") { + this.inputarrow_cell(); + } + }, + inputarrow_cell_main: function(cell, dir) { + var value = 1 << (dir + 1); + cell.setQsub(cell.qsub ^ value); }, autoedit_func: "qnum", autoplay_func: "border" @@ -397,6 +406,7 @@ this.drawCircles(); } else { this.drawQuesNumbers(); + this.drawArrowAuxMarks(); } this.drawBorderQsubs(); @@ -429,6 +439,55 @@ } } }, + "Graphic@sashikazune": { + fontsizeratio: 0.75, + drawArrowAuxMarks: function() { + var g = this.vinc("cell_ticks", "auto"); + g.lineWidth = (1 + this.cw / 40) | 0; + var size = this.cw * 0.15; + if (size < 3) { + size = 3; + } + + for (var c = 0; c < this.board.cell.length; c++) { + var cell = this.board.cell[c]; + var bx = cell.bx, + by = cell.by, + px = bx * this.bw, + py = by * this.bh; + var color = "rgb(127,127,255)"; + g.strokeStyle = color; + var tickMods = [ + [-1, 1], + [1, 1], + [-1, 0], + [1, 0] + ]; + for (var m = 0; m < tickMods.length; m++) { + g.vid = "ut_cell" + m + "_" + cell.id; + + if (cell.qsub & (1 << (m + 2))) { + var xmult = tickMods[m][0], + isvert = tickMods[m][1]; + var c1 = !isvert ? px : py, + c2 = !isvert ? py : px, + p1 = [c1 + xmult * this.bw - 1.0 * xmult * size, c2 + size], + p2 = [c1 + xmult * this.bw - 0.5 * xmult * size, c2], + p3 = [c1 + xmult * this.bw - 1.0 * xmult * size, c2 - size]; + g.beginPath(); + g.moveTo(p1[+!!isvert], p1[+!isvert]); + g.lineTo(p2[+!!isvert], p2[+!isvert]); + g.lineTo(p3[+!!isvert], p3[+!isvert]); + g.moveTo(p2[+!!isvert], p2[+!isvert]); + g.closePath(); + g.stroke(); + } else { + g.vhide(); + } + } + } + } + }, //--------------------------------------------------------- // URLエンコード/デコード処理 @@ -620,10 +679,12 @@ decodeData: function() { this.decodeCellQnum(); this.decodeBorderAns(); + this.decodeCellQsub(); }, encodeData: function() { this.encodeCellQnum(); this.encodeBorderAns(); + this.encodeCellQsub(); } }, diff --git a/test/script/sashikazune.js b/test/script/sashikazune.js index dc2f62b77..524d6c5b6 100644 --- a/test/script/sashikazune.js +++ b/test/script/sashikazune.js @@ -24,5 +24,19 @@ ui.debug.addDebugData("sashikazune", { "pzprv3/sashikazune/6/6/3 . . . . . /4 . . 3 4 5 /. . . . . . /. . . . . . /1 . 3 . . 2 /. . . . . . /0 0 1 1 1 /1 1 1 1 1 /1 0 1 1 1 /1 0 0 1 1 /0 1 0 0 1 /0 0 0 0 0 /1 1 0 0 0 0 /0 0 1 0 0 0 /0 1 1 0 0 0 /0 1 1 1 0 0 /1 1 1 1 1 0 /" ] ], - inputs: [] + inputs: [ + { + input: [ + "newboard,2,1", + "playmode,diraux", + "mouse,left,1,1,3,1", + "mouse,left,1,1,1,3" + ], + result: "pzprv3/sashikazune/1/2/. . /0 /40 0 /" + }, + { + input: ["mouse,left,1,1,3,1"], + result: "pzprv3/sashikazune/1/2/. . /0 /8 0 /" + } + ] }); From de19722be63728369906e6fb6ef20ca43d2b0909 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Sun, 6 Aug 2023 13:51:32 +0000 Subject: [PATCH 09/12] Translated using Weblate (English) Currently translated at 100.0% (238 of 238 strings) Translation: pzprjs/Genre Rules Translate-URL: https://hosted.weblate.org/projects/pzprjs/rules/en/ --- src-ui/res/rules.en.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src-ui/res/rules.en.yaml b/src-ui/res/rules.en.yaml index bf1b469f4..7cc990f19 100644 --- a/src-ui/res/rules.en.yaml +++ b/src-ui/res/rules.en.yaml @@ -1171,3 +1171,17 @@ nothing: "Draw lines through orthogonally adjacent cells to form a loop.\n1. The cannot branch off or cross itself.\n2. If a country is visted by the loop, it must visit all cells.\n3. Countries cannot be visited more than once.\n4. Two unused countries cannot be orthogonally adjacent." +waterwalk: "Draw a loop that goes through every numbered cell.\n1. The loop cannot + branch off or cross itself.\n2. Blue cells represent water, while regular cells + represent ground. The loop may not go through more than 2 water cells in a row.\n + 3. A number indicates how many cells make up the continuous grounded section of + the loop that the number is on." +pentatouch: "Place every shape from the bank into the grid. Shapes can be rotated + or mirrored.\n1. All shapes must be used exactly once. There cannot be shapes in + the grid that aren't present in the bank.\n2. Two shapes cannot be orthogonally + adjacent.\n3. A dot indicates a place where two shapes are diagonally adjacent. + All possible dots are given, meaning that two shapes cannot be diagonally adjacent + in places without a dot." +wittgen: "Place several rectangles of size 1x3 into the grid.\n1. A number indicates + the amount of rectangles in the 4 orthogonally adjacent cells.\n2. All cells not + used by rectangles form an orthogonally contiguous area." From 3811124751fec438a984467a7c426acbc2e4ffa7 Mon Sep 17 00:00:00 2001 From: Lennard Sprong Date: Mon, 7 Aug 2023 12:06:47 +0000 Subject: [PATCH 10/12] Translated using Weblate (English) Currently translated at 100.0% (238 of 238 strings) Translation: pzprjs/Genre Rules Translate-URL: https://hosted.weblate.org/projects/pzprjs/rules/en/ --- src-ui/res/rules.en.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src-ui/res/rules.en.yaml b/src-ui/res/rules.en.yaml index 7cc990f19..b6982b9b4 100644 --- a/src-ui/res/rules.en.yaml +++ b/src-ui/res/rules.en.yaml @@ -1183,5 +1183,6 @@ pentatouch: "Place every shape from the bank into the grid. Shapes can be rotate All possible dots are given, meaning that two shapes cannot be diagonally adjacent in places without a dot." wittgen: "Place several rectangles of size 1x3 into the grid.\n1. A number indicates - the amount of rectangles in the 4 orthogonally adjacent cells.\n2. All cells not - used by rectangles form an orthogonally contiguous area." + the amount of rectangles in the 4 orthogonally adjacent cells.\n2. Rectangles cannot + overlap numbers.\n3. All cells not used by rectangles form an orthogonally contiguous + area." From aebcb7b3cf684be021207cea93e4d764d3557c58 Mon Sep 17 00:00:00 2001 From: Mitchell Clarke <88639441+MClarke93@users.noreply.github.com> Date: Mon, 7 Aug 2023 23:21:26 +1000 Subject: [PATCH 11/12] Add Myopia (#469) --- src-ui/list.html | 1 + src-ui/p.html | 1 + src-ui/res/rules.en.yaml | 4 + src/puzzle/Config.js | 2 +- src/pzpr/variety.js | 1 + src/res/failcode.en.json | 3 + src/variety/myopia.js | 481 ++++++++++++++++++++++++++++++++++++ src/variety/statuepark.js | 6 +- test/script/myopia.js | 59 +++++ test/variety/myopia_test.js | 50 ++++ 10 files changed, 606 insertions(+), 2 deletions(-) create mode 100644 src/variety/myopia.js create mode 100644 test/script/myopia.js create mode 100644 test/variety/myopia_test.js diff --git a/src-ui/list.html b/src-ui/list.html index 3034e7a3e..0716d98c7 100644 --- a/src-ui/list.html +++ b/src-ui/list.html @@ -132,6 +132,7 @@

    パズルの種類のリスト
  • +
  • diff --git a/src-ui/p.html b/src-ui/p.html index 4191ce237..cca58fb68 100644 --- a/src-ui/p.html +++ b/src-ui/p.html @@ -453,6 +453,7 @@

    読み込み中です...

    +