Skip to content
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
4 changes: 2 additions & 2 deletions src-ui/changes.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
<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?sendai" target="_parent">Sendai-Miyagi 宮城県仙台市</a></li>
<li><a href="/p?keywest" target="_parent">Key West キーウエスト</a></li>
<li><a href="/p?morningwalk" target="_parent">Morning Walk</a></li>
<li><a href="/p?energywalk" target="_parent">Energy Walk</a></li>
<li><a href="/p?sansaroad" target="_parent">Sansa Road サンサロード</a></li>
<li><a href="/p?diamond" target="_parent">Diamond Chain</a></li>
<li><a href="/p?tetrochaink" target="_parent">Tetro Chain-K テトロチェーンK</a></li>
<li><a href="/p?bunnyhop" target="_parent">Bunnyhop</a></li>
<li><a href="/p?sashikabe" target="_parent">Sashikabe</a></li>
</ul>
</main>
</body>
Binary file added src-ui/img/sendai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src-ui/js/ui/KeyPopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,10 @@ ui.keypopup = {
numcity: [10, 10],
cityspace: [10, 0],
diamond: [4, 0],
sendai: [10, 0],
morningwalk: [10, 0],
energywalk: [10, 0]
energywalk: [10, 0],
keywest: [4, 4]
},

//---------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions src-ui/js/ui/Misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ function toBGimage(pid) {
"sashikazune",
"satogaeri",
"scrin",
"sendai",
"simplegako",
"simpleloop",
"skyscrapers",
Expand Down
2 changes: 2 additions & 0 deletions src-ui/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ <h2 id="title"><span lang="ja">パズルの種類のリスト</span><span lang="
<li data-pid="forestwalk"></li>
<li data-pid="diamond"></li>
<li data-pid="energywalk"></li>
<li data-pid="keywest"></li>
</ul>
</div>
<div class="lists lines">
Expand Down Expand Up @@ -296,6 +297,7 @@ <h2 id="title"><span lang="ja">パズルの種類のリスト</span><span lang="
<li data-pid="meidjuluk"></li>
<li data-pid="balloon"></li>
<li data-pid="narrow"></li>
<li data-pid="sendai"></li>
</ul>
</div>
<div class="lists divides">
Expand Down
4 changes: 3 additions & 1 deletion src-ui/res/history.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ aquapelago: "This genre was invented by Walker Anderson."
aquarium: "This genre was invented by Inaba Naoki."
armyants: "This genre first appeared in Puzzle Communication Nikoli vol. 158."
balance: "This genre was invented by Prasanna Seshadri."
cave: "This genre first appeared in Puzzle Communication Nikoli vol. 58 under the name 'Bag'."
cave: "This genre first appeared in Puzzle Communication Nikoli vol. 60 under the name 'Bag'."
barns: "This genre first appeared in Puzzle Communication Nikoli vol. 114."
bdblock: "This genre first appeared in Puzzle Communication Nikoli vol. 49."
bonsan: "This genre first appeared in Puzzle Communication Nikoli vol. 96."
Expand Down Expand Up @@ -226,3 +226,5 @@ sendai: This genre first appeared in Puzzle Communication Nikoli vol. 104.
keywest: This genre first appeared in Puzzle Communication Nikoli vol. 53.
morningwalk: This genre was invented by Anurag Sahay.
energywalk: This genre was invented by Parachor.
circuitwalk: This genre was invented by Parachor.
cornerch: This genre first appeared in Puzzle Communication Nikoli vol. 191.
6 changes: 5 additions & 1 deletion src-ui/res/history.ja.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ box: パズル通信ニコリ vol.24より
wblink: パズル通信ニコリ vol.45より
yajikazu: パズル通信ニコリ vol.74より
simplegako: わんど氏発案
cave: パズル通信ニコリ vol.58より(当時のパズル名は「バッグ」)
cave: パズル通信ニコリ vol.60より(当時のパズル名は「バッグ」)
tontonbeya: パズル通信ニコリ vol.180より
oyakodori: 齋藤スバル氏発案
sashikazune: パズル通信ニコリ vol.161より
Expand Down Expand Up @@ -224,3 +224,7 @@ tetrochaink: パズル通信ニコリ vol.192より
sansaroad: パズル通信ニコリ vol.185より
sendai: パズル通信ニコリ vol.104より
keywest: パズル通信ニコリ vol.53より
morningwalk: Anurag Sahay氏発案
energywalk: Parachor氏発案
circuitwalk: Parachor氏発案
cornerch: パズル通信ニコリ vol.191より
28 changes: 27 additions & 1 deletion src-ui/res/rules.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -357,4 +357,30 @@ sansaroad: "Shade some empty cells on the board to form a single unshaded region
sendai: "Draw lines over the dotted lines to divide each larger region (prefecture) into smaller regions (cities). Cities are allowed to be the same size as its prefecture.\n1. Every city must be orthogonally adjacent to at least one other city with the same shape and orientation.\n2. A number indicates the amount of cities in a prefecture. A prefecture without a number may have any amount of cities.\n3. There can be no dead-end lines."
keywest: "Place a number between 0 and 4 in every island, and draw orthogonal bridges connecting them.\n1. Orthogonally adjacent islands cannot have the same number.\n2. Numbers indicate how many bridges are connected to this island.\n3. All islands with a number above 0 must be connected into a single network."
energywalk: "Draw lines to form a single network that goes through every numbered cell.\n1. The network cannot have dead ends.\n2. Every visited energy cell must split off in all possible directions.\n3. The network cannot branch off or cross on unshaded cells.\n4. The network must not connect an energy cell to itself via only unshaded cells.\n5. A number indicates how many cells make up the continuous unshaded section of the network that the number is on."
morningwalk: "Draw a loop that goes through every numbered cell.\n1. The loop cannot branch off or cross itself.\n2. A number indicates how many cells make up the continuous white section of the loop that the number is on.\n3. The lengths of two successive different coloured sections of the loop must not be equal."
morningwalk: "Draw a loop that goes through every numbered cell.\n1. The loop cannot branch off or cross itself.\n2. A number indicates how many cells make up the continuous white section of the loop that the number is on.\n3. The lengths of two successive differently coloured sections of the loop must not be equal."
cornerch: |-
Shade some cells on the board to form regions of unshaded cells.
1. A number indicates the size of the region that contains it..
2. Clues represent the number of cells in the region they belong to. A region can contain one or more identical numbers, or none at all.
3. If the number of cells in an unshaded group is even, the area must be rectangular. If the number of cells is odd, the area must not be rectangular.
4. All unshaded areas must be connected diagonally.
oasis: |-
Shade some cells on the board.
1. Shaded cells cannot be horizontally or vertically adjacent.
2. Numbers cannot be shaded.
3. The unshaded cells cannot form a 2x2 square.
4. A circled number indicates how many other circles it could reach by traveling only through empty unshaded cells.
5. All unshaded cells on the board form an orthogonally connected area.
circuitwalk: |-
Draw one or more loops so every number is visited once.
1. A loop cannot branch off or overlap itself or another loop.
2. Every visited shaded cell must consist of exactly two straight line segments belonging to different loops crossing over each other.
3. Crossings cannot appear outside of a shaded cell.
4. A number indicates how many cells make up the continuous white section of the loop that the number is on.
5. All loops must form a single connected network.
edamame: |-
Draw several rectangles of length 1xN (at least 3), then place circles inside them.
1. Rectangles cannot overlap numbers.
2. Every rectangle contains exactly three circles: One on each endpoint, and another somewhere in the middle.
3. A number indicates the amount of circles in the 4 orthogonally adjacent cells. Circles cannot appear outside of rectangles.
4. All cells not used by rectangles form an orthogonally contiguous area.
8 changes: 8 additions & 0 deletions src-ui/res/rules.ja.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -314,3 +314,11 @@ tetrochaink: "1. 盤面のいくつかのマスを黒くぬりましょう。\n2
sansaroad: "盤面のいくつかのマスを黒くぬりましょう。\n1. 小さな丸は、その丸が接している周囲のマスのうち、黒マスと白マスのどちらの数が多いかを表しています。黒丸なら黒マスの方が多く、白丸なら白マスの方が多いということです。灰色の丸は白マスと黒マスが同数であることを表しています。\n2. ▽のマスはすべて白マスになります。また、▽のマスにタテヨコに隣り合うマスのうち、ちょうど3マスだけが白マスになります。▽のマス以外の白マスでは、タテヨコに隣り合うマスのうち、ちょうど2マスだけが白マスになります。\n3. すべての白マスはタテヨコにひとつながりになっていなければなりません。\n4. 白マスが2×2以上のカタマリになってはいけません。"
sendai: "点線上に線を引き、すでに太線で区切られた大部屋(県)を、いくつかの小さな部屋(市)に分けます。線が引かれない(市を1つしか持たない)県があってもかまいません。\n1. すべての市は、形も向きも同じになる他の市と辺(市境)を共有しなければなりません。\n2. 数字は、その県が含む市の数を表します。"
keywest: "丸(シマといいます)の中に、0~4の数字のどれかを入れます。\n1. 同じ数字はタテヨコに連続しません。\n2. 数字は、その数字のあるシマからタテヨコに隣接したシマへかける橋の数です。\n3. 橋は1ヵ所に1本しかかけられません。\n4. 0が入るシマ以外のすべてのシマは、橋によって1つにつながっていなければいけません。"
morningwalk: "1. 盤面にタテヨコに線を引き、全体で1つの輪っかを作り、すべての数字のマスを通りましょう。\n2. 輪っかを作る線はマスの中央を通り、盤面の外に出たり、交差したり枝分かれしたり行き止まりがあったりしてはいけません。\n3. 数字は、その数字のマスが含まれる、連続した白マス上の線のマス数を表します。\n4. 輪っかを作る線に沿ってみた時、連続した白マス上の線のマス数は、その前後に隣り合う灰色マス上の線のマス数のいずれとも異なる数でなければなりません。"
energywalk: "1. 盤面のいくつかのマスに線を引いて、全体で1つのネットワークを作りましょう。このネットワークは、すべての数字のマスを通ります。\n2. 線はマスの中央を通るようにタテヨコに引きます。線は盤面の外に出てはいけません。\n3. 黄色のマスを「エネルギーマス」と呼び、それ以外のマスを「通常マス」と呼びます。\n4. 通常マスの上では、ネットワークに枝分かれや行き止まりがあってはいけません。\n5. エネルギーマスの上では、そのマスから進むことができる(盤面の外に出ない)すべての方向に線が1本ずつ伸びていなければなりません。\n6. ネットワークに、通常マスだけを通って、あるエネルギーマスから再び同じエネルギーマスに戻ってくる部分があってはいけません。\n7. 数字は、線が通常マスに入ってからその数字のマスを通り、次にエネルギーマスに入るまでに通る通常マスの数を表します。「?」は任意の数を表します。"
cornerch: |-
1. 盤面のいくつかのマスを黒くぬりまし ょう。
2. 盤面の数字は、その数字が含まれる、 黒マスによって分断されたところ (シマ と呼びます)のマスの数を表します。
3. 1つのシマに、いくつ数字が入っても かまいません。また、数字が入っている マスを黒くぬってはいけません。
4. マスの数が偶数のシマは必ず長方形 (正方形も含みます)になります。また、 マスの数が奇数のシマは必ず長方形 (正 方形も含みます) 以外の形になります。
5. すべてのシマは頂点を通じてひとつな がりになっていなければなりません。
5 changes: 4 additions & 1 deletion src/puzzle/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,10 @@
break;
case "forceallcell":
exec =
pid === "fillomino" || pid === "symmarea" || pid === "snakepit";
pid === "fillomino" ||
pid === "symmarea" ||
pid === "snakepit" ||
pid === "keywest";
break;
case "dontpassallcell":
exec = pid === "arukone";
Expand Down
2 changes: 2 additions & 0 deletions src/pzpr/variety.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@
kakuro: [0, 1, "カックロ", "Kakuro"],
kakuru: [0, 0, "カックル", "Kakuru"],
kazunori: [0, 0, "かずのりのへや", "Kazunori Room"],
keywest: [0, 0, "キーウエスト", "Key West"],
kinkonkan: [1, 0, "キンコンカン", "Kin-Kon-Kan"],
kissing: [
0,
Expand Down Expand Up @@ -395,6 +396,7 @@
{ alias: "sato", kanpen: "satogaeri" }
],
scrin: [0, 0, "スクリン", "Scrin"],
sendai: [0, 0, "宮城県仙台市", "Sendai-Miyagi"],
shakashaka: [0, 1, "シャカシャカ", "Shakashaka"],
shikaku: [0, 1, "四角に切れ", "Shikaku", "shikaku"],
shimaguni: [1, 0, "島国", "Shimaguni", "shimaguni"],
Expand Down
7 changes: 5 additions & 2 deletions src/res/failcode.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
"bkCircleNe.familyphoto": "A number does not indicate the amount of circles in the area.",
"bkCircleNe.fracdiv": "A number does not indicate the ratio of circles and cells in the area.",
"bkClue.toichika2": "A number does not match the clue for the country.",
"bkCountNe.sendai": "A number does not indicate the amount of cities in the outlined prefecture.",
"bkDifferentLetters.nikoji": "Two areas with different letters have the same shape.",
"bkDifferentLines.pmemory": "Two regions of the same shape have different lines.",
"bkDifferentOrientation.nikoji": "Two areas with equal letters have different orientation.",
Expand Down Expand Up @@ -147,6 +148,7 @@
"bkMUPassedGt2.moonsun": "A line passes the marks of the sun for two rooms in a row.",
"bkNoChain.chainedb": "A block is not diagonally adjacent to another block.",
"bkNoChain.mrtile": "A block is not diagonally adjacent to another identical block.",
"bkNoChain.sendai": "A city is not adjacent to another city with the same shape and orientation.",
"bkNoColor.interbd": "A country has no color.",
"bkNoLevel.aquarium": "A region has different water surface levels.",
"bkNoLine.country": "A line doesn't pass a country.",
Expand Down Expand Up @@ -766,10 +768,11 @@
"nmIgnored.herugolf": "There is a Hole without a ball.",
"nmIneqNe.minarism": "A inequality sign is not correct.",
"nmInside": "A wolf is inside the loop.",
"nmLineGt.hashikake": "The number of connecting bridges to a number is not correct.",
"nmLineAdjacent.keywest": "Two adjacent islands have the same number of connecting bridges.",
"nmLineGt.hashikake": "The number of bridges connecting to a number is not correct.",
"nmLineGt.kaidan": "The number of blocks adjacent to a number is not correct.",
"nmLineGt1.amibo": "Multiple lines connect to a white circle.",
"nmLineLt.hashikake": "The number of connecting bridges to a number is not correct.",
"nmLineLt.hashikake": "The number of bridges connecting to a number is not correct.",
"nmLineLt.kaidan": "The number of blocks adjacent to a number is not correct.",
"nmLineLt2.kouchoku": "A clue doesn't have two segments.",
"nmLineNe.ichimaga": "The number is not equal to the number of lines out of the circle.",
Expand Down
158 changes: 158 additions & 0 deletions src/variety/keywest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
(function(pidlist, classbase) {
if (typeof module === "object" && module.exports) {
module.exports = [pidlist, classbase];
} else {
pzpr.classmgr.makeCustom(pidlist, classbase);
}
})(["keywest"], {
MouseEvent: {
inputModes: {
edit: ["number", "line", "peke", "clear"],
play: ["number", "line", "peke", "clear"]
},

mouseinput_clear: function() {
this.inputFixedNumber(-1);
},

mouseinput_auto: function() {
if (this.btn === "left") {
this.inputLine();
} else {
this.inputpeke();
}
if (this.mouseend && this.notInputted()) {
this.inputqnum();
}
}
},

KeyEvent: {
enablemake: true,
enableplay: true
},

Cell: {
disInputHatena: true,
minnum: 0,
maxnum: 4
},

Board: {
cols: 7,
rows: 7,

hasborder: 1
},

LineGraph: {
enabled: true,
makeClist: true
},

Graphic: {
gridcolor_type: "THIN",
irowake: true,

circleratio: [0.37, 0.33],

lwratio: 8,

paint: function() {
this.drawPekes();
this.drawLines();

this.drawCircledNumbers();
this.drawAnsNumbers();

this.drawCursor();
},

drawAnsNumbers: function() {
this.vinc("cell_ans_number", "auto");
this.drawNumbers_com(
this.getAnsNumberText,
this.getAnsNumberColor,
"cell_ans_text_",
{ ratio: 0.65 }
);
},

getQuesNumberColor: function(cell) {
return cell.error === 1 ? this.errcolor1 : this.quescolor;
},
getCircleStrokeColor: function(cell) {
// Also shows connectivity error
return cell.error ? this.errcolor1 : this.quescolor;
},
getCircleFillColor: function(cell) {
return cell.error === 1 ? this.errbcolor1 : "white";
}
},

Encode: {
decodePzpr: function(type) {
this.decode4Cell();
},
encodePzpr: function(type) {
this.encode4Cell();
}
},
//---------------------------------------------------------
FileIO: {
decodeData: function() {
this.decodeCellQnum();
this.decodeBorderLine();
this.decodeCellAnumsub();
},
encodeData: function() {
this.encodeCellQnum();
this.encodeBorderLine();
this.encodeCellAnumsub();
}
},

//---------------------------------------------------------
// 正解判定処理実行部
AnsCheck: {
checklist: [
"checkAdjacentDiffNumber",
"checkCellNumberNotOver",
"checkCellNumberNotLess",
"checkConnectAllNumber",
"checkAdjacentDiffWithoutNumber",
"checkNoNumCell_keywest+"
],

checkCellNumberNotOver: function() {
this.checkAllCell(function(cell) {
return cell.isValidNum() && cell.getNum() < cell.lcnt;
}, "nmLineGt");
},
checkCellNumberNotLess: function() {
this.checkAllCell(function(cell) {
return cell.isValidNum() && cell.getNum() > cell.lcnt;
}, "nmLineLt");
},
checkAdjacentDiffWithoutNumber: function() {
this.checkSideCell(function(cell1, cell2) {
if (cell1.isValidNum() && cell2.isValidNum()) {
return false;
}

return cell1.lcnt === cell2.lcnt;
}, "nmLineAdjacent");
},
checkNoNumCell_keywest: function() {
if (this.puzzle.getConfig("forceallcell")) {
this.checkAllCell(function(cell) {
return cell.noNum();
}, "ceNoNum");
}
}
},
FailCode: {
nmLineGt: "nmLineGt.hashikake",
nmLineLt: "nmLineLt.hashikake"
}
});
Loading