Skip to content

Commit

Permalink
Add Balloon Box
Browse files Browse the repository at this point in the history
  • Loading branch information
x-sheep authored Dec 30, 2024
1 parent 6ca49fe commit a134d23
Show file tree
Hide file tree
Showing 12 changed files with 559 additions and 11 deletions.
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?balloon" target="_parent">Balloon Box 風船箱</a></li>
<li><a href="/p?mintonette" target="_parent">Mintonette</a></li>
<li><a href="/p?nibunnogo" target="_parent">Nibun-nogo ニブンノゴ</a></li>
<li><a href="/p?timebomb" target="_parent">Time Bomb 時限爆弾</a></li>
<li><a href="/p?archipelago" target="_parent">Archipelago アーキペラゴ</a></li>
<li><a href="/p?yajirushi2" target="_parent">Yajirushi 2 見つめあう矢印2</a></li>
<li><a href="/p?swslither" target="_parent">Sheep Wolf Slitherlink</a></li>
<li><a href="/p?meidjuluk" target="_parent">Meidjuluk</a></li>
</ul>
</main>
</body>
Binary file added src-ui/img/balloon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions src-ui/js/ui/KeyPopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ ui.keypopup = {
archipelago: [10, 0],
yajirushi2: [4, 0],
nibunnogo: [4, 0],
mintonette: [10, 0]
mintonette: [10, 0],
balloon: [10, 0]
},

//---------------------------------------------------------------------------
Expand Down Expand Up @@ -482,14 +483,15 @@ ui.keypopup = {
pid === "icewalk" ||
pid === "waterwalk" ||
pid === "firewalk" ||
pid === "dbchoco"
pid === "dbchoco" ||
pid === "balloon"
) {
itemlist.push([
"q",
{
text: "■",
color:
pid === "dbchoco"
pid === "dbchoco" || pid === "balloon"
? "rgb(204,204,204)"
: pid === "firewalk"
? "rgb(255,192,192)"
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 @@ -114,6 +114,7 @@ function toBGimage(pid) {
"araf",
"skyscrapers",
"balance",
"balloon",
"batten",
"battleship",
"bdwalk",
Expand Down
1 change: 1 addition & 0 deletions src-ui/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ <h2 id="title"><span lang="ja">パズルの種類のリスト</span><span lang="
<li data-pid="tachibk"></li>
<li data-pid="subomino"></li>
<li data-pid="meidjuluk"></li>
<li data-pid="balloon"></li>
</ul>
</div>
<div class="lists divides">
Expand Down
3 changes: 3 additions & 0 deletions src/puzzle/Piece.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,9 @@ pzpr.classmgr.makeCommon({
(this.qnum !== this.temp.qnum || this.anum !== this.temp.anum)
);
},
isLineShapeEndpoint: function() {
return this.isNum();
},
noNum: function() {
return (
!this.isnull &&
Expand Down
1 change: 1 addition & 0 deletions src/pzpr/variety.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
arukone: [0, 0, "アルコネ", "Arukone", "numlin"],
ayeheya: [0, 1, "∀人∃HEYA", "Ayeheya", "heyawake"],
balance: [0, 0, "Balance Loop", "Balance Loop"],
balloon: [0, 0, "風船箱", "Balloon Box"],
barns: [1, 0, "バーンズ", "Barns"],
batten: [0, 0, "Battenberg Painting", "Battenberg Painting"],
battleship: [0, 0, "Battleship", "Battleship", "statuepark"],
Expand Down
10 changes: 9 additions & 1 deletion src/res/failcode.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@
"bkLessThan2Num.araf": "An area has less than two numbers.",
"bkLiarNe1.usoone": "The number of liars in a room is not one.",
"bkLineGt.nagenawa": "The number of the cells that is passed any line in the room and the number written in the room is different.",
"bkLineGt1.balloon": "A balloon has more than one connected string.",
"bkLineLt.nagenawa": "The number of the cells that is passed any line in the room and the number written in the room is different.",
"bkLineLt1.balloon": "A balloon has no connected string.",
"bkLineNe.country": "The number of the cells that is passed any line in the country and the number written in the country is different.",
"bkLineNe.nothing": "A country isn't fully visited.",
"bkMajorBarGt.juosan": "The number of majority of vertical or horizontal bars is greater than the number of the area.",
Expand Down Expand Up @@ -170,10 +172,12 @@
"bkNoStar.tentaisho": "An area has no stars.",
"bkNotAllMSPassed.moonsun": "A line doesn't pass all of the marks of the moon.",
"bkNotAllMUPassed.moonsun": "A line doesn't pass all of the marks of the sun.",
"bkNotClosed.balloon": "A balloon is not enclosed by borders.",
"bkNotHRect.tatamibari": "A tatami is not a horizontally long rectangle.",
"bkNotLshape.loute": "An area is not L-shaped or its width is not 1.",
"bkNotLshape3.shikaku": "An area whose size is a multiple of three is not L-shaped.",
"bkNotPassTwice.doubleback": "A room isn't passed exactly twice.",
"bkNotRect.balloon": "A balloon is not a rectangle.",
"bkNotRect.scrin": "An area is not a rectangle.",
"bkNotRect.shikaku": "An area is not a rectangle.",
"bkNotRect.tatamibari": "A tatami is not rectangle.",
Expand Down Expand Up @@ -277,6 +281,7 @@
"bkSizeLt3": "The size of an area is smaller than three.",
"bkSizeLt4": "The size of an area is smaller than four.",
"bkSizeLt5": "The size of an area is smaller than five.",
"bkSizeNe.balloon": "The size of the balloon is not equal to the number.",
"bkSizeNe.cbanana": "The number is not equal to the size of the area.",
"bkSizeNe.fillmat": "The number is different from the size of the tatami.",
"bkSizeNe.hanare": "The size of the room is not equal to the number.",
Expand Down Expand Up @@ -523,6 +528,7 @@
"lcInvDirW.firefly": "Fireflies are connected without a line starting from point.",
"lcInvWhite.wblink": "Two white circles are connected.",
"lcIsolate.arukone": "A line doesn't connect any alphabet.",
"lcIsolate.balloon": "A string doesn't connect to any number.",
"lcIsolate.kusabi": "A line isn't connected to any circle.",
"lcIsolate": "A line doesn't connect to any number.",
"lcLenInvDiff.kusabi": "The relative lengths of the legs of a U don't match the clues.",
Expand All @@ -537,6 +543,7 @@
"lcTripleNum.kusabi": "Three or more objects are connected.",
"lcTripleNum.wblink": "Three or more objects are connected.",
"lcTripleNum": "Three or more numbers are connected.",
"lnAdjacent.balloon": "A string loops back on itself.",
"lnAdjacent.ladders": "Two ladders touch.",
"lnAdjacent.pmemory": "The path loops back on itself.",
"lnAdjacent.timebomb": "The paths of two different bombs are adjacent.",
Expand Down Expand Up @@ -579,7 +586,8 @@
"lnNoBorder.ladders": "A ladder doesn't touch two region borders.",
"lnNoBranchOrTerm.lither": "A line does not branch or terminate at a grid vertex.",
"lnNoFish.anglers": "A line has no fish.",
"lnNoNum.anglers": "A line has no number.",
"lnNoIce.balloon": "A string doesn't connect to a balloon.",
"lnNoNum": "A line has no number.",
"lnNotCrossMk": "A cross-joint cell doesn't have four-way lines.",
"lnNoTip.pencils": "A line is not connected to a pencil tip.",
"lnNotRect.nagenawa": "There is a non-rectangle loop.",
Expand Down
2 changes: 1 addition & 1 deletion src/res/failcode.ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@
"lnOnShade.yajisoko": "線が黒マスの上を通っています。",
"lnNoFish.anglers": "魚のいない線があります。",
"ceEmpty.kaidan": "空白のマスがあります。",
"lnNoNum.anglers": "数字のない線があります。",
"lnNoNum": "数字のない線があります。",
"bkCircleNe.familyphoto": "数字と人数が一致していません。",
"bkMirror.mirrorbk": "鏡を軸に、ブロックが線対称になっていません。",
"csAdjacent.kaidan": "「〇」がタテヨコに連続しています。",
Expand Down
10 changes: 5 additions & 5 deletions src/variety-common/Answer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ pzpr.classmgr.makeCommon({

//--------------------------------------------------------------------------------
// ans.getLineShapeInfo() 丸などで区切られた線を探索し情報を設定する
// ans.serachLineShapeInfo() 丸などで区切られた線を探索します
// ans.searchLineShapeInfo() 丸などで区切られた線を探索します
//--------------------------------------------------------------------------------
getLineShapeInfo: function() {
if (this._info.num) {
Expand All @@ -1106,7 +1106,7 @@ pzpr.classmgr.makeCommon({
}

var clist = bd.cell.filter(function(cell) {
return cell.isNum();
return cell.isLineShapeEndpoint();
});
for (var i = 0; i < clist.length; i++) {
var cell = clist[i],
Expand All @@ -1118,7 +1118,7 @@ pzpr.classmgr.makeCommon({
continue;
}

var pathseg = this.serachLineShapeInfo(cell, a + 1, passed);
var pathseg = this.searchLineShapeInfo(cell, a + 1, passed);
if (!!pathseg) {
pathsegs.push(pathseg);
}
Expand All @@ -1127,7 +1127,7 @@ pzpr.classmgr.makeCommon({

return (this._info.num = pathsegs);
},
serachLineShapeInfo: function(cell1, dir, passed) {
searchLineShapeInfo: function(cell1, dir, passed) {
var pathseg = {
objs: new this.klass.BorderList(),
cells: [cell1, null], // 出発したセル、到達したセル
Expand All @@ -1143,7 +1143,7 @@ pzpr.classmgr.makeCommon({
if (pos.oncell()) {
var cell = pos.getc(),
adb = cell.adjborder;
if (cell.isnull || cell1 === cell || cell.isNum()) {
if (cell.isnull || cell1 === cell || cell.isLineShapeEndpoint()) {
break;
} else if (this.board.linegraph.iscrossing(cell) && cell.lcnt >= 3) {
} else if (dir !== 1 && adb.bottom.isLine()) {
Expand Down
Loading

0 comments on commit a134d23

Please sign in to comment.