|
16 | 16 | "heyablock", |
17 | 17 | "cocktail", |
18 | 18 | "martini", |
19 | | - "nuritwin" |
| 19 | + "nuritwin", |
| 20 | + "marutaring" |
20 | 21 | ], |
21 | 22 | { |
22 | 23 | //--------------------------------------------------------- |
|
36 | 37 | play: ["shade", "unshade", "number"] |
37 | 38 | } |
38 | 39 | }, |
39 | | - "MouseEvent@cocktail,nuritwin": { |
| 40 | + "MouseEvent@cocktail,nuritwin,marutaring": { |
40 | 41 | inputModes: { |
41 | 42 | edit: ["border", "number", "clear", "info-blk"], |
42 | 43 | play: ["shade", "unshade", "info-blk"] |
|
181 | 182 | Board: { |
182 | 183 | hasborder: 1 |
183 | 184 | }, |
184 | | - "Board@shimaguni,stostone,heyablock,cocktail,martini,nuritwin": { |
| 185 | + "Board@shimaguni,stostone,heyablock,cocktail,martini,nuritwin,marutaring": { |
185 | 186 | addExtraInfo: function() { |
186 | 187 | this.stonegraph = this.addInfoList(this.klass.AreaStoneGraph); |
187 | 188 | } |
|
303 | 304 | "AreaShadeGraph@chocona": { |
304 | 305 | enabled: true |
305 | 306 | }, |
306 | | - "AreaShadeGraph@nuritwin": { |
| 307 | + "AreaShadeGraph@nuritwin,marutaring": { |
307 | 308 | enabled: true, |
308 | 309 | coloring: true |
309 | 310 | }, |
|
315 | 316 | component.hinge = null; |
316 | 317 | } |
317 | 318 | }, |
318 | | - "AreaStoneGraph:AreaShadeGraph@shimaguni,stostone,heyablock,cocktail,martini,nuritwin": { |
| 319 | + "AreaStoneGraph:AreaShadeGraph@shimaguni,stostone,heyablock,cocktail,martini,nuritwin,marutaring": { |
319 | 320 | // Same as LITS AreaTetrominoGraph |
320 | 321 | enabled: true, |
321 | 322 | relation: { "cell.qans": "node", "border.ques": "separator" }, |
|
375 | 376 | this.drawGrid(); |
376 | 377 | } |
377 | 378 |
|
378 | | - if (this.pid === "stostone" || this.pid === "nuritwin") { |
| 379 | + if ( |
| 380 | + this.pid === "stostone" || |
| 381 | + this.pid === "nuritwin" || |
| 382 | + this.pid === "marutaring" |
| 383 | + ) { |
379 | 384 | this.drawDotCells_stostone(); |
380 | 385 | } |
381 | 386 | this.drawShadedCells(); |
|
416 | 421 | ); |
417 | 422 | } |
418 | 423 | }, |
419 | | - "Graphic@stostone,nuritwin#1": { |
| 424 | + "Graphic@stostone,nuritwin,marutaring#1": { |
420 | 425 | irowakeblk: true, |
421 | 426 | bgcellcolor_func: "error1", |
422 | 427 | bcolor: "rgb(80, 204, 80)", |
|
630 | 635 | "doneShadingDecided" |
631 | 636 | ] |
632 | 637 | }, |
| 638 | + "AnsCheck@marutaring#1": { |
| 639 | + checklist: [ |
| 640 | + "checkShadeCellExist+", |
| 641 | + "check2x2ShadeCell", |
| 642 | + "checkShadeRect", |
| 643 | + "checkShadeBranch", |
| 644 | + "checkNoShadeCellInArea", |
| 645 | + "checkShadeCellCount", |
| 646 | + "checkConnectShade", |
| 647 | + "checkShadeDeadEnd" |
| 648 | + ] |
| 649 | + }, |
633 | 650 | "AnsCheck@shimaguni,stostone,heyablock,cocktail,martini": { |
634 | 651 | checkSideAreaShadeCell: function() { |
635 | 652 | this.checkSideAreaCell( |
|
1006 | 1023 | return Array.from(set); |
1007 | 1024 | } |
1008 | 1025 | }, |
| 1026 | + "AnsCheck@marutaring": { |
| 1027 | + checkNeighborCount: function(sign, error) { |
| 1028 | + this.checkAllCell(function(cell) { |
| 1029 | + return ( |
| 1030 | + cell.isShade() && |
| 1031 | + (cell.countDir4Cell(function(adj) { |
| 1032 | + return adj.isShade(); |
| 1033 | + }) - |
| 1034 | + 2) * |
| 1035 | + sign > |
| 1036 | + 0 |
| 1037 | + ); |
| 1038 | + }, error); |
| 1039 | + }, |
| 1040 | + |
| 1041 | + checkShadeBranch: function() { |
| 1042 | + this.checkNeighborCount(+1, "shBranch"); |
| 1043 | + }, |
| 1044 | + checkShadeDeadEnd: function() { |
| 1045 | + this.checkNeighborCount(-1, "shDeadEnd"); |
| 1046 | + }, |
| 1047 | + |
| 1048 | + checkShadeRect: function() { |
| 1049 | + this.checkAllArea( |
| 1050 | + this.board.stonegraph, |
| 1051 | + function(w, h, a, n) { |
| 1052 | + return w * h === a; |
| 1053 | + }, |
| 1054 | + "csNotRect" |
| 1055 | + ); |
| 1056 | + } |
| 1057 | + }, |
1009 | 1058 |
|
1010 | 1059 | FailCode: { |
1011 | 1060 | bkShadeDivide: "bkShadeDivide", |
|
0 commit comments