Skip to content
Merged
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 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?gravel" target="_parent">Gravel</a></li>
<li><a href="/p?scrabble" target="_parent">Scrabble</a></li>
<li><a href="/p?vertigo" target="_parent">Vertigo</a></li>
<li><a href="/p?mrokmrno" target="_parent">Mr. OK and Mr. NO</a></li>
<li><a href="/p?slovak" target="_parent">Slovak Sums</a></li>
<li><a href="/p?anymino" target="_parent">Anymino</a></li>
<li><a href="/p?elasticlink" target="_parent">Elastic Link</a></li>
<li><a href="/p?landmeasure" target="_parent">Land Measurement</a></li>
</ul>
</main>
</body>
Binary file added src-ui/img/gravel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 7 additions & 6 deletions src-ui/js/ui/KeyPopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ ui.keypopup = {
soulmates: [10, 10],
landmeasure: [10, 0],
elasticlink: [10, 0],
slovak: [136, 10]
slovak: [136, 10],
gravel: [120, 0]
},

//---------------------------------------------------------------------------
Expand Down Expand Up @@ -881,6 +882,9 @@ ui.keypopup = {
this.generate_main(items, 4);
},
generate_snakepit: function() {
var pid = ui.puzzle.pid;
var w = pid === "snakepit" ? { text: "■", color: "gray" } : { text: "●" };

this.generate_main(
[
"0",
Expand All @@ -896,7 +900,7 @@ ui.keypopup = {
" ",
["-", "?"],
["q", { text: "○" }],
["w", { text: "■", color: "gray" }]
["w", w]
],
4
);
Expand Down Expand Up @@ -1256,10 +1260,7 @@ ui.keypopup = {
// kp.resizepanel() キーポップアップのセルのサイズを変更する
//---------------------------------------------------------------------------
resizepanel: function() {
var cellsize = Math.min(ui.puzzle.painter.cw, 120);
if (cellsize < 20) {
cellsize = 20;
}
var cellsize = 48;

var dsize = (cellsize * 0.9) | 0,
tsize = (cellsize * 0.7) | 0;
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 @@ -153,6 +153,7 @@ function toBGimage(pid) {
"firewalk",
"forestwalk",
"geradeweg",
"gravel",
"hamlepaths",
"hasunomura",
"heteromino",
Expand Down
1 change: 1 addition & 0 deletions src-ui/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ <h2 id="title"><span lang="ja">パズルの種類のリスト</span><span lang="
<li data-pid="sendai"></li>
<li data-pid="heavydots"></li>
<li data-pid="trizone"></li>
<li data-pid="gravel"></li>
</ul>
</div>
<div class="lists divides">
Expand Down
1 change: 1 addition & 0 deletions src/pzpr/variety.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@
goishi: [0, 1, "碁石ひろい", "Goishi"],
gokigen: [1, 0, "ごきげんななめ", "Slant", "gokigen"],
golemgrad: [0, 0, "Golem Grad", "Golem Grad", "nuriloop"],
gravel: [0, 0, "Gravel", "Gravel"],
guidearrow: [0, 0, "ガイドアロー", "Guide Arrow"],
haisu: [0, 0, "Haisu", "Haisu"],
hakoiri: [1, 0, "はこいり○△□", "Hakoiri-masashi"],
Expand Down
2 changes: 2 additions & 0 deletions src/res/failcode.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@
"bkNoShade": "A room has no shaded cell.",
"bkNoShade.fakearrow": "A room has no shaded arrow.",
"bkNoStar.tentaisho": "An area has no stars.",
"bkNoSupport.gravel": "A block is not supported by another block below it.",
"bkNotAllMSPassed.dotchi2": "A line doesn't pass all black pearls.",
"bkNotAllMSPassed.moonsun": "A line doesn't pass all of the marks of the moon.",
"bkNotAllMUPassed.dotchi2": "A line doesn't pass all white pearls.",
Expand Down Expand Up @@ -267,6 +268,7 @@
"bkSameNumGt2.kazunori": "The room has three or more same numbers.",
"bkSameShape.narrow": "Two regions with the same symbol have the same shape.",
"bkSameTouch.zabajaba": "Two blocks of the same shape and orientation are adjacent.",
"bkSameTouch.gravel": "Two areas of the same size are adjacent.",
"bkSameTouch": "Two areas of the same shape and orientation are adjacent.",
"bkConsecutive.topo": "The numbers in adjacent regions don't have a difference of exactly 1.",
"bkSCGe2.dosufuwa": "An area has two or more iron balls.",
Expand Down
7 changes: 6 additions & 1 deletion src/variety-common/Encode.js
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,12 @@ pzpr.classmgr.makeCommon({
pass = 0,
tri = [9, 3, 1];
for (var c = 0; c < length; c++) {
pass += get_func(c) * tri[num];
var value = get_func(c);
if (value >= 0 && value <= 2) {
pass += value * tri[num];
} else {
throw Error("Value out of range");
}
num++;
if (num === 3) {
cm += pass.toString(27);
Expand Down
14 changes: 10 additions & 4 deletions src/variety-common/Graphic.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ pzpr.classmgr.makeCommon({
g.fillStyle = color;
g.fillRectCenter(
cell.bx * this.bw + this.getCellHorizontalOffset(cell),
cell.by * this.bh,
cell.by * this.bh + this.getCellVerticalOffset(cell),
this.bw + 0.5,
this.bh + 0.5
);
Expand All @@ -188,6 +188,9 @@ pzpr.classmgr.makeCommon({
getCellHorizontalOffset: function(cell) {
return 0;
},
getCellVerticalOffset: function(cell) {
return 0;
},

//---------------------------------------------------------------------------
// pc.drawBGExCells() ExCellに描画される背景色をCanvasに書き込む
Expand Down Expand Up @@ -544,7 +547,10 @@ pzpr.classmgr.makeCommon({
if (!!text) {
g.fillStyle = colorfunc.call(this, cell);
var x = cell.bx * this.bw + this.getCellHorizontalOffset(cell);
var y = cell.by * this.bh + this.getNumberVerticalOffset(cell);
var y =
cell.by * this.bh +
this.getCellVerticalOffset(cell) +
this.getNumberVerticalOffset(cell);
this.disptext(text, x, y, textoption);
} else {
g.vhide();
Expand Down Expand Up @@ -1668,7 +1674,7 @@ pzpr.classmgr.makeCommon({
g.fillStyle = color;
g.fillCircle(
cell.bx * this.bw + this.getCellHorizontalOffset(cell),
cell.by * this.bh,
cell.by * this.bh + this.getCellVerticalOffset(cell),
rsize_fill
);
} else {
Expand All @@ -1688,7 +1694,7 @@ pzpr.classmgr.makeCommon({
g.strokeStyle = color;
g.strokeCircle(
cell.bx * this.bw + this.getCellHorizontalOffset(cell),
cell.by * this.bh,
cell.by * this.bh + this.getCellVerticalOffset(cell),
rsize_stroke
);
} else {
Expand Down
Loading
Loading