Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Turnaround, Contact and Rampage #543

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
### 2024-06-04

* turnaround: New puzzle type Turnaround
* contact: New puzzle type Contact
* rampage: New puzzle type Rampage

### ????-??-??

* aqre: New puzzle type Aqre
* interbd: New puzzle type International Borders (due to Lennard Sprong)
* tapaloop: New puzzle type Tapa-Like Loop (due to Giuliano Montelucci)
Expand Down
5,436 changes: 2,643 additions & 2,793 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src-ui/changes.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
<main>
<div style="margin-bottom: 5px;"><b>Latest types</b> (<em><a href="/list.html" target="_parent">all types</a></em>)</div>
<ul>
<li><a href="/p?rampage" target="_parent">Rampage</a></li>
<li><a href="/p?contact" target="_parent">Contact</a></li>
<li><a href="/p?turnaround" target="_parent">Turnaround</a></li>
<li><a href="/p?sananko" target="_parent">San-Anko サンアンコー</a></li>
<li><a href="/p?bosnianroad" target="_parent">Bosnian Road</a></li>
<li><a href="/p?kuromenbun" target="_parent">Kuromenbun クロメンブン</a></li>
Expand Down
Binary file added src-ui/img/contact.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src-ui/img/rampage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src-ui/img/turnaround.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 28 additions & 1 deletion src-ui/js/ui/KeyPopup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// KeyPopup.js v3.4.0
// Key.js v3.4.0
/* global createEL:readonly, getEL:readonly */

//---------------------------------------------------------------------------
Expand Down Expand Up @@ -200,6 +200,9 @@ ui.keypopup = {
teri: [10, 0],
portal: [10, 0],
kuromenbun: [10, 0],
turnaround: [3, 0],
contact: [6, 0],
rampage: [131, 0],
bosnianroad: [8, 0],
sananko: [10, 113]
},
Expand Down Expand Up @@ -343,6 +346,8 @@ ui.keypopup = {
this.generate_retroships(mode);
} else if (type === 130) {
this.generate_lix(mode);
} else if (type === 131) {
this.generate_infinity(mode);
}
},
gentable4: function(mode) {
Expand Down Expand Up @@ -986,6 +991,28 @@ ui.keypopup = {
3
);
},
generate_infinity: function() {
this.generate_main(
[
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"0",
["i", "∞"],
null,
null,
" ",
["-", "?"]
],
5
);
},

generate_main: function(list, split) {
for (var i = 0; i < list.length; i++) {
Expand Down
3 changes: 3 additions & 0 deletions src-ui/js/ui/Misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ function toBGimage(pid) {
"cocktail",
"coffeemilk",
"compass",
"contact",
"coral",
"cts",
"curvedata",
Expand Down Expand Up @@ -176,6 +177,7 @@ function toBGimage(pid) {
"portal",
"ququ",
"rassi",
"rampage",
"remlen",
"retroships",
"roundtrip",
Expand Down Expand Up @@ -204,6 +206,7 @@ function toBGimage(pid) {
"tontonbeya",
"trainstations",
"tslither",
"turnaround",
"voxas",
"vslither",
"walllogic",
Expand Down
3 changes: 3 additions & 0 deletions src-ui/js/ui/ToolArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,9 @@ ui.toolarea = {
flushexcell: function() {
ui.puzzle.board.flushexcell();
},
traceroute: function() {
ui.puzzle.board.operate("traceroute");
},
applypreset: function(e) {
ui.auxeditor.close();

Expand Down
3 changes: 3 additions & 0 deletions src-ui/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ <h2 id="title"><span lang="ja">パズルの種類のリスト</span><span lang="
<li data-pid="lixloop"></li>
<li data-pid="portal"></li>
<li data-pid="bosnianroad"></li>
<li data-pid="turnaround"></li>
</ul>
</div>
<div class="lists loops">
Expand Down Expand Up @@ -258,6 +259,8 @@ <h2 id="title"><span lang="ja">パズルの種類のリスト</span><span lang="
<li data-pid="sashikazune"></li>
<li data-pid="tachibk"></li>
<li data-pid="subomino"></li>
<li data-pid="contact"></li>
<li data-pid="rampage"></li>
</ul>
</div>
<div class="lists divides">
Expand Down
7 changes: 7 additions & 0 deletions src-ui/p.html
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,12 @@ <h2 id="title2">読み込み中です...</h2>
<span>__patchwork_leftaux__</span>
</label>
</div>
<div class="config" data-config="rampage_coloring">
<label>
<input type="checkbox">
<span>__rampage_coloring__</span>
</label>
</div>
<div class="config" data-config="keypopup">
<label>
<input type="checkbox">
Expand Down Expand Up @@ -461,6 +467,7 @@ <h2 id="title2">読み込み中です...</h2>
<button type="button" class="btn" data-disp-pid="stostone" data-press-exec="dropblocks,resetblocks">__dropblocks__</button>
<button type="button" class="btn" data-disp-pid="slither" data-button-exec="outlineshaded">__outlineshaded__</button>
<button type="button" class="btn" data-disp-pid="myopia" data-button-exec="outlineshaded">__outlineshaded__</button>
<button type="button" class="btn" data-disp-pid="rampage" data-button-exec="traceroute">__traceroute__</button>
<button type="button" class="btn" id="btntrial" data-button-exec="enterTrial">__enterTrial__</button>
<div id="btntrialarea" style="display:none;">
<button type="button" class="btn btn-ok" id="btntriala" data-button-exec="acceptTrial">__acceptTrial__</button
Expand Down
3 changes: 3 additions & 0 deletions src-ui/res/history.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -222,3 +222,6 @@ lineofsight: This genre was invented by Inaba Naoki.
kuromenbun: This genre first appeared in Puzzle Communication Nikoli vol. 138.
teri: This genre was invented by Inaba Naoki.
sananko: This genre was invented by Subaru Saito.
turnaround: This genre was invented by Ivan Adrian Koswara a.k.a. chaotic_iak.
contact: This genre was invented by Ivan Adrian Koswara a.k.a. chaotic_iak.
rampage: This genre was invented by Ivan Adrian Koswara a.k.a. chaotic_iak.
3 changes: 3 additions & 0 deletions src-ui/res/history.ja.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,6 @@ lineofsight: 稲葉直貴氏発案
kuromenbun: パズル通信ニコリ vol.138より
teri: 稲葉直貴氏発案
sananko: 齋藤スバル氏発案
turnaround: Ivan Adrian Koswara (chaotic_iak)氏発案
contact: Ivan Adrian Koswara (chaotic_iak)氏発案
rampage: Ivan Adrian Koswara (chaotic_iak)氏発案
2 changes: 2 additions & 0 deletions src-ui/res/p.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"discolor": "Disable color",
"mouseonly": "Enable mouse-only input",
"patchwork_leftaux": "Enable to input aux. lines with single click",
"rampage_coloring": "Show plaid background colors",
"autocheck": "Answer check",
"autocheck.off": "Manual",
"autocheck.guarded": "Automatic (guarded)",
Expand Down Expand Up @@ -215,6 +216,7 @@
"applypreset.submit": "Replace",
"dropblocks": "Drop blocks",
"outlineshaded": "Outline shaded cells",
"traceroute":"Trace routes",
"enterTrial": "Trial mode",
"acceptTrial": "Accept trial",
"rejectTrial": "Reject trial",
Expand Down
1 change: 1 addition & 0 deletions src-ui/res/p.ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@
"auxdelete.confirm": "このブロックを削除しますか?",
"encolorall": "色をつける",
"flushexcell": "ヒントを揃える",
"traceroute":"ルートを表示",
"applypreset": "ブロックの変更",
"applypreset.title": "ブロックの変更",
"applypreset.submit": "OK",
Expand Down
3 changes: 3 additions & 0 deletions src-ui/res/rules.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -306,3 +306,6 @@ teri: "Shade some cells on the board.\n1. Shaded cells cannot be horizontally or
lixloop: "Shade some cells on the board, and draw a single loop that goes through all remaining cells.\n1. The loop cannot branch off or cross itself.\n2. Shaded cells cannot be orthogonally adjacent.\n3. Cells with letters or question marks cannot be shaded, and are not part of the loop.\n4. The letters represent cells that contain a turning line (L), straight line (I), or shaded cell (X). The clued cells indicate whichever type is most frequent in that direction. If multiple types are tied for most frequent, all letters will be listed in the clue."
sananko: "Place a number between 1 and 3 in some of the empty cells.\n1. Numbers must appear in groups of 3 orthogonally connected cells with the same number.\n2. Different groups cannot be orthogonally adjacent.\n3. Clues on shaded cells indicate the sum of numbers in the (up to four) orthogonally adjacent cells."
bosnianroad: "Shade some cells to form a loop.\n1. The loop cannot visit a cell that's orthogonally or diagonally adjacent to a cell it has visited before.\n2. Gray cells cannot be shaded.\n3. A number indicates the amount of shaded cells in the orthogonally and diagonally adjacent cells."
turnaround: "Draw a loop traveling orthogonally on cells. \n1. The loop must visit all numbers. \n2. Each number indicates how many turns the loop makes among the three cells: the number itself, and the cells immediately before and after it in the loop."
contact: "Divide the grid into dominoes. \n1. Each number indicates how many dominoes are orthogonally adjacent to the domino containing the number. \n2. Dominoes may contain any number of given numbers."
rampage: "Divide the grid into dominoes. \n1. Each number represents a rampaging bull, which behaves as follows. The bull first moves to the other cell of the domino it's in, and then moves one extra space (thus breaking through the opposite short edge into a new domino). It then repeats this procedure with the new domino it's in, and so on. \n2. The number indicates how many dominoes the bull passes through, including the initial one. \n3. As a special case, if the bull never leaves the grid, the number is infinity (∞)."
1 change: 1 addition & 0 deletions src-ui/res/rules.ja.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,3 +262,4 @@ bosnianroad: "1. いくつかのマスを黒く塗り、黒マスでひとつの
subomino: "1. 点線上に線を引き、盤面の白マスをブロックに分割する。\n2. 数字は、そのマスを含むブロックのマス数を表す。ブロックは数字をいくつ含んでも良い。\n3. 辺で接するブロック同士は、一方が他方を包含してはいけない。ただし包含とは、片方のブロックを回転せずに平行移動させたとき、もう片方のブロックの上にマスがはみ出ず重ねられることである。"
trainstations: "1. 盤面の全てのマスにタテヨコに線を引き、全体で1つの輪っかを作ります。\n2. 輪っかを作る線はマスの中央を通り、盤面の外に出たり、枝分かれしたり、行き止まりがあったりしてはいけません。\n3. ┼のマスでは、線は必ず立体交差します。┼以外のマスで線が交差してはいけません。\n4. 数字は駅を表します。駅は、数字の順番通りに通る必要があります。\n5. 線は駅のマスの上で直進します。"
lineofsight: "1. パズル面のいくつかの頂点を線でつないで枝分かれのない一つのループを作る。\n2. 数字と矢印は、その方向を見たときに見える直線の長さを表す。"
turaround: "1. 盤面にタテヨコに線を引き、全体で1つの輪っかを作ります\n2. 輪っかを作る線はマスの中央を通り、盤面の外に出たり、交差したり、枝分かれしたり、行き止まりがあったりしてはいけません\n 3. 線はすべての数字の上を通ります\n4. 数字はその数字マスと2つの隣のマス線が曲がる回数を表します。"
6 changes: 5 additions & 1 deletion src/puzzle/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"patchwork_leftaux",
true
); /* patchwork: Alternative mouse input */

this.add("rampage_coloring", false); /* rampage: scott-pattern grid */
this.add("squarecell", true); /* セルは正方形にする */

/* 入力方法設定 */
Expand Down Expand Up @@ -402,6 +402,9 @@
case "patchwork_leftaux":
exec = pid === "patchwork";
break;
case "rampage_coloring":
exec = pid === "rampage";
break;
case "undefcell":
exec = pid === "shugaku" || pid === "lightshadow";
break;
Expand Down Expand Up @@ -498,6 +501,7 @@
case "disptype_interbd":
case "dispqnumbg":
case "mouseonly":
case "rampage_coloring":
puzzle.redraw();
break;

Expand Down
15 changes: 9 additions & 6 deletions src/pzpr/variety.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,6 @@
arukone: [0, 0, "アルコネ", "Arukone", "numlin"],
ayeheya: [0, 1, "∀人∃HEYA", "Ayeheya", "heyawake"],
balance: [0, 0, "Balance Loop", "Balance Loop"],
cave: [1, 0, "バッグ", "Cave", "kurodoko", { alias: "bag" }],
cbanana: [0, 0, "チョコバナナ", "Choco Banana"],
circlesquare: [0, 0, "Circles and Squares", "Circles and Squares"],
context: [0, 0, "Context", "Context"],
crossstitch: [0, 0, "Crossstitch", "Crossstitch"],
cts: [0, 0, "Cross the Streams", "Cross the Streams", "nonogram"],
barns: [1, 0, "バーンズ", "Barns"],
battleship: [0, 0, "Battleship", "Battleship", "statuepark"],
bdblock: [1, 0, "ボーダーブロック", "Border Block"],
Expand All @@ -113,6 +107,12 @@
bosnianroad: [0, 0, "Bosnian Road", "Bosnian Road"],
box: [0, 0, "ボックス", "Box"],
brownies: [0, 0, "ブラウニー", "Brownies", "yosenabe"],
cave: [1, 0, "バッグ", "Cave", "kurodoko", { alias: "bag" }],
cbanana: [0, 0, "チョコバナナ", "Choco Banana"],
circlesquare: [0, 0, "Circles and Squares", "Circles and Squares"],
context: [0, 0, "Context", "Context"],
crossstitch: [0, 0, "Crossstitch", "Crossstitch"],
cts: [0, 0, "Cross the Streams", "Cross the Streams", "nonogram"],
skyscrapers: [
0,
0,
Expand All @@ -130,6 +130,7 @@
coffeemilk: [0, 0, "コーヒー牛乳", "Coffee Milk", "wblink"],
cojun: [0, 0, "コージュン", "Cojun", "ripple"],
compass: [0, 0, "Compass", "Compass", "compass"],
contact: [0, 0, "コンタクト", "Contact"],
coral: [0, 0, "Coral", "Coral", "nonogram"],
country: [1, 0, "カントリーロード", "Country Road"],
creek: [1, 0, "クリーク", "Creek"],
Expand Down Expand Up @@ -321,6 +322,7 @@
putteria: [0, 0, "プッテリア", "Putteria", "hanare"],
ququ: [0, 0, "区区", "Ququ"],
railpool: [0, 0, "Rail Pool", "Rail Pool"],
rampage: [0, 0, "ランページ", "Rampage", "contact"],
rassi: [0, 0, "Rassi Silai", "Rassi Silai", "country"],
rectslider: [0, 0, "四角スライダー", "Rectangle-Slider", "bonsan"],
reflect: [1, 0, "リフレクトリンク", "Reflect Link"],
Expand Down Expand Up @@ -408,6 +410,7 @@
tren: [0, 0, "パーキング", "Tren"],
triplace: [0, 0, "トリプレイス", "Tri-place"],
tslither: [0, 0, "Touch Slitherlink", "Touch Slitherlink", "vslither"],
turnaround: [0, 0, "ターンアラウンド", "Turnaround"],
usotatami: [0, 0, "ウソタタミ", "Uso-tatami", "fillmat"],
usoone: [0, 0, "ウソワン", "Uso-one"],
view: [1, 0, "ヴィウ", "View", "sukoro"],
Expand Down
7 changes: 7 additions & 0 deletions src/res/failcode.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
"anNoShade": "The cell next to the arrow is not shaded.",
"anNumberNe.crossstitch": "The number of crossings is not correct.",
"anNumberNe.hebi": "A clue points at the wrong number.",
"anPiece.contact": "The number of adjacent dominoes is not correct.",
"anShadeNe.lixloop": "A clue does not indicate the type of cell that is most common.",
"anShadeNe.yajisoko": "The number of boxes is not correct.",
"anShadeNe": "The number of shaded cells is not correct.",
"anTatamiNe.yajitatami": "The number of tatamis are not correct.",
"anTurn.turnaround": "The number of turns is not correct",
"anUnitNe.kuroclone": "The size of the pointed unit is not correct.",
"arAdjPair.toichika": "There are paired arrows in adjacent countries.",
"arAdjPair.toichika2": "There are paired numbers in adjacent countries.",
Expand Down Expand Up @@ -124,6 +126,7 @@
"bkMixed.view": "A room includes both numbered and non-numbered cells.",
"bkMixed": "A tile includes both shaded and unshaded cells.",
"bkMixedNum.fillomino": "An area has two or more kinds of numbers.",
"bkMixedNum.contact": "A domino has two different numbers.",
"bkMoreThan2Num.araf": "An area has more than two numbers.",
"bkMSGe2.nondango": "An area has two or more shaded circles.",
"bkMSPassedGt2.moonsun": "A line passes the marks of the moon for two rooms in a row.",
Expand Down Expand Up @@ -769,6 +772,7 @@
"nqAroundDup.kakuru": "There are same numbers around the pre-numbered cell.",
"nqAroundSumNe.kakuru": "A sum of numbers around the pre-numbered cell is incorrect.",
"numNoLine.geradeweg": "A number has no line.",
"numNoLine.turnaround": "A number has no line.",
"objShaded.nurimaze": "An object is shaded.",
"pairedLetterNe.kinkonkan": "Beam from a light doesn't reach its pair.",
"pairedNumberNe.kinkonkan": "The number of reflections is wrong.",
Expand All @@ -780,6 +784,9 @@
"rmDeadend.scrin": "There is a dead-end rectangle.",
"rmIsolated.scrin": "There is an isolated rectangle.",
"rmRectUnshade.scrin": "A rectangle is not part of the solution.",
"routeLenGt": "The number of dominoes on the bull's route is greater than the clue.",
"routeLenLt": "The number of dominoes on the bull's route is smaller than the clue.",
"routeLenLoop": "The route does not contain a loop.",
"routeIgnoreCP.nurimaze": "There is a circle out of the shortest route from S to G.",
"routePassDeadEnd.nurimaze": "There is a triangle on the shortest route from S to G.",
"segBlackEq.balance": "Segments through a black circle are equal.",
Expand Down
7 changes: 7 additions & 0 deletions src/res/failcode.ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
"anNoShade": "矢印の1マス先に黒マスがありません。",
"anNumberNe.crossstitch": "ループが交わっているマスの数が正しくありません。",
"anNumberNe.hebi": "矢印の先にある数字が正しくありません。",
"anPiece.contact": "接しているブロックの数が数字と違っています。",
"anShadeNe": "矢印の方向にある黒マスの数が正しくありません。",
"anTatamiNe.yajitatami": "矢印の方向にあるタタミの数が正しくありません。",
"anTurn.turnaround": "線の曲がった回数が数字と違っています。",
"anUnitNe.kuroclone": "矢印の先にあるユニットの大きさが正しくありません。",
"arAdjPair.toichika": "辺を共有する国にペアとなる矢印が入っています。",
"arAdjPair.toichika2": "ペアとなる数字の入っている領域が隣り合っています。",
Expand Down Expand Up @@ -95,6 +97,7 @@
"bkMixed.view": "数字のあるなしが混在した部屋があります。",
"bkMixed": "白マスと黒マスの混在したタイルがあります。",
"bkMixedNum.fillomino": "1つのブロックに2種類以上の数字が入っています。",
"bkMixedNum.contact": "1つのブロックに2種類以上の数字が入っています。",
"bkMoreThan2Num.araf": "3つ以上の数字を含むブロックがあります。",
"bkMSGe2.nondango": "1つの領域に複数のくろまるがあります。",
"bkMSPassedGt2.moonsun": "月を通った部屋が連続しています。",
Expand Down Expand Up @@ -589,6 +592,7 @@
"nqAroundDup.kakuru": "初めから出ている数字の周りに同じ数字が入っています。",
"nqAroundSumNe.kakuru": "初めから出ている数字の周りに入る数の合計が正しくありません。",
"numNoLine.geradeweg": "線の通っていない数字があります。",
"numNoLine.turnaround": "線の通っていない数字があります。",
"objShaded.nurimaze": "オブジェクトが黒マスになっています。",
"pairedLetterNe.kinkonkan": "光が同じ文字の場所へ到達しません。",
"pairedNumberNe.kinkonkan": "光の反射回数が正しくありません。",
Expand All @@ -600,6 +604,9 @@
"rmDeadend.scrin": "頂点を1つしか共有していない長方形があります。",
"rmIsolated.scrin": "頂点を全く共有していない長方形があります。",
"rmRectUnshade.scrin": "輪の中に長方形が出来ています。",
"routeLenGt": "ブロックの数が数字よりも長いです",
"routeLenLt": "ブロックの数が数字よりも短いです",
"routeLenLoop": "ループではありません.",
"routeIgnoreCP.nurimaze": "○がSからGへの経路上にありません。",
"routePassDeadEnd.nurimaze": "△がSからGへの経路上にあります。",
"segBlackEq.balance": "黒丸から線の端までの長さが同じになっています。",
Expand Down
Loading