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 Contact and Rampage #545

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src-ui/changes.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
<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?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.
12 changes: 6 additions & 6 deletions src-ui/js/common/langs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// langs.js
ui.langs = {
en: <%= JSON.stringify(langs.p_en) %>,
ja: <%= JSON.stringify(langs.p_ja) %>
};
// langs.js

ui.langs = {
en: <%= JSON.stringify(langs.p_en) %>,
ja: <%= JSON.stringify(langs.p_ja) %>
};
26 changes: 26 additions & 0 deletions src-ui/js/ui/KeyPopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ ui.keypopup = {
teri: [10, 0],
portal: [10, 0],
kuromenbun: [10, 0],
contact: [6, 0],
rampage: [131, 0],
bosnianroad: [8, 0],
sananko: [10, 113]
},
Expand Down Expand Up @@ -343,6 +345,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 +990,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
2 changes: 2 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
2 changes: 2 additions & 0 deletions src-ui/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,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: 6 additions & 1 deletion src-ui/p.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<link rel="apple-touch-icon" sizes="180x180" href="./apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="./favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="./favicon-16x16.png">
<link rel="manifest" href="./site.webmanifest">
<link rel="mask-icon" href="./safari-pinned-tab.svg" color="#5bbad5">
<link rel="stylesheet" href="./css/ui.css?<%= git.hash %>" type="text/css">
<script type="text/javascript">
Expand Down Expand Up @@ -337,6 +336,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
2 changes: 2 additions & 0 deletions src-ui/res/history.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -222,3 +222,5 @@ 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.
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.
2 changes: 2 additions & 0 deletions src-ui/res/history.ja.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,5 @@ lineofsight: 稲葉直貴氏発案
kuromenbun: パズル通信ニコリ vol.138より
teri: 稲葉直貴氏発案
sananko: 齋藤スバル氏発案
contact: Ivan Adrian Koswara (chaotic_iak)氏発案
rampage: Ivan Adrian Koswara (chaotic_iak)氏発案
1 change: 1 addition & 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
2 changes: 2 additions & 0 deletions src-ui/res/rules.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -306,3 +306,5 @@ 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."
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 (∞)."
2 changes: 1 addition & 1 deletion src-ui/res/rules.ja.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -261,4 +261,4 @@ sananko: "1. 空いているマスのいくつかに1~3の数字を1つ
bosnianroad: "1. いくつかのマスを黒く塗り、黒マスでひとつのループを作りましょう。\n2. ループの中腹同士が辺や頂点で接してはいけません。\n3. 灰色のマスは塗りつぶすことができません。数字は、その周囲8マスのうち黒く塗られるマスの数を表します。"
subomino: "1. 点線上に線を引き、盤面の白マスをブロックに分割する。\n2. 数字は、そのマスを含むブロックのマス数を表す。ブロックは数字をいくつ含んでも良い。\n3. 辺で接するブロック同士は、一方が他方を包含してはいけない。ただし包含とは、片方のブロックを回転せずに平行移動させたとき、もう片方のブロックの上にマスがはみ出ず重ねられることである。"
trainstations: "1. 盤面の全てのマスにタテヨコに線を引き、全体で1つの輪っかを作ります。\n2. 輪っかを作る線はマスの中央を通り、盤面の外に出たり、枝分かれしたり、行き止まりがあったりしてはいけません。\n3. ┼のマスでは、線は必ず立体交差します。┼以外のマスで線が交差してはいけません。\n4. 数字は駅を表します。駅は、数字の順番通りに通る必要があります。\n5. 線は駅のマスの上で直進します。"
lineofsight: "1. パズル面のいくつかの頂点を線でつないで枝分かれのない一つのループを作る。\n2. 数字と矢印は、その方向を見たときに見える直線の長さを表す。"
lineofsight: "1. パズル面のいくつかの頂点を線でつないで枝分かれのない一つのループを作る。\n2. 数字と矢印は、その方向を見たときに見える直線の長さを表す。"
12 changes: 6 additions & 6 deletions src/common/langs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// langs.js
pzpr.failcodes = {
en: <%= JSON.stringify(langs.failcode_en) %>,
ja: <%= JSON.stringify(langs.failcode_ja) %>
};
// langs.js

pzpr.failcodes = {
en: <%= JSON.stringify(langs.failcode_en) %>,
ja: <%= JSON.stringify(langs.failcode_ja) %>
};
9 changes: 8 additions & 1 deletion src/puzzle/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@
"patchwork_leftaux",
true
); /* patchwork: Alternative mouse input */

this.add(
"rampage_coloring",
false
); /* rampage: plaid background coloring */
this.add("squarecell", true); /* セルは正方形にする */

/* 入力方法設定 */
Expand Down Expand Up @@ -402,6 +405,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 +504,7 @@
case "disptype_interbd":
case "dispqnumbg":
case "mouseonly":
case "rampage_coloring":
puzzle.redraw();
break;

Expand Down
14 changes: 8 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
5 changes: 5 additions & 0 deletions src/res/failcode.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"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.",
Expand Down Expand Up @@ -124,6 +125,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 @@ -780,6 +782,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
Loading