diff --git a/src-ui/changes.html b/src-ui/changes.html index 3130b277b..2a2ffceaf 100644 --- a/src-ui/changes.html +++ b/src-ui/changes.html @@ -33,13 +33,13 @@
Latest types (all types)
diff --git a/src-ui/img/edamame.png b/src-ui/img/edamame.png new file mode 100644 index 000000000..a32ad9070 Binary files /dev/null and b/src-ui/img/edamame.png differ diff --git a/src-ui/js/ui/KeyPopup.js b/src-ui/js/ui/KeyPopup.js index 9ff23d200..695a7dfe0 100644 --- a/src-ui/js/ui/KeyPopup.js +++ b/src-ui/js/ui/KeyPopup.js @@ -246,6 +246,7 @@ ui.keypopup = { keywest: [4, 4], oasis: [10, 0], bhaibahan: [10, 0], + edamame: [4, 0], heavydots: [10, 0], marutaring: [10, 0] }, diff --git a/src-ui/js/ui/Misc.js b/src-ui/js/ui/Misc.js index c6b2c3341..6fabe438a 100755 --- a/src-ui/js/ui/Misc.js +++ b/src-ui/js/ui/Misc.js @@ -143,6 +143,7 @@ function toBGimage(pid) { "dotchi2", "doubleback", "easyasabc", + "edamame", "energywalk", "evolmino", "fakearrow", diff --git a/src-ui/list.html b/src-ui/list.html index 8b454e16b..e1b49aa4f 100644 --- a/src-ui/list.html +++ b/src-ui/list.html @@ -413,6 +413,7 @@

パズルの種類のリスト
  • +
  • diff --git a/src/puzzle/MouseInput.js b/src/puzzle/MouseInput.js index dc4547fe1..7d281e22d 100644 --- a/src/puzzle/MouseInput.js +++ b/src/puzzle/MouseInput.js @@ -442,7 +442,7 @@ pzpr.classmgr.makeCommon({ this.savedInputMode[this.puzzle.editmode ? "edit" : "play"] = mode; this.puzzle.redraw(); } else { - throw Error("Invalid input mode :" + mode); + throw Error("Invalid input mode: " + mode); } }, getInputModeList: function(type) { diff --git a/src/pzpr/variety.js b/src/pzpr/variety.js index c2e0cad79..7e10b4c34 100755 --- a/src/pzpr/variety.js +++ b/src/pzpr/variety.js @@ -158,6 +158,7 @@ dotchi2: [0, 0, "ドッチドッチループ", "Dotchi Dotchi Loop", "country"], doubleback: [0, 0, "Double Back", "Double Back", "country"], easyasabc: [0, 0, "ABCプレース", "Easy as ABC"], + edamame: [0, 0, "Edamame", "Edamame", "kaidan"], energywalk: [0, 0, "Energy Walk", "Energy Walk", "icewalk"], evolmino: [0, 0, "シンカミノ", "Evolmino"], factors: [0, 0, "因子の部屋", "Rooms of Factors"], diff --git a/src/res/failcode.en.json b/src/res/failcode.en.json index c1dfb8f99..96528701b 100644 --- a/src/res/failcode.en.json +++ b/src/res/failcode.en.json @@ -447,6 +447,7 @@ "csDivide.shugaku": "The aisle is divided.", "csDivide": "The shaded cells are divided.", "csDivide8.mochikoro": "The unshaded cells are divided.", + "csGt1.edamame": "A rectangle has more than one circle in the middle.", "csGt1.nothree": "A dot overlaps more than one shaded cell.", "csGt1.sumiwake": "A circle overlaps more than one shaded cell.", "csGt1.takoyaki": "A line has more than one circle in the middle.", @@ -455,6 +456,7 @@ "csGtLimit.kissing": "Two blocks are adjacent in an invalid location.", "csGtN.isowatari": "The size of a mass of shaded cells is greater than the indicated number.", "csLoop.parquet": "There is a loop of shaded cells.", + "csLt1.edamame": "A rectangle has no circle in the middle.", "csLt1.nothree": "A dot doesn't overlap a shaded cell.", "csLt1.sumiwake": "A circle doesn't overlap a shaded cell.", "csLt1.takoyaki": "A line has no circle in the middle.", @@ -468,6 +470,7 @@ "csNoSupport.aquarium": "A water cell is next to or above an empty cell.", "csNotBottom.dosufuwa": "An iron ball is not on the bottom of the row or on another iron ball.", "csNotOnShade.tawa": "There are no shaded cells under a shaded cell.", + "csNotOnLine.edamame": "A circle is not inside a rectangle.", "csNotRect": "A mass of shaded cells is not rectangle.", "csNotSquare": "A group of shaded cells is not a square.", "csOnArrow": "A cell with a clue is shaded.", @@ -485,6 +488,7 @@ "cuDivide.wittgen": "The cells not used by rectangles are divided.", "cuDivide": "The unshaded cells are divided.", "cuDivideRB": "The unshaded cells are divided.", + "cuEndpoint.edamame": "The corner of a rectangle does not have a circle.", "cuEndpoint.takoyaki": "An endpoint does not have a circle.", "cuLt2.sansaroad": "An empty cell is adjacent to less than 2 unshaded cells.", "cuLt3.sansaroad": "A triangle is adjacent to less than 3 unshaded cells.", diff --git a/src/variety-common/MouseInput.js b/src/variety-common/MouseInput.js index dd483d8c2..ea4cf68bc 100644 --- a/src/variety-common/MouseInput.js +++ b/src/variety-common/MouseInput.js @@ -357,9 +357,9 @@ pzpr.classmgr.makeCommon({ } if (this.inputData !== null) { } else if (this.inputMode === "bgcolor1") { - this.inputMode = cell.qsub !== 1 ? 11 : 10; + this.inputData = cell.qsub !== 1 ? 11 : 10; } else if (this.inputMode === "bgcolor2") { - this.inputMode = cell.qsub !== 2 ? 12 : 10; + this.inputData = cell.qsub !== 2 ? 12 : 10; } else if (this.btn === "left") { if (cell.qsub === 0) { this.inputData = 11; diff --git a/src/variety/kaidan.js b/src/variety/kaidan.js index 5db448dc0..80f084d0c 100644 --- a/src/variety/kaidan.js +++ b/src/variety/kaidan.js @@ -4,7 +4,7 @@ } else { pzpr.classmgr.makeCustom(pidlist, classbase); } -})(["kaidan", "takoyaki", "wittgen", "zabajaba"], { +})(["kaidan", "takoyaki", "wittgen", "zabajaba", "edamame"], { MouseEvent: { use: true, RBShadeCell: true, @@ -13,13 +13,17 @@ play: ["line", "mark-circle", "peke", "subcross", "completion"] }, mouseinput: function() { - var mode = this.inputMode; - if (mode === "shade") { - this.inputFixedNumber(-2); - } else if (mode === "subcross" || mode === "mark-circle") { - this.inputShade(); - } else { - this.common.mouseinput.call(this); + switch (this.inputMode) { + case "shade": + this.inputFixedNumber(-2); + break; + case "subcross": + case "mark-circle": + this.inputShade(); + break; + default: + this.common.mouseinput.call(this); + break; } }, decIC: function(cell) { @@ -27,13 +31,58 @@ this.inputData = cell.qans !== 1 ? 1 : 0; } else if (this.inputMode === "subcross") { this.inputData = cell.qsub !== 1 ? 2 : 0; + } else if (this.pid === "edamame") { + this.decIC_edamame(cell); } else { this.common.decIC.call(this, cell); } }, + inputDotOrDrag: function() { + if (this.mousestart) { + if (this.puzzle.key.isALT) { + this.isDraggingBG = 1; + } else if (this.btn === "left" && this.getcell().qsub === 2) { + // Copy dots + this.isDraggingBG = 2; + this.inputData = 2; + this.initFirstCell(this.getcell()); + } else { + this.isDraggingBG = 0; + } + } + if (this.isDraggingBG === 2 && this.mouseend && this.notInputted()) { + var cell = this.getcell(); + if (!cell.isnull && cell === this.firstCell) { + cell.setQsub(0); + cell.draw(); + } + return true; + } + if (this.isDraggingBG) { + this.inputDot(); + return true; + } + return false; + }, mouseinput_auto: function() { if (this.puzzle.playmode) { + if (this.pid === "edamame" && this.inputDotOrDrag()) { + return; + } + if (this.btn === "right") { + if ( + this.pid === "edamame" && + this.firstCell && + this.firstCell.isNum() + ) { + var cell = this.getcell(); + if (!cell.isnull && !cell.isNum()) { + this.firstCell = cell; + this.inputData = null; + } + } + this.inputdragcross(); } else { this.inputLine(); @@ -54,7 +103,17 @@ } if (this.pid !== "takoyaki" && cell.lcnt === 1 && this.btn === "left") { - cell.setLineVal(+!cell.line); + if (this.pid !== "edamame") { + cell.setLineVal(+!cell.line); + } else if (!cell.qans) { + cell.setQans(1); + cell.setQsub(0); + } else if (!cell.line) { + cell.setLineVal(1); + } else { + cell.setLineVal(0); + cell.setQans(0); + } cell.draw(); } else if (cell.isNum()) { this.inputqcmp(); @@ -101,7 +160,7 @@ this.common.mousereset.call(this); } }, - "MouseEvent@kaidan,wittgen": { + "MouseEvent@kaidan,wittgen,edamame": { inputLine: function() { var cell = this.getcell(); var addcmp = false; @@ -174,6 +233,70 @@ } } }, + "MouseEvent@edamame#1": { + RBShadeCell: false, + inputModes: { + edit: ["number", "undef", "clear"], + play: [ + "line", + "mark-circle", + "peke", + "subcross", + "objblank", + "completion" + ] + }, + inputDot: function() { + this.inputFixedQsub(2); + }, + decIC_edamame: function(cell) { + if (this.puzzle.getConfig("use") === 1) { + if (this.btn === "left") { + this.inputData = cell.qans !== 1 ? 1 : 0; + } else if (cell.qsub === 1) { + this.inputData = cell.lcnt > 0 ? 0 : 3; + } else { + this.inputData = cell.qsub === 2 ? 0 : 2; + } + } else { + var current = cell.qsub > 0 ? cell.qsub + 1 : cell.qans; + var next = this.btn === "left" ? current + 1 : current - 1; + next = (next + 4) % 4; + + if (cell.lcnt > 0 && next === 3) { + next = this.btn === "left" ? 0 : 2; + } + + this.inputData = next; + } + }, + inputcell: function() { + var cell = this.getcell(); + if (cell.isnull || cell === this.mouseCell) { + return; + } + if (this.inputData === null) { + this.decIC(cell); + } + + this.mouseCell = cell; + this.initFirstCell(cell); + + if (!cell.allowShade()) { + return; + } + + if (this.inputData <= 1) { + cell.setQans(this.inputData); + cell.setQsub(0); + } else { + cell.setQans(0); + cell.setQsub(this.inputData - 1); + } + + cell.draw(); + } + }, "MouseEvent@wittgen#1": { inputModes: { edit: ["number", "undef", "clear"], @@ -239,7 +362,7 @@ KeyEvent: { enablemake: true }, - "Border@kaidan": { + "Border@kaidan,edamame": { prehook: { line: function(num) { return (num && this.isLineNG()) || this.checkFormCurve(num); @@ -408,10 +531,15 @@ this.adjborder[dir].setLineVal(0); } } + }, + line: function(val) { + if (val && this.pid === "edamame") { + this.setQans(1); + } } } }, - "Cell@takoyaki": { + "Cell@takoyaki,edamame": { noLP: function(dir) { return this.isNum(); }, @@ -419,6 +547,19 @@ return this.qnum === -1; } }, + "Cell@edamame#1": { + isUnshade: function() { + return !this.isnull && this.lcnt === 0 && !this.isShade(); + }, + isDot: function() { + return this.qsub === 2 && this.lcnt === 0; + }, + prehook: { + qsub: function(num) { + return num === 2 && (this.isNum() || this.lcnt > 0 || this.qans); + } + } + }, "Cell@wittgen,zabajaba": { isUnshade: function() { return this.lcnt === 0; @@ -473,6 +614,14 @@ return !cell.noLP(); } }, + "AreaUnshadeGraph@edamame": { + enabled: true, + relation: { "border.line": "block", "cell.qans": "node" }, + modifyOtherInfo: function(border, relation) { + this.setEdgeByNodeObj(border.sidecell[0]); + this.setEdgeByNodeObj(border.sidecell[1]); + } + }, "AreaUnshadeGraph@wittgen,zabajaba": { enabled: true, relation: { "border.line": "block" }, @@ -490,9 +639,17 @@ paint: function() { this.drawBGCells(); - this.drawGrid(); + if (this.pid === "edamame") { + this.drawDashedGrid(); + } else { + this.drawGrid(); + } - if (this.pid !== "wittgen" && this.pid !== "zabajaba") { + if ( + this.pid !== "wittgen" && + this.pid !== "zabajaba" && + this.pid !== "edamame" + ) { this.drawQuesCells(); } this.drawQuesNumbers(); @@ -504,12 +661,16 @@ this.drawDotCells(); this.drawMBs(); } + if (this.pid === "edamame") { + this.drawDotCells(); + } this.drawLines(); if ( this.pid === "kaidan" || this.pid === "wittgen" || - this.pid === "zabajaba" + this.pid === "zabajaba" || + this.pid === "edamame" ) { this.drawLineEnds(); } @@ -520,13 +681,16 @@ this.drawTarget(); } }, - "Graphic@kaidan,takoyaki#2": { + "Graphic@kaidan,takoyaki#3": { hideHatena: true, - mbcolor: "rgb(127,127,255)", fontShadecolor: "white", getQuesNumberColor: function(cell) { return cell.qcmp === 1 ? this.qcmpcolor : this.fontShadecolor; - }, + } + }, + "Graphic@kaidan,takoyaki,edamame#2": { + mbcolor: "rgb(127,127,255)", + circlestrokecolor: "black", getCircleStrokeColor: function(cell) { if (cell.qans === 1) { @@ -535,7 +699,7 @@ } else if (cell.trial) { return this.trialcolor; } else { - return this.quescolor; + return this.circlestrokecolor; } } return null; @@ -555,7 +719,7 @@ py, shrink = this.pid === "kaidan" && cell.lcnt; g.vid = "c_MB2_" + cell.id; - if (cell.qsub > 0) { + if (cell.qsub === 1) { px = cell.bx * this.bw; py = cell.by * this.bh; g.lineWidth = (1 + this.cw / 40) | 0; @@ -567,11 +731,13 @@ } } }, - "Graphic@kaidan,wittgen,zabajaba": { + "Graphic@kaidan,wittgen,zabajaba,edamame": { + doubleLineWidth: 0.5, + drawLines: function() { var g = this.vinc("line", "crispEdges"); - var mx = this.bw / 2; - var my = this.bh / 2; + var mx = this.bw * this.doubleLineWidth; + var my = this.bh * this.doubleLineWidth; var blist = this.range.borders; for (var i = 0; i < blist.length; i++) { @@ -623,8 +789,8 @@ }, drawLineEnds: function() { var g = this.vinc("lineends", "auto"); - var mx = this.bw / 2; - var my = this.bh / 2; + var mx = this.bw * this.doubleLineWidth; + var my = this.bh * this.doubleLineWidth; var clist = this.range.cells; for (var i = 0; i < clist.length; i++) { var cell = clist[i], @@ -698,21 +864,27 @@ } }, "Graphic@wittgen#2": { - qsubcolor1: "rgb(224, 224, 255)", + qsubcolor1: "rgb(224, 224, 255)" + }, + "Graphic@wittgen,edamame#3": { getBGCellColor: function(cell) { if (cell.error === 1 || cell.qinfo === 1) { return this.errbcolor1; } - if (cell.qsub === 1) { + if ( + (this.pid === "wittgen" && cell.qsub === 1) || + (this.pid === "edamame" && cell.qans === 1) + ) { return this.qsubcolor1; } + if (cell.lcnt === 0) { return null; } var isTrial = !!cell.trial; for (var dir in cell.adjborder) { - if (cell.adjborder[dir].error) { + if (cell.adjborder[dir].error > 0) { return this.errbcolor1; } if (cell.adjborder[dir].trial) { @@ -723,6 +895,20 @@ return isTrial ? "rgb(222,222,222)" : this.qsubcolor1; } }, + "Graphic@edamame": { + circleratio: [0.25, 0.2], + doubleLineWidth: 0.7, + qanscolor: "black", + qsubcolor1: "rgba(200, 255, 200, 0.68)", + circlestrokecolor: "rgb(0, 160, 0)", + + getQuesNumberColor: function(cell) { + if ((cell.error || cell.qinfo) === 1) { + return this.errcolor1; + } + return cell.qcmp ? this.qcmpcolor : this.quescolor; + } + }, Encode: { decodePzpr: function(type) { @@ -762,6 +948,9 @@ if (val & 8) { cell.qcmp = 1; } + if (val & 16) { + cell.qsub = 2; + } }); this.decodeBorderLine(); }, @@ -771,8 +960,16 @@ this.encodeCell(function(cell) { var ans = hasQans ? cell.qans === 1 : cell.qsub === 2; var sub = cell.qsub === 1; + var sub2 = cell.qsub === 2 && hasQans; - return (+ans | (cell.line << 1) | (+sub << 2) | (cell.qcmp << 3)) + " "; + var value = + +ans | + (cell.line << 1) | + (+sub << 2) | + (cell.qcmp << 3) | + (+sub2 << 4); + + return value + " "; }); this.encodeBorderLine(); } @@ -903,40 +1100,42 @@ return cell.qans === 1 && cell.path ? cell.path.id : -1; }); }, - checkNumberOfMiddle: function() { + checkLoop: function() { var paths = this.board.linegraph.components; for (var r = 0; r < paths.length; r++) { var path = paths[r]; - var circles = path.clist.filter(function(c) { - return c.lcnt >= 2 && c.qans === 1; - }); - if (circles.length <= 1) { + if (path.circuits === 0) { continue; } - this.failcode.add("csGt1"); + this.failcode.add("laLoop"); if (this.checkOnly) { break; } this.board.border.setnoerr(); path.setedgeerr(1); - circles.seterr(1); } - }, - checkLoop: function() { + } + }, + "AnsCheck@takoyaki,edamame#2": { + checkNumberOfMiddle: function() { var paths = this.board.linegraph.components; for (var r = 0; r < paths.length; r++) { var path = paths[r]; - if (path.circuits === 0) { + var circles = path.clist.filter(function(c) { + return c.lcnt >= 2 && c.qans === 1; + }); + if (circles.length <= 1) { continue; } - this.failcode.add("laLoop"); + this.failcode.add("csGt1"); if (this.checkOnly) { break; } this.board.border.setnoerr(); path.setedgeerr(1); + circles.seterr(1); } }, checkNoMiddle: function() { @@ -1092,7 +1291,28 @@ this.checkDir8(-1, "nmLineLt"); } }, + "AnsCheck@edamame#1": { + checklist: [ + "checkLineOverlap", + "checkDir4ShadeOver", + "checkNumberOfMiddle", + "checkConnectUnshade", + "checkDir4ShadeLess", + "checkEndpoints", + "checkNoMiddle", + "checkCircleWithoutLine", + "checkMissingEnd" + ], + checkCircleWithoutLine: function() { + this.checkAllCell(function(cell) { + return cell.qans === 1 && cell.lcnt === 0; + }, "csNotOnLine"); + } + }, "FailCode@takoyaki": { lnOnShade: "lnOnShade" + }, + "FailCode@edamame": { + cuDivide: "cuDivide.wittgen" } }); diff --git a/test/script/edamame.js b/test/script/edamame.js new file mode 100644 index 000000000..5e7898e3b --- /dev/null +++ b/test/script/edamame.js @@ -0,0 +1,143 @@ +/* edamame.js */ + +ui.debug.addDebugData("edamame", { + url: "5/5/0cjcgbiaj", + failcheck: [ + [ + "csLt1", + "pzprv3/edamame/5/5/0 2 . . . /. . . 2 . /. . 1 . . /. . . 0 . /. . . . . /0 0 3 1 3 /0 3 0 0 3 /0 1 0 0 0 /0 3 0 0 0 /0 0 0 0 3 /0 0 1 1 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 0 /0 1 0 0 1 /0 1 0 0 1 /0 0 0 0 1 /" + ], + [ + "csGt1", + "pzprv3/edamame/5/5/0 2 . . . /. . . 2 . /. . 1 . . /. . . 0 . /. . . . . /0 0 0 0 3 /0 0 0 0 1 /0 0 0 0 1 /0 0 0 0 0 /0 0 0 0 3 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 1 /0 0 0 0 1 /0 0 0 0 1 /0 0 0 0 1 /" + ], + [ + "cuEndpoint", + "pzprv3/edamame/5/5/0 2 . . . /. . . 2 . /. . 1 . . /. . . 0 . /. . . . . /0 0 3 1 2 /0 3 0 0 3 /0 1 0 0 1 /0 3 0 0 0 /0 0 0 0 3 /0 0 1 1 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 0 /0 1 0 0 1 /0 1 0 0 1 /0 0 0 0 1 /" + ], + [ + "nmShadeGt", + "pzprv3/edamame/5/5/0 2 . . . /. . . 2 . /. . 1 . . /. . . 0 . /. . . . . /0 0 3 1 3 /0 0 0 0 3 /0 0 0 0 0 /0 0 0 0 1 /0 0 0 0 3 /0 0 1 1 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 0 /0 0 0 0 1 /0 0 0 0 1 /0 0 0 0 1 /" + ], + [ + "nmShadeLt", + "pzprv3/edamame/5/5/0 2 . . . /. . . 2 . /. . 1 . . /. . . 0 . /. . . . . /0 0 3 1 3 /0 0 0 0 3 /0 0 0 0 1 /0 0 0 0 0 /0 0 0 0 3 /0 0 1 1 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 0 /0 0 0 0 1 /0 0 0 0 1 /0 0 0 0 1 /" + ], + [ + "csNotOnLine", + "pzprv3/edamame/5/5/0 2 . . . /. . . 2 . /. . 1 . . /. . . 0 . /. . . . . /0 0 3 1 3 /0 1 0 0 3 /0 1 0 0 1 /0 0 0 0 0 /0 0 0 0 3 /0 0 1 1 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 0 /0 0 0 0 1 /0 0 0 0 1 /0 0 0 0 1 /" + ], + [ + "cuDivide", + "pzprv3/edamame/5/5/0 2 . . . /. . . 2 . /. . 1 . . /. . . 0 . /. . . . . /0 0 3 1 3 /0 3 0 0 3 /0 1 0 0 1 /0 0 0 0 0 /0 3 0 0 3 /0 0 1 1 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 0 /0 1 0 0 1 /0 1 0 0 1 /0 1 0 0 1 /" + ], + [ + "laCurve", + "pzprv3/edamame/5/5/0 2 . . . /. . . 2 . /. . 1 . . /. . . 0 . /. . . . . /0 0 0 0 0 /0 0 0 0 0 /3 0 0 0 0 /1 1 3 0 0 /3 0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /1 1 0 0 /0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /1 0 0 0 0 /1 0 0 0 0 /" + ], + [ + "ceNoEnd", + "pzprv3/edamame/5/5/0 2 . . . /. . . 2 . /. . 1 . . /. . . 0 . /. . . . . /0 0 1 1 3 /0 3 0 0 3 /0 1 0 4 1 /0 3 0 0 0 /0 0 0 0 3 /0 0 1 1 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 0 /0 1 0 0 1 /0 1 0 0 1 /0 0 0 0 1 /" + ], + [ + null, + "pzprv3/edamame/5/5/0 2 . . . /. . . 2 . /. . 1 . . /. . . 0 . /. . . . . /0 0 3 1 3 /0 3 0 0 3 /0 1 0 0 1 /0 3 0 0 0 /0 0 0 0 3 /0 0 1 1 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 0 /0 1 0 0 1 /0 1 0 0 1 /0 0 0 0 1 /" + ] + ], + inputs: [ + { + input: [ + "newboard,3,2", + "playmode", + "mouse,left,1,1", + "mouse,right,3,1", + "mouse,alt+left,5,1" + ], + result: + "pzprv3/edamame/2/3/. . . /. . . /1 4 16 /0 0 0 /0 0 /0 0 /0 0 0 /" + }, + { + input: ["mouse,left,1,3,3,3", "mouse,left,1,3", "mouse,leftx2,3,3"], + result: + "pzprv3/edamame/2/3/. . . /. . . /1 4 16 /1 3 0 /0 0 /1 0 /0 0 0 /" + }, + { + input: ["mouse,left,1,3,3,3", "mouse,left,5,1,5,3,3,3,3,1"], + result: + "pzprv3/edamame/2/3/. . . /. . . /1 16 16 /1 1 16 /0 0 /0 0 /0 0 0 /" + }, + { + label: "Cycle through options", + input: [ + "setconfig,use,2", + "mouse,left,5,1", + "mouse,leftx2,3,1", + "mouse,left,3,3", + "mouse,leftx2,1,3" + ], + result: + "pzprv3/edamame/2/3/. . . /. . . /1 1 0 /16 4 16 /0 0 /0 0 /0 0 0 /" + }, + { + input: ["mouse,right,3,1", "mouse,right,5,1", "mouse,right,5,3"], + result: + "pzprv3/edamame/2/3/. . . /. . . /1 0 16 /16 4 4 /0 0 /0 0 /0 0 0 /" + }, + { + input: [ + "playmode,mark-circle", + "mouse,left,1,3", + "playmode,subcross", + "mouse,left,3,1" + ], + result: + "pzprv3/edamame/2/3/. . . /. . . /1 4 16 /1 4 4 /0 0 /0 0 /0 0 0 /" + }, + { + input: ["playmode,objblank", "mouse,left,3,1,3,3", "mouse,left,5,1,3,1"], + result: + "pzprv3/edamame/2/3/. . . /. . . /1 0 0 /1 16 4 /0 0 /0 0 /0 0 0 /" + }, + { + input: ["playmode,auto", "mouse,left,1,1,5,1", "mouse,leftx2,3,1"], + result: + "pzprv3/edamame/2/3/. . . /. . . /1 4 0 /1 16 4 /1 1 /0 0 /0 0 0 /" + }, + { + input: ["mouse,left,3,1"], + result: + "pzprv3/edamame/2/3/. . . /. . . /1 0 0 /1 16 4 /1 1 /0 0 /0 0 0 /" + }, + { + input: ["mouse,right,3,1"], + result: + "pzprv3/edamame/2/3/. . . /. . . /1 4 0 /1 16 4 /1 1 /0 0 /0 0 0 /" + }, + { + input: [ + "setconfig,use,1", + "mouse,right,3,1", + "mouse,right,3,3", + "mouse,right,5,3", + "mouse,left,1,3" + ], + result: + "pzprv3/edamame/2/3/. . . /. . . /1 0 0 /0 0 16 /1 1 /0 0 /0 0 0 /" + }, + { + input: [ + "newboard,2,2", + "editmode", + "key,1", + "playmode,auto", + "setconfig,use,1", + "mouse,right,1,1,3,1,3,3" + ], + result: "pzprv3/edamame/2/2/1 . /. . /0 4 /0 4 /0 /0 /0 0 /" + }, + { + input: ["mouse,right,1,1,3,1,3,3"], + result: "pzprv3/edamame/2/2/1 . /. . /0 16 /0 16 /0 /0 /0 0 /" + } + ] +});