Skip to content

Commit 22a3387

Browse files
committed
Add Rule of Three
1 parent 9c4739e commit 22a3387

10 files changed

Lines changed: 218 additions & 44 deletions

File tree

src-ui/list.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ <h2 id="title"><span lang="ja">パズルの種類のリスト</span><span lang="
393393
<li data-pid="lither"></li>
394394
<li data-pid="recoil"></li>
395395
<li data-pid="tjunction"></li>
396+
<li data-pid="ruleofthree"></li>
396397
</ul>
397398
</div>
398399
<div class="lists others">

src-ui/p.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ <h2 id="title2">読み込み中です...</h2>
182182
<div class="child" data-value="peke">__inputmode.peke__</div>
183183
<div class="child" data-value="diraux">__inputmode.diraux__</div>
184184
<div class="child" data-value="bar">__inputmode.bar__</div>
185+
<div class="child" data-value="crossbar">__inputmode.bar__</div>
185186
<div class="child" data-value="akari">__inputmode.akari__</div>
186187
<div class="child" data-value="star">__inputmode.star__</div>
187188
<div class="child" data-value="dot">__inputmode.dot__</div>

src/puzzle/MouseInput.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,9 @@ pzpr.classmgr.makeCommon({
370370
case "bar":
371371
this.inputTateyoko();
372372
break;
373+
case "crossbar":
374+
this.inputTateyoko(true);
375+
break;
373376
case "empty":
374377
this.inputempty();
375378
break;

src/pzpr/variety.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@
391391
],
392392
roma: [0, 0, "ろーま", "Roma", "", { alias: "rome" }],
393393
roundtrip: [0, 0, "Round Trip", "Round Trip"],
394+
ruleofthree: [0, 0, "Rule of Three", "Rule of Three", "amibo"],
394395
sananko: [0, 0, "サンアンコー", "San-Anko", "kakuru"],
395396
sansaroad: [0, 0, "サンサロード", "Sansa Road", "kurarin"],
396397
sashikabe: [0, 0, "Sashikabe", "Sashikabe", "loute"],

src/res/failcode.en.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@
512512
"cuRect": "A mass of unshaded cells is a rectangle.",
513513
"cuRoomGt.akichi": "A cluster of unshaded cells is larger than the number.",
514514
"cuRoomLt.akichi": "All clusters of unshaded cells are smaller than the number.",
515-
"cxAdjacent.crossstitch": "Crossings are adjacent.",
515+
"cxAdjacent": "Crossings are adjacent.",
516516
"cxNoLine": "A point is not visited.",
517517
"cxOverlap.diamond": "Two diamonds overlap.",
518518
"cxOverlap.heyapin": "A pin overlaps a single region.",
@@ -647,7 +647,9 @@
647647
"lnLenGt.anglers": "A line is longer than the number.",
648648
"lnLenGt.reflect": "The lines passing a triangle are too long.",
649649
"lnLengthGt.pencils": "A line is longer than the connected pencil.",
650+
"lnLengthGt3": "A line is longer than 3 cells.",
650651
"lnLengthLt.pencils": "A line is shorter than the connected pencil.",
652+
"lnLengthLt3": "A line is shorter than 3 cells.",
651653
"lnLengthNe3.wittgen": "A block does not cover exactly 3 cells.",
652654
"lnLenLt.anglers": "A line is shorter than the number.",
653655
"lnLenLt.reflect": "The lines passing a triangle are too short.",

src/res/failcode.ja.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@
344344
"cuNotTop.dosufuwa": "風船の上に風船や黒マスがありません。",
345345
"cuOutside.castle": "白マスがループの外にあります。",
346346
"cuRect": "白マスのカタマリが正方形または長方形になっています。",
347-
"cxAdjacent.crossstitch": "線が交差するマスが隣り合っています。",
347+
"cxAdjacent": "線が交差するマスが隣り合っています。",
348348
"exNoMatch.nonogram": "黒マスの数が正しくありません。",
349349
"exShadeNe.aquarium": "行または列内にある水のマスの数と外の数字が異なります。",
350350
"exShadeNe.snake": "行または列内にあるスネークのマスの数と外の数字が異なります。",

src/variety-common/MouseInput.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,12 @@ pzpr.classmgr.makeCommon({
339339
},
340340
inputFixedQsub: function(val) {
341341
var cell = this.getcell();
342-
if (cell.isnull || cell.is51cell() || cell === this.mouseCell) {
342+
if (
343+
cell.isnull ||
344+
cell.is51cell() ||
345+
!cell.isValid() ||
346+
cell === this.mouseCell
347+
) {
343348
return;
344349
}
345350

@@ -915,7 +920,7 @@ pzpr.classmgr.makeCommon({
915920
//---------------------------------------------------------------------------
916921
// mv.inputTateyoko() 縦棒・横棒をドラッグで入力する
917922
//---------------------------------------------------------------------------
918-
inputTateyoko: function() {
923+
inputTateyoko: function(plus) {
919924
if (this.mouseend && this.notInputted() && !!this.clickTateyoko) {
920925
this.clickTateyoko();
921926
return;
@@ -927,7 +932,7 @@ pzpr.classmgr.makeCommon({
927932
}
928933

929934
// 黒マス上なら何もしない
930-
if (this.pid !== "amibo" && cell.ques === 1) {
935+
if (this.pid !== "amibo" && (!cell.isValid() || cell.ques === 1)) {
931936
} else if (this.pid === "amibo" && cell.isNum()) {
932937
}
933938
// 初回 or 入力し続けていて別のマスに移動した場合
@@ -946,8 +951,6 @@ pzpr.classmgr.makeCommon({
946951
}
947952

948953
if (val !== null) {
949-
var plus = this.pid === "amibo" || this.pid === "tatamibari";
950-
951954
var shape = 0;
952955
if (this.puzzle.playmode) {
953956
shape = { 0: 0, 11: 3, 12: 1, 13: 2 }[cell.qans];

0 commit comments

Comments
 (0)