├── .eslintignore
├── .eslintrc.json
├── .gitignore
├── .hgignore
├── .hgtags
├── .npmignore
├── Changelog.md
├── Gruntfile.js
├── LICENSE.txt
├── README.md
├── docs
├── Config.md
├── InputModes.md
├── PublicAPI.md
├── Puzzle.md
├── PuzzleSubObject.md
├── SupportedPuzzles.md
├── ja
│ └── Changelog.md
└── pzpr.md
├── index.js
├── package.json
├── sample
├── .eslintrc.json
├── exec.js
├── html
│ ├── api_test.html
│ └── failcodes.html
├── node.js
├── node2.js
├── node3.js
└── node4.js
├── src
├── .eslintrc.json
├── common
│ ├── banner_full.js
│ ├── banner_min.js
│ ├── intro.js
│ └── outro.js
├── lib
│ ├── candle-intro.js
│ └── candle-outro.js
├── puzzle
│ ├── Address.js
│ ├── Answer.js
│ ├── AreaManager.js
│ ├── Board.js
│ ├── BoardExec.js
│ ├── Config.js
│ ├── Encode.js
│ ├── FileData.js
│ ├── GraphBase.js
│ ├── Graphic.js
│ ├── KeyInput.js
│ ├── LineManager.js
│ ├── MouseInput.js
│ ├── Operation.js
│ ├── Piece.js
│ ├── PieceList.js
│ └── Puzzle.js
├── pzpr.js
├── pzpr
│ ├── classmgr.js
│ ├── core.js
│ ├── env.js
│ ├── event.js
│ ├── metadata.js
│ ├── parser.js
│ ├── util.js
│ └── variety.js
├── variety-common
│ ├── Answer.js
│ ├── BoardExec.js
│ ├── Encode.js
│ ├── FileData.js
│ ├── Graphic.js
│ ├── KeyInput.js
│ └── MouseInput.js
└── variety
│ ├── amibo.js
│ ├── barns.js
│ ├── bdblock.js
│ ├── bonsan.js
│ ├── bosanowa.js
│ ├── box.js
│ ├── building.js
│ ├── cbblock.js
│ ├── country.js
│ ├── creek.js
│ ├── dosufuwa.js
│ ├── easyasabc.js
│ ├── factors.js
│ ├── fillmat.js
│ ├── fillomino.js
│ ├── firefly.js
│ ├── goishi.js
│ ├── gokigen.js
│ ├── hakoiri.js
│ ├── hanare.js
│ ├── hashikake.js
│ ├── hebi.js
│ ├── herugolf.js
│ ├── heyawake.js
│ ├── hitori.js
│ ├── icebarn.js
│ ├── ichimaga.js
│ ├── juosan.js
│ ├── kaero.js
│ ├── kakuro.js
│ ├── kakuru.js
│ ├── kazunori.js
│ ├── kinkonkan.js
│ ├── kouchoku.js
│ ├── kramma.js
│ ├── kurochute.js
│ ├── kurodoko.js
│ ├── kurotto.js
│ ├── kusabi.js
│ ├── lightup.js
│ ├── lits.js
│ ├── lookair.js
│ ├── loute.js
│ ├── makaro.js
│ ├── mashu.js
│ ├── mejilink.js
│ ├── minarism.js
│ ├── nagare.js
│ ├── nagenawa.js
│ ├── nanro.js
│ ├── nawabari.js
│ ├── nondango.js
│ ├── numlin.js
│ ├── nurikabe.js
│ ├── nurimaze.js
│ ├── paintarea.js
│ ├── pipelink.js
│ ├── reflect.js
│ ├── renban.js
│ ├── ripple.js
│ ├── roma.js
│ ├── shakashaka.js
│ ├── shikaku.js
│ ├── shimaguni.js
│ ├── shugaku.js
│ ├── slalom.js
│ ├── slither.js
│ ├── starbattle.js
│ ├── sudoku.js
│ ├── sukoro.js
│ ├── tapa.js
│ ├── tasquare.js
│ ├── tatamibari.js
│ ├── tateyoko.js
│ ├── tawa.js
│ ├── tentaisho.js
│ ├── tilepaint.js
│ ├── toichika.js
│ ├── triplace.js
│ ├── usoone.js
│ ├── walllogic.js
│ ├── wblink.js
│ ├── yajikazu.js
│ ├── yajirin.js
│ ├── yajitatami.js
│ ├── yinyang.js
│ └── yosenabe.js
└── test
├── .eslintrc.json
├── clonetest.html
├── debug.html
├── index_test.html
├── load_testdata.js
├── puzzle
├── answer_test.js
├── boardexec_test.js
├── config_test.js
├── encode_test.js
├── filedata_test.js
├── input_test.js
└── operation_test.js
├── pzpr
└── parser_test.js
├── script
├── for_test.js
├── test_aho.js
├── test_amibo.js
├── test_armyants.js
├── test_arukone.js
├── test_ayeheya.js
├── test_bag.js
├── test_barns.js
├── test_bdblock.js
├── test_bonsan.js
├── test_bosanowa.js
├── test_box.js
├── test_building.js
├── test_cbblock.js
├── test_chocona.js
├── test_cojun.js
├── test_country.js
├── test_creek.js
├── test_dosufuwa.js
├── test_easyasabc.js
├── test_factors.js
├── test_fillmat.js
├── test_fillomino.js
├── test_firefly.js
├── test_fivecells.js
├── test_fourcells.js
├── test_goishi.js
├── test_gokigen.js
├── test_hakoiri.js
├── test_hanare.js
├── test_hashikake.js
├── test_hebi.js
├── test_herugolf.js
├── test_heyabon.js
├── test_heyawake.js
├── test_hitori.js
├── test_icebarn.js
├── test_icelom.js
├── test_icelom2.js
├── test_ichimaga.js
├── test_ichimagam.js
├── test_ichimagax.js
├── test_juosan.js
├── test_kaero.js
├── test_kakuro.js
├── test_kakuru.js
├── test_kazunori.js
├── test_kinkonkan.js
├── test_kouchoku.js
├── test_kramma.js
├── test_kramman.js
├── test_kropki.js
├── test_kurochute.js
├── test_kurodoko.js
├── test_kurotto.js
├── test_kusabi.js
├── test_lightup.js
├── test_lits.js
├── test_lookair.js
├── test_loopsp.js
├── test_loute.js
├── test_makaro.js
├── test_mashu.js
├── test_mejilink.js
├── test_minarism.js
├── test_mochikoro.js
├── test_mochinyoro.js
├── test_moonsun.js
├── test_nagare.js
├── test_nagenawa.js
├── test_nanro.js
├── test_nawabari.js
├── test_nondango.js
├── test_norinori.js
├── test_numlin.js
├── test_nuribou.js
├── test_nurikabe.js
├── test_nurimaze.js
├── test_nurimisaki.js
├── test_onsen.js
├── test_paintarea.js
├── test_pipelink.js
├── test_pipelinkr.js
├── test_rectslider.js
├── test_reflect.js
├── test_renban.js
├── test_ringring.js
├── test_ripple.js
├── test_roma.js
├── test_sashigane.js
├── test_sato.js
├── test_shakashaka.js
├── test_shikaku.js
├── test_shimaguni.js
├── test_shugaku.js
├── test_shwolf.js
├── test_slalom.js
├── test_slither.js
├── test_starbattle.js
├── test_stostone.js
├── test_sudoku.js
├── test_sukoro.js
├── test_sukororoom.js
├── test_tapa.js
├── test_tasquare.js
├── test_tatamibari.js
├── test_tateyoko.js
├── test_tawa.js
├── test_tentaisho.js
├── test_tilepaint.js
├── test_toichika.js
├── test_triplace.js
├── test_usoone.js
├── test_usotatami.js
├── test_view.js
├── test_wagiri.js
├── test_walllogic.js
├── test_wblink.js
├── test_yajikazu.js
├── test_yajirin.js
├── test_yajitatami.js
├── test_yinyang.js
└── test_yosenabe.js
└── variety
├── aho_test.js
├── amibo_test.js
├── ayeheya_test.js
├── bag_test.js
├── gokigen_test.js
├── lits_test.js
├── onsen_test.js
├── pipelink_test.js
├── slalom_test.js
└── tapa_test.js
/.eslintignore:
--------------------------------------------------------------------------------
1 | src/lib/*.js
2 | src/common/*.js
3 |
--------------------------------------------------------------------------------
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "browser": true, // Allow to use browser defined variable (not console, alert etc.)
4 | "node": true // Allow to use node defined variable (require, process etc.)
5 | },
6 | "parserOptions": {
7 | "ecmaVersion": 5
8 | },
9 | "extends": "eslint:recommended", // Implement recommended rules
10 | "rules": {
11 | "curly": ["error", "all"], // Error for no curly brancket in loop or conditions
12 | "no-unused-vars": // Error for unused variables, not detect arguments
13 | ["error", {"args": "none"}],
14 | "no-undef": "error", // Error for unused variable (that will become global variable)
15 | "new-cap": "error", // Error for lowercase first letter or constructor call as function
16 | "eqeqeq": ["error", "always"], // Error for ==, != to compare
17 | "no-use-before-define": // Error for using variable before definition
18 | ["error", {"functions":false, "classes":false}],
19 | "comma-dangle": ["error", "never"], // Error for trailing comma
20 | "no-redeclare": "error", // Error for redefine variable
21 | //"block-scoped-var": "warn", // Warn var declaration inside block scope
22 | "no-empty": "off", // Allow empty block statements
23 | "no-useless-escape": "off", // Allow unnessesary escape charactors
24 | "no-extra-boolean-cast": "off", // Allow to use boolean cast for boolean value
25 | "no-mixed-spaces-and-tabs": "off", // Allow to use spaces and tabs for indent
26 | "dot-notation": "off", // Allow object access via obj["name"]
27 | "no-loop-func": "off" // Allow function definition in loop
28 | }
29 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | dist
2 | pzpr-*
3 | node_modules
4 | .DS_Store
5 | .eslintcache
6 |
--------------------------------------------------------------------------------
/.hgignore:
--------------------------------------------------------------------------------
1 | dist
2 | pzpr-*
3 | node_modules
4 | .DS_Store
5 | .eslintcache
6 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | .git*
2 | .hg*
3 | .DS_Store
4 |
5 | /.vscode
6 | /Gruntfile.js
7 | /docs
8 | /src
9 | *.concat.js
10 |
11 | .jshintrc
12 | .eslintrc.json
13 | .eslintignore
14 | .eslintcache
15 | /sample
16 | /test
17 | yarn.lock
18 | paclage-lock.json
19 |
--------------------------------------------------------------------------------
/Gruntfile.js:
--------------------------------------------------------------------------------
1 | module.exports = function(grunt){
2 | var pkg = grunt.file.readJSON('package.json'), deps = pkg.devDependencies;
3 | for(var plugin in deps){ if(plugin.match(/^grunt\-/)){ grunt.loadNpmTasks(plugin);}}
4 |
5 | var fs = require('fs');
6 | var banner_min = fs.readFileSync('./src/common/banner_min.js', 'utf-8');
7 | var banner_full = fs.readFileSync('./src/common/banner_full.js', 'utf-8');
8 |
9 | var PRODUCTION = (grunt.cli.tasks.indexOf('release') >= 0);
10 |
11 | grunt.initConfig({
12 | pkg: pkg,
13 |
14 | concat: {
15 | options: {
16 | banner: banner_full,
17 | process: true,
18 | },
19 | pzpr: {
20 | options: {
21 | sourceMap: !PRODUCTION
22 | },
23 | files: [
24 | { src: require('./src/pzpr.js').files, dest: 'dist/pzpr.concat.js' }
25 | ]
26 | }
27 | },
28 |
29 | uglify: {
30 | options: {
31 | banner: banner_min,
32 | report: 'min'
33 | },
34 | pzpr:{
35 | options: (PRODUCTION ? {} : {
36 | sourceMap : 'dist/pzpr.js.map',
37 | sourceMapIn : 'dist/pzpr.concat.js.map',
38 | sourceMapIncludeSources : true
39 | }),
40 | files: [
41 | { src: 'dist/pzpr.concat.js', dest: 'dist/pzpr.js'}
42 | ]
43 | },
44 | variety:{
45 | options: (PRODUCTION ? {} : {
46 | sourceMap : function(filename){ return filename+'.map';}
47 | }),
48 | files: [
49 | { expand: true, cwd: 'src/variety', src: ['*.js'], dest: 'dist/pzpr-variety' }
50 | ]
51 | }
52 | }
53 | });
54 |
55 | grunt.registerTask('default', ['build']);
56 | grunt.registerTask('release', ['build']);
57 | grunt.registerTask('build', ['build:pzpr', 'build:variety']);
58 | grunt.registerTask('build:pzpr', ['newer:concat:pzpr', 'newer:uglify:pzpr']);
59 | grunt.registerTask('build:variety',['newer:uglify:variety']);
60 | };
61 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License
2 |
3 | Copyright (c) 2011, 2014 Kobayashi, Daisuke (sabo2)
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # pzpr.js
2 |
3 | ## About pzpr.js
4 |
5 | pzpr.js enables to create or edit "pencil puzzles" which we solve with specific rules on boards.
6 |
7 | This script is developed against HTML5 features and JavaScript.
8 |
9 | ## Working environment
10 |
11 | ### Browser support (Recommended)
12 | * Firefox (latest stable version; desktop/android)
13 | * Google Chrome (latest stable version; desktop/android)
14 | * Safari 10.1+ (desktop/iOS)
15 | * Microsft Edge
16 |
17 | ### Browser support (Possible)
18 | * Internet Explorer 11
19 | * Safari 9+
20 | * iOS 9.3+
21 |
22 | ### Node.js support
23 |
24 | If you want to use, simply install this module. Node.js latest LTS or later is required.
25 | pzpr.js is likely to work with older but unchecked.
26 |
27 | #### usage for node.js
28 |
29 | ```js
30 | var pzpr = require('pzpr');
31 |
32 | var puzzle = new pzpr.Puzzle({type:'player'}).open('nurikabe/5/5/g5k2o1k3g');
33 |
34 | console.log(puzzle.check().text);
35 | // -> 'An area of unshaded cells has plural numbers.'
36 | ```
37 |
38 | ## Documents
39 | * [Supported puzzles](https://github.com/sabo2/pzprjs/blob/master/docs/SupportedPuzzles.md)
40 | * [Public APIs for pzpr.js](https://github.com/sabo2/pzprjs/blob/master/docs/PublicAPI.md)
41 | * [pzpr object](https://github.com/sabo2/pzprjs/blob/master/docs/pzpr.md)
42 | * [Puzzle object](https://github.com/sabo2/pzprjs/blob/master/docs/Puzzle.md)
43 | * [Puzzle object - child objects](https://github.com/sabo2/pzprjs/blob/master/docs/PuzzleSubObject.md)
44 | * [List of puzzle config](https://github.com/sabo2/pzprjs/blob/master/docs/Config.md)
45 | * [List of mouse input modes](https://github.com/sabo2/pzprjs/blob/master/docs/InputModes.md)
46 |
47 | ## Releases
48 | * 2019/06/29 v0.11.1
49 | * 2019/06/23 v0.11.0
50 | * 2019/06/19 v0.10.1
51 | * 2019/06/15 v0.10.1-beta1
52 | * 2017/07/29 v0.10.0
53 | * 2017/04/21 v0.9.1
54 | * 2017/04/20 v0.9.0
55 | * 2017/04/16 v0.9.0-beta2
56 | * 2017/04/14 v0.9.0-beta1
57 | * 2017/02/13 v0.8.1
58 | * 2017/02/08 v0.8.0
59 | * 2017/01/09 v0.8.0-beta2
60 | * 2016/12/31 v0.8.0-beta1
61 | * 2016/12/03 v0.7.1
62 | * 2016/10/10 v0.7.0
63 | * 2016/09/19 v0.6.1
64 | * 2016/09/18 v0.6.0
65 | * 2016/09/03 v0.5.1
66 | * 2016/08/10 v0.5.0
67 | * 2016/08/02 v0.4.0
68 | * 2016/03/06 v0.3.2
69 | * 2016/03/03 v0.3.1
70 | * 2016/02/28 v0.3.0
71 | * 2016/02/16 v0.2.2
72 | * 2016/02/13 v0.2.0
73 | * 2016/02/11 v0.1.0
74 | * 2016/02/06 v0.0.2
75 | * 2016/01/31 v0.0.1
76 | * 2015/12/29 pzprv3-v3.5.2
77 | * 2015/08/16 pzprv3-v3.5.1
78 |
79 | ## ChangeLog
80 | * [ChangeLog](https://github.com/sabo2/pzprjs/blob/master/Changelog.md)
81 | * [ChangeLog (Github)](https://github.com/sabo2/pzprjs/releases)
82 | * [ChangeLog (ja)](https://github.com/sabo2/pzprjs/blob/master/docs/ja/Changelog.md)
83 |
84 | ## Links
85 | * [PUZ-PRE v3](http://pzv.jp/index_en.html)
86 |
--------------------------------------------------------------------------------
/docs/PublicAPI.md:
--------------------------------------------------------------------------------
1 | # pzpr.js API
2 |
3 | pzpr.js can be used under either browser environment or node.js.
4 |
5 | ## usage
6 |
7 | on browser
8 |
9 | ```html
10 |
11 |
12 |
13 |
14 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | ```
29 |
30 | on node.js
31 |
32 | ```js
33 | var pzpr = require('pzpr');
34 | var puzzle = new pzpr.Puzzle({type:'player'}).open('nurikabe/5/5/g5k2o1k3g');
35 |
36 | puzzle.mouse.inputPath(3,3, 3,9, 1,9, 5,9);
37 | puzzle.mouse.inputPath(5,1, 9,1, 9,5, 5,5, 7,7);
38 | console.log(puzzle.check().text);
39 | // -> 'Complete!'
40 | ```
41 |
42 | ## List of document
43 |
44 | * [pzpr object](pzpr.md)
45 | * [Puzzle object](Puzzle.md)
46 | * [List of puzzle config](Config.md)
47 |
--------------------------------------------------------------------------------
/docs/ja/Changelog.md:
--------------------------------------------------------------------------------
1 |
2 | ## Version 0.11.1
3 |
4 | Release date: 2019/6/29
5 |
6 | #### BugFix
7 |
8 | * Tapa: 盤面に?がある時の正答判定が失敗する不具合を修正 (#7)
9 | * ナンロー: 回答チェックで○がある時は正答としないように修正 (#8)
10 |
11 | #### Minor Changes
12 |
13 | * さとがえり: Graphicクラスのautocmp設定値をnumberからroom_numberに変更
14 |
15 | ## Version 0.11.0
16 |
17 | Release date: 2019/6/23
18 |
19 | #### 新パズル
20 |
21 | * ★さとがえり、ぬりみさきを追加しました
22 |
23 | ## Version 0.10.1
24 |
25 | Release date: 2019/6/19
26 |
27 | ## Version 0.10.1-beta1
28 |
29 | Release date: 2019/6/15
30 |
31 | #### 機能改善
32 |
33 | * Operation: 盤面への入力を行った時間を保持するように変更した
34 | * Graphic: いくつかのパズルで背景色を塗る範囲の修正を行った
35 | * 美術館, シャカシャカ: クリックで数字の背景をグレーにできるようにした
36 | * シャカシャカ: 2辺以上が白マスでない場合三角形やドットの形を推測して置くことができるようにした
37 | * へやわけ, ∀人∃HEYA: 盤面の部屋が四角でなくてもエラー扱いしないようにした
38 | * たわむれんが: 下に黒マスがない場合のエラー表示で下のセルを赤く表示しないようにした
39 |
40 | #### バグ修正
41 |
42 | * LineManager: 交差ありループのパズルでT字になるよう線を入力した際、線のつながり計算を間違ってしまうことがあるのを修正
43 | * Cell, CellList: 数独の補助数字やTapaなど1つのセルに複数の数字があるパズルでTest時にデータが正しく取得できないことがあるのを修正
44 | * 交差は直角に限る: エラー表示時に隣の点が赤く表示されている問題の修正 (#2)
45 | * ごきげんななめ: 色分け表示時にループを太く表示できなくなっている点を修正
46 | * ウォールロジック: Undo/Redo時の描画が正しくされないのを修正
47 | * ナンバーリンク、お家へ帰ろう: 背景色が指定されたときに文字や数字の背景色が白いままなのを修正
48 |
49 | #### その他の変更
50 |
51 | * Tapa: セルの周囲にある黒マスの長さを取得するルーチン・正答判定するルーチンの変更
52 | * test: Test時に一時的に生成するamibo.svgファイルが残ったままになるのを修正
53 | * project: devDependenciesにmochaを追加
54 | * project: Gruntを使用していたいくつかのコンパイルルールをnpm-run-scriptsで行うよう変更
55 | * project: JSHintの代わりにESLintを使用するよう変更
56 | * project: ESLintでエラー扱いされるコードを修正
57 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 |
2 | module.exports = require('./dist/pzpr.js');
3 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "pzpr",
3 | "version": "0.11.1",
4 | "description": "Scripts for handling puzzle objects",
5 | "main": "./index.js",
6 | "directories": {
7 | "test": "test"
8 | },
9 | "keywords": [
10 | "puzzle",
11 | "HTML5"
12 | ],
13 | "author": "sabo2",
14 | "license": "MIT",
15 | "repository": {
16 | "type": "git",
17 | "url": "https://github.com/sabo2/pzprjs"
18 | },
19 | "homepage": "https://github.com/sabo2/pzprjs",
20 | "engines": {
21 | "node": ">= 5.6.0"
22 | },
23 | "scripts": {
24 | "build": "eslint --cache --quiet src && grunt default",
25 | "release": "npm run clean && eslint --cache --quiet src && grunt release",
26 | "clean": "del dist/* pzpr-*.{zip,tar.gz,tar.bz2,tgz}",
27 | "lint": "eslint src test sample",
28 | "test": "eslint --quiet src test && mocha -R progress --recursive test",
29 | "prepublishOnly": "npm test"
30 | },
31 | "devDependencies": {
32 | "del-cli": "^2.0.0",
33 | "eslint": "^5.16.0",
34 | "grunt": "^1.0.1",
35 | "grunt-contrib-concat": "^1.0.1",
36 | "grunt-contrib-uglify": "^2.0.0",
37 | "grunt-newer": "^1.1.1",
38 | "mocha": "^6.1.4"
39 | },
40 | "dependencies": {
41 | "pzpr-canvas": "^0.8.2"
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/sample/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "node": true // Allow to use node defined variable (require, process etc.)
4 | },
5 | "parserOptions": {
6 | "ecmaVersion": 6 // Allow es.next features
7 | },
8 | "extends": "eslint:recommended", // Implement recommended rules
9 | "rules": {
10 | "curly": ["error", "all"], // Error for no curly brancket in loop or conditions
11 | "no-unused-vars": // Error for unused variables, not detect arguments
12 | ["error", {"args": "none"}],
13 | "no-undef": "error", // Error for unused variable (that will become global variable)
14 | "new-cap": "error", // Error for lowercase first letter or constructor call as function
15 | "eqeqeq": ["error", "always"], // Error for ==, != to compare
16 | "no-use-before-define": // Error for using variable before definition
17 | ["error", {"functions":false, "classes":false}],
18 | "comma-dangle": ["error", "never"], // Error for trailing comma
19 | "no-redeclare": "error", // Error for redefine variable
20 | //"block-scoped-var": "warn", // Warn var declaration inside block scope
21 | "no-empty": "off", // Allow empty block statements
22 | "no-console": "off", // Allow to use console
23 | "no-useless-escape": "off", // Allow unnessesary escape charactors
24 | "no-extra-boolean-cast": "off", // Allow to use boolean cast for boolean value
25 | "no-mixed-spaces-and-tabs": "off", // Allow to use spaces and tabs for indent
26 | "dot-notation": "off", // Allow object access via obj["name"]
27 | "no-loop-func": "off" // Allow function definition in loop
28 | }
29 | }
--------------------------------------------------------------------------------
/sample/exec.js:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env node
2 |
3 | var pzpr = require('../');
4 | var puzzle = new pzpr.Puzzle();
5 |
6 | puzzle.open('?nurikabe/5/5');
7 |
8 | puzzle.board.getc(1,1).setQnum(1);
9 | puzzle.board.getc(3,1).setQans(1);
10 | puzzle.board.getc(5,1).setQans(1);
11 | puzzle.board.getc(1,3).setQans(1);
12 | puzzle.board.getc(3,3).setQans(1);
13 |
14 | console.log(puzzle.check().text);
15 |
16 | try{ console.log(puzzle.getURL(1));}catch(e){}
17 | try{ console.log(puzzle.getURL(2));}catch(e){}
18 | try{ console.log(puzzle.getURL(3));}catch(e){}
19 | try{ console.log(puzzle.getURL(4));}catch(e){}
20 | try{ console.log(puzzle.getURL(5));}catch(e){}
21 | try{ console.log(puzzle.getFileData(1));}catch(e){}
22 | try{ console.log(puzzle.getFileData(2));}catch(e){}
23 | try{ console.log(puzzle.getFileData(3));}catch(e){}
24 |
--------------------------------------------------------------------------------
/sample/html/api_test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
18 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/sample/html/failcodes.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | ぱずぷれv3 FailCode一覧
8 |
15 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/sample/node.js:
--------------------------------------------------------------------------------
1 |
2 | var pzpr = require('../dist/pzpr.js');
3 |
4 | console.log(pzpr.version);
5 |
6 | var puzzle = new pzpr.Puzzle();
7 |
8 | puzzle.open('?nurikabe/5/5');
9 |
10 | puzzle.board.cell[0].setQnum(1);
11 |
12 | console.log(puzzle.check().text);
13 |
14 | try{ console.log(puzzle.getURL(1));}catch(e){}
15 | try{ console.log(puzzle.getURL(2));}catch(e){}
16 | try{ console.log(puzzle.getURL(3));}catch(e){}
17 | try{ console.log(puzzle.getURL(4));}catch(e){}
18 | try{ console.log(puzzle.getURL(5));}catch(e){}
19 | try{ console.log(puzzle.getFileData(1,{history:true}));}catch(e){}
20 | try{ console.log(puzzle.getFileData(2));}catch(e){}
21 | try{ console.log(puzzle.getFileData(3));}catch(e){}
22 |
--------------------------------------------------------------------------------
/sample/node2.js:
--------------------------------------------------------------------------------
1 |
2 | var pzpr = require('../index.js');
3 |
4 | var puzzle = new pzpr.Puzzle().open('mashu/3/3');
5 |
6 | console.log(puzzle.toDataURL(19));
7 |
--------------------------------------------------------------------------------
/sample/node3.js:
--------------------------------------------------------------------------------
1 | var pzpr = require('../dist/pzpr.js');
2 |
3 | var puzzle = new pzpr.Puzzle({height:200,width:200,config:{cursor:false}});
4 | puzzle.open('nurikabe/5/5/g5k2o1k3g');
5 | puzzle.board.cell[0].qans = 1;
6 | console.log(puzzle.toDataURL());
7 | console.log(puzzle.toBuffer(16));
8 | // console.log(puzzle.canvas.innerHTML);
9 | // console.log(puzzle.getURL());
10 | // console.log(puzzle.getFileData());
11 |
--------------------------------------------------------------------------------
/sample/node4.js:
--------------------------------------------------------------------------------
1 | var pzpr = require('../dist/pzpr.js');
2 |
3 | new pzpr.Puzzle().open('nurikabe/5/5/g5k2o1k3g', function(puzzle){
4 | puzzle.board.cell[0].qans = 1;
5 | console.log(puzzle.toDataURL());
6 | // console.log(puzzle.canvas.innerHTML);
7 | // console.log(puzzle.getURL());
8 | // console.log(puzzle.getFileData());
9 | });
10 |
--------------------------------------------------------------------------------
/src/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "browser": true, // Allow to use browser defined variable (not console, alert etc.)
4 | "node": true // Allow to use node defined variable (require, process etc.)
5 | },
6 | "parserOptions": {
7 | "ecmaVersion": 5
8 | },
9 | "globals": {
10 | "pzpr": "readonly"
11 | },
12 | "extends": "eslint:recommended", // Implement recommended rules
13 | "rules": {
14 | "curly": ["error", "all"], // Error for no curly brancket in loop or conditions
15 | "no-unused-vars": // Error for unused variables, not detect arguments
16 | ["error", {"args": "none"}],
17 | "no-undef": "error", // Error for unused variable (that will become global variable)
18 | "new-cap": "error", // Error for lowercase first letter or constructor call as function
19 | "eqeqeq": ["error", "always"], // Error for ==, != to compare
20 | "no-use-before-define": // Error for using variable before definition
21 | ["error", {"functions":false, "classes":false}],
22 | "comma-dangle": ["error", "never"], // Error for trailing comma
23 | "no-redeclare": "warn", // Warn redefine variable (TODO: make this rule error)
24 | //"block-scoped-var": "warn", // Warn var declaration inside block scope
25 | "no-empty": "off", // Allow empty block statements
26 | "no-constant-condition": // Allow constant condition in conditions
27 | ["error", {"checkLoops": false}],
28 | "no-useless-escape": "off", // Allow unnessesary escape charactors
29 | "no-extra-boolean-cast": "off", // Allow to use boolean cast for boolean value
30 | "no-mixed-spaces-and-tabs": "off", // Allow to use spaces and tabs for indent
31 | "dot-notation": "off", // Allow object access via obj["name"]
32 | "no-loop-func": "off" // Allow function definition in loop
33 | }
34 | }
--------------------------------------------------------------------------------
/src/common/banner_full.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * @license
3 | *
4 | * pzpr.js v<%= pkg.version %>
5 | * https://github.com/sabo2/pzprv3
6 | *
7 | * This script includes candle.js, see below
8 | * https://github.com/sabo2/candle
9 | *
10 | * Copyright 2009-<%= grunt.template.today('yyyy') %> <%= pkg.author %>
11 | *
12 | * This script is released under the MIT license. Please see below.
13 | * http://www.opensource.org/licenses/mit-license.php
14 | *
15 | * Date: <%= grunt.template.today('yyyy-mm-dd') %>
16 | */
17 |
--------------------------------------------------------------------------------
/src/common/banner_min.js:
--------------------------------------------------------------------------------
1 | /*! @license pzpr.js v<%= pkg.version %> (c) 2009-<%= grunt.template.today('yyyy') %> <%= pkg.author %>, MIT license
2 | * https://github.com/sabo2/pzprv3 */
3 |
--------------------------------------------------------------------------------
/src/common/intro.js:
--------------------------------------------------------------------------------
1 | // intro.js
2 |
3 | (function(){
4 |
--------------------------------------------------------------------------------
/src/common/outro.js:
--------------------------------------------------------------------------------
1 | // outro.js
2 |
3 | })();
4 |
--------------------------------------------------------------------------------
/src/lib/candle-intro.js:
--------------------------------------------------------------------------------
1 | // candle-intro.js
2 |
3 | (function(){
4 |
5 |
6 | //---------------------------------------------------------------------------
7 | // node.js環境向けの対策
8 | //---------------------------------------------------------------------------
9 | var document = this.document;
10 |
11 | var module = {exports:{}}, exports = module.exports;
12 |
13 | (function(module,exports){
14 |
--------------------------------------------------------------------------------
/src/lib/candle-outro.js:
--------------------------------------------------------------------------------
1 | // candle-outro.js
2 |
3 | })(module,exports);
4 |
5 | pzpr.Candle = module.exports;
6 |
7 | })();
8 |
9 | //---------------------------------------------------------------------------
10 | // node.js環境向けの対策
11 | //---------------------------------------------------------------------------
12 | document = this.document || pzpr.Candle.document;
13 | var DOMParser = this.DOMParser || pzpr.Candle.DOMParser;
14 | var XMLSerializer = this.XMLSerializer || pzpr.Candle.XMLSerializer;
15 |
--------------------------------------------------------------------------------
/src/pzpr.js:
--------------------------------------------------------------------------------
1 |
2 | exports.files = [
3 | "common/intro",
4 | "pzpr/core",
5 | "lib/candle-intro",
6 | "../node_modules/pzpr-canvas/dist/candle",
7 | "lib/candle-outro",
8 | "pzpr/env",
9 | "pzpr/event",
10 | "pzpr/classmgr",
11 | "pzpr/variety",
12 | "pzpr/parser",
13 | "pzpr/metadata",
14 | "pzpr/util",
15 | "puzzle/Puzzle",
16 | "puzzle/Config",
17 | "puzzle/Address",
18 | "puzzle/Piece",
19 | "puzzle/PieceList",
20 | "puzzle/Board",
21 | "puzzle/BoardExec",
22 | "puzzle/GraphBase",
23 | "puzzle/LineManager",
24 | "puzzle/AreaManager",
25 | "puzzle/Graphic",
26 | "puzzle/MouseInput",
27 | "puzzle/KeyInput",
28 | "puzzle/Encode",
29 | "puzzle/FileData",
30 | "puzzle/Answer",
31 | "puzzle/Operation",
32 | "variety-common/Graphic",
33 | "variety-common/KeyInput",
34 | "variety-common/MouseInput",
35 | "variety-common/Answer",
36 | "variety-common/BoardExec",
37 | "variety-common/Encode",
38 | "variety-common/FileData",
39 | "common/outro"
40 | ].map(function(mod){ return "src/"+mod+".js";});
41 |
--------------------------------------------------------------------------------
/src/pzpr/core.js:
--------------------------------------------------------------------------------
1 | // core.js v3.5.2
2 |
3 | //----------------------------------------------------------------------------
4 | // ★pzprオブジェクト
5 | //---------------------------------------------------------------------------
6 | /* extern */
7 | var pzpr = {
8 | version : '<%= pkg.version %>'
9 | };
10 |
11 | if(typeof module==='object' && module.exports){ module.exports = pzpr;}
12 | else{ this.pzpr = pzpr;}
13 |
--------------------------------------------------------------------------------
/src/pzpr/env.js:
--------------------------------------------------------------------------------
1 | // env.js v3.4.0
2 |
3 | /**************/
4 | /* 環境の取得 */
5 | /**************/
6 | pzpr.env = (function(){
7 | var isbrowser = pzpr.Candle.env.browser;
8 | var UA = (isbrowser ? navigator.userAgent : '');
9 |
10 | var ios = (UA.indexOf('like Mac OS X') > -1);
11 | var android = (UA.indexOf('Android') > -1);
12 | var os = {
13 | iOS : (ios),
14 | Android: (android),
15 | mobile : (ios || android)
16 | };
17 |
18 | var FireFoxVersion = (function(){
19 | if(UA.match(/Firefox\/(\w+(\.\w+)?)/)){
20 | var ver = RegExp.$1;
21 | if(UA.match(/rv\:(\d+(\.\d+)?)/)){
22 | if(RegExp.$1+0.0<=2.1){ return RegExp.$1+0.0;}
23 | }
24 | return ver;
25 | }
26 | return null;
27 | })();
28 | var ChromeVersion = (function(){
29 | if(UA.match(/Safari\/([\w\.]+)/) && UA.match(/Chrome\/(\w+(\.\w+)?)/)){
30 | return RegExp.$1;
31 | }
32 | return null;
33 | })();
34 | var SafariVersion = (function(){
35 | if(ChromeVersion===null && UA.match(/Safari\/([\w\.]+)/) && UA.match(/Version\/(\w+(\.\w+)?)/)){
36 | return RegExp.$1;
37 | }
38 | return null;
39 | })();
40 | var bz = {
41 | AndroidBrowser: (os.Android && SafariVersion),
42 | Presto: (typeof window==='object' && !!window.opera)
43 | };
44 |
45 | var api = {
46 | touchevent : isbrowser && ((!!window.ontouchstart) || (!!document.createTouch)),
47 | pointerevent : isbrowser && (!!window.PointerEvent),
48 | mspointerevent : isbrowser && (!!window.MSPointerEvent),
49 | maxWidth : isbrowser && ((ChromeVersion||1000) >= 18) && ((SafariVersion||1000) >= 6),
50 | svgTextLength : !isbrowser || ((FireFoxVersion||1000) >= 25),
51 | anchor_download : isbrowser && (document.createElement("a").download!==(void 0))
52 | };
53 |
54 | return {
55 | bz : bz,
56 | OS : os,
57 | API : api,
58 | browser : isbrowser,
59 | node : pzpr.Candle.env.node
60 | };
61 | })();
62 |
63 | pzpr.lang = (function(){
64 | var userlang = (pzpr.env.node ? process.env.LANG : (navigator.browserLanguage || navigator.language || navigator.userLanguage));
65 | return ((!userlang||userlang.substr(0,2)==='ja')?'ja':'en');
66 | })();
67 |
--------------------------------------------------------------------------------
/src/pzpr/event.js:
--------------------------------------------------------------------------------
1 | // event.js v3.4.1
2 |
3 | (function(){
4 | //---------------------------------------------------------------
5 | // 起動時関連関数
6 | //---------------------------------------------------------------
7 | var preinit = true;
8 | var loadfun = [];
9 | pzpr.on = function(eventtype, func){
10 | if(eventtype==='load'){
11 | if(preinit){ loadfun.push(func);}
12 | else{ func();}
13 | }
14 | };
15 |
16 | //----------------------------------------------------------------------
17 | // 起動時処理実行処理
18 | //----------------------------------------------------------------------
19 | function postload(e){
20 | if(preinit){
21 | preinit = false;
22 | for(var i=0;i
2 |
3 |
4 |
5 |
6 |
26 |
29 |
30 |
31 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/test/debug.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | ぱずぷれv3 Debug
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
37 |
38 |
39 |
40 |
45 |
46 |
47 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/test/load_testdata.js:
--------------------------------------------------------------------------------
1 | // test/load_testdata.js
2 |
3 | var pzpr = require('../dist/pzpr.js');
4 |
5 | // Load test data
6 | var testdata = {};
7 | global.ui = {debug:{addDebugData: function(pid,data){
8 | testdata[pid] = data;
9 | testdata[pid].fullfile = data.failcheck[data.failcheck.length-1][1];
10 | }}};
11 | pzpr.variety.each(function(pid){
12 | require('./script/test_'+pid+'.js');
13 | });
14 |
15 | module.exports = testdata;
16 |
--------------------------------------------------------------------------------
/test/puzzle/answer_test.js:
--------------------------------------------------------------------------------
1 | // test/answer_test.js
2 |
3 | var assert = require('assert');
4 |
5 | var pzpr = require('../../dist/pzpr.js');
6 |
7 | var testdata = require('../load_testdata.js');
8 |
9 | pzpr.variety.each(function(pid){
10 | describe(pid+' answer test', function(){
11 | describe('Answer check', function(){
12 | var puzzle = new pzpr.Puzzle();
13 | puzzle.setConfig('forceallcell',true);
14 | testdata[pid].failcheck.forEach(function(testcase){
15 | it('Check: '+testcase[0], function(){
16 | puzzle.open(testcase[1]);
17 | assert.equal(puzzle.check(true)[0], testcase[0]);
18 | });
19 | });
20 | });
21 | });
22 | });
23 |
--------------------------------------------------------------------------------
/test/puzzle/encode_test.js:
--------------------------------------------------------------------------------
1 | // test/encode_test.js
2 |
3 | var assert = require('assert');
4 |
5 | var pzpr = require('../../dist/pzpr.js');
6 |
7 | var testdata = require('../load_testdata.js');
8 |
9 | function assert_equal_board(bd1,bd2){
10 | bd1.compareData(bd2,function(group, c, a){
11 | assert.equal(bd2[group][c][a], bd1[group][c][a], group+'['+c+'].'+a);
12 | });
13 | }
14 |
15 | pzpr.variety.each(function(pid){
16 | describe(pid+' encode test', function(){
17 | describe('URL', function(){ (function(pid){
18 | var puzzle = new pzpr.Puzzle();
19 | it('open PID', function(){
20 | assert.doesNotThrow(()=>puzzle.open(pid));
21 | });
22 | it('pzpr URL', function(){
23 | puzzle.open(pid+'/'+testdata[pid].url);
24 | var urlstr = puzzle.getURL();
25 | var expurl = 'http://pzv.jp/p.html?'+pzpr.variety(pid).urlid+'/'+testdata[pid].url;
26 | assert.equal(urlstr, expurl);
27 | });
28 | it('pzpr invalid URL', function(){
29 | puzzle.open(pid+'/'+testdata[pid].url);
30 | var bd = puzzle.board, bd2 = bd.freezecopy();
31 | var urlstr = puzzle.getURL();
32 | assert.doesNotThrow(function(){
33 | puzzle.open(urlstr+urlstr, function(){
34 | if(pid!=='icebarn'&&pid!=='icelom'&&pid!=='icelom2'&&pid!=='mejilink'&&pid!=='yajitatami'){
35 | assert_equal_board(bd,bd2);
36 | }
37 | });
38 | assert.equal(puzzle.ready, true);
39 | });
40 | });
41 | if(!pzpr.variety(pid).exists.kanpen){ return;}
42 | it('kanpen URL', function(){
43 | puzzle.open(pid+'/'+testdata[pid].url);
44 | var kanpen_url = puzzle.getURL(pzpr.parser.URL_KANPEN);
45 | assert.equal(pzpr.parser(kanpen_url).pid, pid);
46 |
47 | var bd = puzzle.board, bd2 = bd.freezecopy();
48 | puzzle.open(kanpen_url, function(){ assert_equal_board(bd,bd2);});
49 | });
50 | if(pid!=='heyawake'){ return;}
51 | it('Heyawake-Applet URL', function(){
52 | puzzle.open(pid+'/'+testdata[pid].url);
53 | var heywakeapp_url = puzzle.getURL(pzpr.parser.URL_HEYAAPP);
54 | assert.equal(pzpr.parser(heywakeapp_url).pid, pid);
55 |
56 | var bd = puzzle.board, bd2 = bd.freezecopy();
57 | puzzle.open(heywakeapp_url, function(){ assert_equal_board(bd,bd2);});
58 | });
59 | })(pid);});
60 | });
61 | });
62 | describe('Decoding routine', function(){ (function(){
63 | it('Large room number', function(){
64 | var puzzle = new pzpr.Puzzle();
65 | puzzle.open('factors/3/3');
66 |
67 | puzzle.board.getc(1,1).setQnum(16000);
68 | puzzle.open(puzzle.getURL());
69 | assert.equal(puzzle.board.getc(1,1).qnum, 16000);
70 |
71 | puzzle.board.getc(1,1).setQnum(372880);
72 | puzzle.open(puzzle.getURL());
73 | assert.equal(puzzle.board.getc(1,1).qnum, 372880);
74 | });
75 | })();});
76 |
--------------------------------------------------------------------------------
/test/puzzle/filedata_test.js:
--------------------------------------------------------------------------------
1 | // test/filedata_test.js
2 |
3 | var assert = require('assert');
4 |
5 | var pzpr = require('../../dist/pzpr.js');
6 |
7 | var testdata = require('../load_testdata.js');
8 |
9 | function assert_equal_board(bd1,bd2,iskanpen){
10 | var pid = bd1.pid;
11 | var ignore_qsub = (iskanpen && (pid==='fillomino'||pid==='hashikake'||pid==='heyabon'||pid==='kurodoko'||pid==='sato'||pid==='shikaku'||pid==='tentaisho'));
12 | bd1.compareData(bd2,function(group, c, a){
13 | if(ignore_qsub && (a==='qsub'||a==='qcmp')){ return;}
14 | assert.equal(bd2[group][c][a], bd1[group][c][a], group+'['+c+'].'+a);
15 | });
16 | }
17 |
18 | pzpr.variety.each(function(pid){
19 | describe(pid+' filedata test', function(){
20 | describe('File I/O', function(){
21 | var puzzle = new pzpr.Puzzle().open(testdata[pid].fullfile);
22 | it('pzpr file', function(){
23 | var bd = puzzle.board, bd2 = bd.freezecopy();
24 | var outputstr = puzzle.getFileData(pzpr.parser.FILE_PZPR);
25 |
26 | puzzle.open(outputstr, function(){ assert_equal_board(bd,bd2,false);});
27 | });
28 | if(!pzpr.variety(pid).exists.pencilbox){ return;}
29 | it('Kanpen file', function(){
30 | var bd = puzzle.board, bd2 = bd.freezecopy();
31 | var outputstr = puzzle.getFileData(pzpr.parser.FILE_PBOX);
32 |
33 | puzzle.open(outputstr, function(){ assert_equal_board(bd,bd2,true);});
34 | });
35 | it('Kanpen XML file', function(){
36 | var bd = puzzle.board, bd2 = bd.freezecopy();
37 | var outputstr = puzzle.getFileData(pzpr.parser.FILE_PBOX_XML);
38 |
39 | puzzle.open(outputstr, function(){ assert_equal_board(bd,bd2,true);});
40 | });
41 | });
42 | });
43 | });
44 |
--------------------------------------------------------------------------------
/test/puzzle/input_test.js:
--------------------------------------------------------------------------------
1 | // test/input_test.js
2 |
3 | var assert = require('assert');
4 |
5 | var pzpr = require('../../dist/pzpr.js');
6 |
7 | var testdata = require('../load_testdata.js');
8 |
9 | function execmouse(puzzle,strs){
10 | var matches = (strs[1].match(/(left|right)(.*)/)[2]||"").match(/x([0-9]+)/);
11 | var repeat = matches ? +matches[1] : 1;
12 | var args = [];
13 | if (strs[1].substr(0,4)==="left") { args.push('left');}
14 | else if(strs[1].substr(0,5)==="right"){ args.push('right');}
15 | for(var i=2;i execinput(puzzle,a));
67 | if(!!data.result){
68 | var filestr = puzzle.getFileData();
69 | var resultstr = data.result.replace(/\//g,'\n');
70 | assert.equal(filestr, resultstr);
71 | }
72 | });
73 | });
74 | });
75 | });
76 | });
77 |
--------------------------------------------------------------------------------
/test/script/test_aho.js:
--------------------------------------------------------------------------------
1 | /* test_aho.js */
2 |
3 | ui.debug.addDebugData('aho', {
4 | url : '6/6/4i264n6j3n223i4',
5 | failcheck : [
6 | ['bkNoNum', "pzprv3/aho/6/6/4 . . . 2 6 /4 . . . . . /. . . 6 . . /. . 3 . . . /. . . . . 2 /2 3 . . . 4 /1 0 1 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 /0 0 0 0 0 0 /0 0 0 0 0 0 /0 0 0 0 0 0 /"],
7 | ['bkNumGe2', "pzprv3/aho/6/6/4 . . . 2 6 /4 . . . . . /. . . 6 . . /. . 3 . . . /. . . . . 2 /2 3 . . . 4 /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 /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 0 0 0 0 /0 0 0 0 0 0 /"],
8 | ['bkNotRect3', "pzprv3/aho/6/6/4 . . . 2 6 /4 . . . . . /. . . 6 . . /. . 3 . . . /. . . . . 2 /2 3 . . . 4 /-1 -1 -1 1 1 /0 0 0 1 1 /0 0 0 1 -1 /0 1 0 1 -1 /1 1 1 1 0 /1 0 1 0 0 /1 1 1 1 -1 -1 /1 1 1 1 1 -1 /0 0 1 1 -1 -1 /1 1 0 1 1 1 /0 0 1 0 1 1 /"],
9 | ['bkNotLshape3',"pzprv3/aho/6/6/4 . . . 2 6 /4 . . . . . /. . . 6 . . /. . 3 . . . /. . . . . 2 /2 3 . . . 4 /-1 -1 -1 1 1 /0 0 0 1 1 /0 0 0 1 -1 /1 1 1 1 -1 /1 1 0 1 0 /1 1 0 0 0 /1 1 1 1 -1 -1 /1 1 1 1 1 -1 /0 1 1 0 -1 -1 /1 0 0 1 1 1 /0 0 1 1 1 1 /"],
10 | ['bkSizeNe', "pzprv3/aho/6/6/4 . . . 2 6 /4 . . . . . /. . . 6 . . /. . 3 . . . /. . . . . 2 /2 3 . . . 4 /-1 -1 2 0 1 /0 0 1 0 1 /0 0 0 1 -1 /0 1 0 1 -1 /1 0 1 1 0 /1 1 0 0 0 /1 1 1 0 -1 -1 /1 1 1 1 1 -1 /0 0 1 1 -1 -1 /1 1 1 0 1 1 /0 0 1 1 1 1 /"],
11 | ['bdDeadEnd', "pzprv3/aho/6/6/4 . . . 2 6 /4 . . . . . /. . . 6 . . /. . 3 . . . /. . . . . 2 /2 3 . . . 4 /-1 -1 -1 1 1 /0 0 0 1 1 /1 0 0 1 -1 /0 1 0 1 -1 /1 0 1 1 0 /1 1 0 0 0 /1 1 1 1 -1 -1 /1 1 1 1 1 -1 /0 0 1 1 -1 -1 /1 1 1 0 1 1 /0 0 1 1 1 1 /"],
12 | [null, "pzprv3/aho/6/6/4 . . . 2 6 /4 . . . . . /. . . 6 . . /. . 3 . . . /. . . . . 2 /2 3 . . . 4 /-1 -1 -1 1 1 /0 0 0 1 1 /0 0 0 1 -1 /0 1 0 1 -1 /1 0 1 1 0 /1 1 0 0 0 /1 1 1 1 -1 -1 /1 1 1 1 1 -1 /0 0 1 1 -1 -1 /1 1 1 0 1 1 /0 0 1 1 1 1 /"]
13 | ],
14 | inputs : [
15 | /* 問題入力テストはlitsと同じなので省略 */
16 | /* 回答入力テストはshikakuと同じなので省略 */
17 | ]
18 | });
19 |
--------------------------------------------------------------------------------
/test/script/test_arukone.js:
--------------------------------------------------------------------------------
1 | /* test_arukone.js */
2 |
3 | ui.debug.addDebugData('arukone', {
4 | url : '5/5/1m2h3g3h1m2',
5 | failcheck : [
6 | ['brNoLine', "pzprv3/arukone/5/5/allowempty/A . . . . /. . . B . /. C . C . /. A . . . /. . . . B /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 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /"],
7 | ['lnBranch', "pzprv3/arukone/5/5/allowempty/A . . . . /. . . B . /. C . C . /. A . . . /. . . . B /1 1 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 1 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /"],
8 | ['lnCross', "pzprv3/arukone/5/5/allowempty/A . . . . /. . . B . /. C . C . /. A . . . /. . . . B /1 1 0 0 /0 0 0 0 /0 1 1 0 /0 1 0 0 /0 0 0 0 /0 0 1 0 0 /0 0 1 0 0 /0 0 1 0 0 /0 0 0 0 0 /"],
9 | ['lcTripleNum',"pzprv3/arukone/5/5/allowempty/A . . . . /. . . B . /. C . C . /. A . . . /. . . . B /1 1 0 0 /0 0 0 0 /0 1 0 0 /0 0 0 0 /0 0 0 0 /0 0 1 0 0 /0 0 1 0 0 /0 1 0 0 0 /0 0 0 0 0 /"],
10 | ['nmConnDiff', "pzprv3/arukone/5/5/allowempty/A . . . . /. . . B . /. C . C . /. A . . . /. . . . B /1 1 0 0 /0 0 0 0 /0 1 0 0 /0 0 0 0 /0 0 0 0 /0 0 1 0 0 /0 0 1 0 0 /0 0 0 0 0 /0 0 0 0 0 /"],
11 | ['lcOnNum', "pzprv3/arukone/5/5/allowempty/A . . . . /. . . B . /. C . C . /. A . . . /. . . . B /1 1 0 0 /0 0 0 0 /0 0 0 0 /1 1 0 0 /1 1 1 0 /0 0 1 0 0 /0 0 1 0 0 /0 0 1 0 0 /1 0 0 0 0 /"],
12 | ['lnDeadEnd', "pzprv3/arukone/5/5/allowempty/A . . . . /. . . B . /. C . C . /. A . . . /. . . . B /1 1 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 0 0 0 /"],
13 | ['lcIsolate', "pzprv3/arukone/5/5/allowempty/A . . . . /. . . B . /. C . C . /. A . . . /. . . . B /0 1 0 0 /1 0 0 0 /0 0 0 0 /0 0 0 0 /1 1 0 0 /0 1 1 0 0 /1 0 1 0 0 /1 0 1 0 0 /1 0 1 0 0 /"],
14 | ['nmNoLine', "pzprv3/arukone/5/5/allowempty/A . . . . /. . . B . /. C . C . /. A . . . /. . . . B /1 1 1 1 /0 0 0 0 /0 0 0 0 /0 1 1 1 /0 0 0 0 /0 0 0 0 1 /0 0 0 0 1 /0 0 0 0 1 /0 0 0 0 0 /"],
15 | ['ceNoLine', "pzprv3/arukone/5/5/passallcell/A . . . . /. . . B . /. C . C . /. A . . . /. . . . B /0 0 0 0 /0 0 0 1 /0 1 1 0 /1 0 0 0 /0 0 0 0 /1 0 0 0 0 /1 0 0 0 1 /1 0 0 0 1 /0 0 0 0 1 /"],
16 | [null, "pzprv3/arukone/5/5/passallcell/A . . . . /. . . B . /. C . C . /. A . . . /. . . . B /1 1 1 1 /1 1 1 0 /-1 1 1 0 /-1 1 1 1 /1 1 1 1 /0 0 0 0 1 /1 -1 0 0 1 /1 -1 0 0 1 /1 -1 0 0 0 /"]
17 | ],
18 | inputs : [
19 | /* 問題入力テストはkaeroと同じなので省略 */
20 | /* 回答入力テストはnumlinと同じなので省略 */
21 | ]
22 | });
23 |
--------------------------------------------------------------------------------
/test/script/test_ayeheya.js:
--------------------------------------------------------------------------------
1 | /* test_ayeheya.js */
2 |
3 | ui.debug.addDebugData('ayeheya', {
4 | url : '6/6/99aa8c0vu0ufk2k',
5 | failcheck : [
6 | ['brNoShade', "pzprv3/ayeheya/6/6"],
7 | ['csAdjacent', "pzprv3/ayeheya/6/6/11/0 0 1 1 1 2 /0 0 1 1 1 3 /4 4 5 5 6 6 /7 7 5 5 6 6 /7 7 8 8 8 8 /7 7 9 10 10 10 /. . . . . . /. . . . . . /. . 2 . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. # . . . . /. # . . . . /. . . . . . /. . . . . . /. . . . . . /"],
8 | ['cuDivideRB', "pzprv3/ayeheya/6/6/11/0 0 1 1 1 2 /0 0 1 1 1 3 /4 4 5 5 6 6 /7 7 5 5 6 6 /7 7 8 8 8 8 /7 7 9 10 10 10 /. . . . . . /. . . . . . /. . 2 . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . # /. . . . # . /. . . # . . /. . # . . . /. # . . . . /# . . . . . /"],
9 | ['bkNotSymShade', "pzprv3/ayeheya/6/6/11/0 0 1 1 1 2 /0 0 1 1 1 3 /4 4 5 5 6 6 /7 7 5 5 6 6 /7 7 8 8 8 8 /7 7 9 10 10 10 /. . . . . . /. . . . . . /. . 2 . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . # . # . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /"],
10 | ['bkShadeNe', "pzprv3/ayeheya/6/6/11/0 0 1 1 1 2 /0 0 1 1 1 3 /4 4 5 5 6 6 /7 7 5 5 6 6 /7 7 8 8 8 8 /7 7 9 10 10 10 /. . . . . . /. . . . . . /. . 2 . . . /. . . . . . /. . . . . . /. . . . . . /# . . . . . /. # . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /"],
11 | ['bkUnshadeConsecGt3',"pzprv3/ayeheya/6/6/11/0 0 1 1 1 2 /0 0 1 1 1 3 /4 4 5 5 6 6 /7 7 5 5 6 6 /7 7 8 8 8 8 /7 7 9 10 10 10 /. . . . . . /. . . . . . /. . 2 . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . # . . . /. . . # . . /. . . . . . /. . . . . . /"],
12 | [null, "pzprv3/ayeheya/6/6/11/0 0 1 1 1 2 /0 0 1 1 1 3 /4 4 5 5 6 6 /7 7 5 5 6 6 /7 7 8 8 8 8 /7 7 9 10 10 10 /. . . . . . /. . . . . . /. . 2 . . . /. . . . . . /. . . . . . /. . . . . . /# + + + + # /+ # + + + + /+ + + # + # /# + # . # . /+ + . . . . /+ # . # . # /"]
13 | ],
14 | inputs : [] /* hitori, shimaguniと同じなので省略 */
15 | });
16 |
--------------------------------------------------------------------------------
/test/script/test_barns.js:
--------------------------------------------------------------------------------
1 | /* test_barns.js */
2 |
3 | ui.debug.addDebugData('barns', {
4 | url : '5/5/06ec080000100',
5 | failcheck : [
6 | ['ceNoLine', "pzprv3/barns/5/5/. . . . . /. . 1 1 . /. 1 1 1 . /. 1 1 . . /. . . . . /0 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 0 0 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 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 /"],
7 | ['lnBranch', "pzprv3/barns/5/5/. . . . . /. . 1 1 . /. 1 1 1 . /. 1 1 . . /. . . . . /0 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 0 0 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 0 /1 1 1 1 /0 1 0 0 0 /0 1 0 0 0 /0 1 0 0 0 /0 1 0 0 0 /"],
8 | ['lnCrossExIce',"pzprv3/barns/5/5/. . . . . /. . 1 1 . /. 1 1 1 . /. 1 1 . . /. . . . . /0 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 0 0 1 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 1 /1 1 1 1 /0 0 0 0 /0 0 0 0 /0 1 1 1 /0 1 0 0 1 /0 1 0 0 0 /0 1 0 0 0 /0 1 0 0 0 /"],
9 | ['lnCurveOnIce',"pzprv3/barns/5/5/. . . . . /. . 1 1 . /. 1 1 1 . /. 1 1 . . /. . . . . /0 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 0 0 1 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 1 /0 0 1 1 /0 1 0 0 /0 0 0 0 /0 1 1 1 /0 0 0 0 1 /0 0 1 0 0 /0 1 0 0 0 /0 1 0 0 0 /"],
10 | ['lnPlLoop', "pzprv3/barns/5/5/. . . . . /. . 1 1 . /. 1 1 1 . /. 1 1 . . /. . . . . /0 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 0 0 1 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 1 /0 0 1 1 /0 0 0 0 /0 0 0 0 /0 1 1 1 /0 0 0 0 1 /0 0 0 0 0 /0 1 0 0 0 /0 1 0 0 0 /"],
11 | ['lnDeadEnd', "pzprv3/barns/5/5/. . . . . /. . 1 1 . /. 1 1 1 . /. 1 1 . . /. . . . . /0 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 0 0 1 /0 0 0 0 0 /0 0 0 0 0 /1 0 1 1 /0 1 1 1 /1 1 1 1 /1 0 0 0 /1 1 0 1 /1 1 1 0 1 /1 0 1 0 0 /0 0 1 0 1 /1 0 1 1 1 /"],
12 | [null, "pzprv3/barns/5/5/. . . . . /. . 1 1 . /. 1 1 1 . /. 1 1 . . /. . . . . /0 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 0 0 1 /0 0 0 0 0 /0 0 0 0 0 /1 0 1 1 /0 1 1 1 /1 1 1 1 /1 1 1 0 /1 1 -1 1 /1 1 1 -1 1 /1 -1 1 -1 0 /-1 -1 1 -1 1 /1 -1 1 1 1 /"]
13 | ],
14 | inputs : [
15 | /* 問題入力テスト */
16 | { input:["newboard,5,2", "editmode"] },
17 | { input:["mouse,right, 3,1, 5,1, 5,3, 7,3", "mouse,left, 4,0, 4,2, 8,2, 8,4", "mouse,left, 4,2, 8,2"],
18 | result:"pzprv3/barns/2/5/. 1 1 . . /. . 1 1 . /0 1 0 0 /0 0 0 1 /0 0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 0 /" },
19 | /* 回答入力テスト (入力できない箇所) */
20 | { input:["playmode", "mouse,left, 1,1, 9,1, 9,3, 1,3, 1,1"],
21 | result:"pzprv3/barns/2/5/. 1 1 . . /. . 1 1 . /0 1 0 0 /0 0 0 1 /0 0 0 0 0 /1 0 1 1 /1 1 1 0 /1 0 0 0 1 /" }
22 | ]
23 | });
24 |
--------------------------------------------------------------------------------
/test/script/test_bdblock.js:
--------------------------------------------------------------------------------
1 | /* test_bdblock.js */
2 |
3 | ui.debug.addDebugData('bdblock', {
4 | url : '5/5/100089082/12345o51g4i3i',
5 | failcheck : [
6 | ['bdBranchExBP',"pzprv3/bdblock/5/5/1 2 3 4 5 /. . . . . /. . . . 5 /1 . 4 . . /. 3 . . . /. 1 1 1 1 . /. . . . . . /. 1 . . . . /. . . . . 1 /1 . . . . . /. . . 1 . . /1 0 0 0 /1 0 0 0 /1 0 0 0 /1 0 0 0 /0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /1 1 1 0 0 /"],
7 | ['bdCrossExBP', "pzprv3/bdblock/5/5/1 2 3 4 5 /. . . . . /. . . . 5 /1 . 4 . . /. 3 . . . /. 1 1 1 1 . /. . . . . . /. 1 . . . . /. . . . . 1 /1 . . . . . /. . . 1 . . /1 0 0 0 /1 0 0 0 /1 1 0 0 /0 1 1 0 /0 0 1 0 /0 0 0 0 0 /0 1 0 0 0 /0 1 1 0 0 /1 1 0 0 0 /"],
8 | ['bkNoNum', "pzprv3/bdblock/5/5/1 2 3 4 5 /. . . . . /. . . . 5 /1 . 4 . . /. 3 . . . /. 1 1 1 1 . /. . . . . . /. 1 . . . . /. . . . . 1 /1 . . . . . /. . . 1 . . /1 0 0 0 /1 0 0 0 /1 1 0 0 /0 1 1 0 /0 0 1 0 /0 0 0 0 0 /0 1 0 0 0 /0 0 0 1 1 /1 1 0 0 0 /"],
9 | ['bkPlNum', "pzprv3/bdblock/5/5/1 2 3 4 5 /. . . . . /. . . . 5 /1 . 4 . . /. 3 . . . /. 1 1 1 1 . /. . . . . . /. 1 . . . . /. . . . . 1 /1 . . . . . /. . . 1 . . /0 1 0 0 /0 1 0 0 /0 1 0 0 /0 1 0 0 /0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /1 1 0 0 0 /"],
10 | ['bkSepNum', "pzprv3/bdblock/5/5/1 2 3 4 5 /. . . . . /. . . . 5 /1 . 4 . . /. 3 . . 1 /. 1 1 1 1 . /. . . . . . /. 1 . . . . /. . . . 1 1 /1 . . . . . /. . . 1 1 . /1 1 1 1 /1 1 1 1 /1 0 1 1 /1 1 0 1 /0 0 1 1 /0 0 0 0 0 /0 1 0 0 0 /0 0 1 0 1 /1 0 1 0 0 /"],
11 | ['bdDeadEnd', "pzprv3/bdblock/5/5/1 2 3 4 5 /. . . . . /. . . . 5 /1 . 4 . . /. 3 . . . /. 1 1 1 1 . /. . . . . . /. 1 . . . . /. . . . . 1 /1 . . . . . /. . . 1 1 . /1 1 1 1 /1 1 1 1 /1 0 1 1 /1 1 0 0 /0 0 1 1 /0 0 0 0 0 /0 1 0 0 0 /0 0 1 0 1 /1 0 1 0 0 /"],
12 | ['bdCountLt3BP',"pzprv3/bdblock/5/5/1 2 3 4 5 /. . . . . /. . . . 5 /1 . 4 . . /. 3 . . . /. 1 1 1 1 . /. . . . . . /. 1 . . . . /. . . . . 1 /1 . . . . . /. . . 1 1 . /1 1 1 1 /1 1 1 1 /1 0 1 1 /1 1 0 0 /0 0 1 0 /0 0 0 0 0 /0 1 0 0 0 /0 0 1 0 1 /1 0 1 0 0 /"],
13 | ['bdIgnoreBP', "pzprv3/bdblock/5/5/1 2 3 4 5 /. . . . . /. . . . 5 /1 . 4 . . /. 3 . . . /. 1 1 1 1 . /. . . . . . /. 1 . . . . /. . . . . 1 /1 . . . 1 . /. . . 1 . . /1 1 1 1 /1 1 1 1 /1 0 1 1 /1 1 0 0 /0 0 1 0 /0 0 0 0 0 /0 1 0 0 0 /0 0 1 0 1 /1 0 1 0 0 /"],
14 | [null, "pzprv3/bdblock/5/5/1 2 3 4 5 /. . . . . /. . . . 5 /1 . 4 . . /. 3 . . . /. 1 1 1 1 . /. . . . . . /. 1 . . . . /. . . . . 1 /1 . . . . . /. . . 1 . . /1 1 1 1 /1 1 1 1 /1 -1 1 1 /1 1 -1 -1 /-1 -1 1 -1 /0 0 -1 -1 0 /0 1 -1 -1 0 /0 -1 1 -1 1 /1 -1 1 -1 -1 /"]
15 | ],
16 | inputs : [
17 | /* 黒点の問題入力テスト */
18 | { input:["newboard,1,1", "editmode"] },
19 | { input:["mouse,left, 0,0", "mouse,left, 2,0", "mouse,left, 0,0" ],
20 | result:"pzprv3/bdblock/1/1/. /. 1 /. . //" }
21 | /* その他の問題入力はnurikabeと同じなので省略 */
22 | /* 回答入力はsashiganeと同じなので省略 */
23 | ]
24 | });
25 |
--------------------------------------------------------------------------------
/test/script/test_box.js:
--------------------------------------------------------------------------------
1 | /* test_box.js */
2 |
3 | ui.debug.addDebugData('box', {
4 | url : '5/5/7a9979672f',
5 | failcheck : [
6 | ['brNoShade', "pzprv3/box/5/5"],
7 | ['nmSumRowShadeNe',"pzprv3/box/5/5/0 7 10 9 9 7 /9 . # . . . /6 . + . . . /7 . + . . . /2 + # + + + /15 # # # # # /"],
8 | [null, "pzprv3/box/5/5/0 7 10 9 9 7 /9 + # # # + /6 # + + + # /7 + + # # + /2 + # + + + /15 # # # # # /"]
9 | ],
10 | inputs : [
11 | /* 回答入力はnurikabeと同じなので省略 */
12 | { input:["editmode", "newboard,5,1"] },
13 | { input:["cursor,1,-1", "key,-", "key,right", "key,0", "key,right", "key,1", "key,right", "key,2", "key,right", "key,1", "key,0" ],
14 | result:"pzprv3/box/1/5/. 0 0 1 2 10 /0 . . . . . /" },
15 | { input:["cursor,1,-1", "key,-", "key,right", "key,-", "key,right", "key,-", "key,-" ],
16 | result:"pzprv3/box/1/5/. 0 0 0 2 10 /0 . . . . . /" },
17 | { input:["newboard,6,1"] },
18 | { input:["cursor,0,0", "mouse,leftx2, -1,-1", "mouse,leftx2, 1,-1", "mouse,leftx3, 3,-1", "mouse,leftx4, 5,-1", "mouse,leftx5, 7,-1", "mouse,leftx6, 9,-1", "mouse,rightx3, 11,-1"],
19 | result:"pzprv3/box/1/6/. 1 2 3 4 5 21 /0 . . . . . . /" }
20 | ]
21 | });
22 |
--------------------------------------------------------------------------------
/test/script/test_building.js:
--------------------------------------------------------------------------------
1 | /* test_building.js */
2 |
3 | ui.debug.addDebugData('building', {
4 | url : '4/4/k13h4j3g',
5 | failcheck : [
6 | ['nmDupRow', "pzprv3/building/4/4/. . . . . . /. . . . . . /4 1 2 3 3 . /. . . . . 3 /. . . . . . /. . 1 3 . . /"],
7 | ['nmSightNe',"pzprv3/building/4/4/. . . . . . /. . . . . . /4 1 2 3 4 . /. 4 . . . 3 /. . 4 . . . /. . 1 3 . . /"],
8 | ['ceNoNum', "pzprv3/building/4/4/. . . . . . /. . 1 4 3 . /4 1 2 3 4 . /. 4 3 1 2 3 /. 3 4 2 1 . /. . 1 3 . . /"],
9 | [null, "pzprv3/building/4/4/. . . . . . /. 2 1 4 3 . /4 1 2 3 4 . /. 4 3 1 2 3 /. 3 4 2 1 . /. . 1 3 . . /"]
10 | ],
11 | inputs : [
12 | ]
13 | });
14 |
--------------------------------------------------------------------------------
/test/script/test_cbblock.js:
--------------------------------------------------------------------------------
1 | /* test_cbblock.js */
2 |
3 | ui.debug.addDebugData('cbblock', {
4 | url : '4/4/ah0oa',
5 | failcheck : [
6 | ['bkSubLt2', "pzprv3/cbblock/4/4/1 0 2 /0 2 0 /2 2 2 /0 2 2 /1 2 2 0 /0 2 2 2 /2 0 2 0 /"],
7 | ['bkRect', "pzprv3/cbblock/4/4/-2 0 1 /0 2 0 /2 2 2 /0 2 2 /1 1 1 0 /0 2 2 2 /2 0 2 0 /"],
8 | ['bsSameShape',"pzprv3/cbblock/4/4/1 0 2 /0 1 0 /1 1 2 /0 2 1 /-2 1 2 0 /0 1 1 1 /1 0 1 0 /"],
9 | [null, "pzprv3/cbblock/4/4/1 0 2 /0 1 0 /1 -2 1 /0 1 2 /-2 1 2 0 /0 1 1 1 /1 0 1 0 /"]
10 | ],
11 | inputs : [
12 | /* 問題入力テスト */
13 | { input:["newboard,2,2", "editmode"],
14 | result:"pzprv3/cbblock/2/2/0 /0 /0 0 /" },
15 | { input:["mouse,left, 0,2, 4,2", "mouse,left, 2,0, 2,4"],
16 | result:"pzprv3/cbblock/2/2/2 /2 /2 2 /" },
17 | { input:["mouse,left, 0,2, 4,2"],
18 | result:"pzprv3/cbblock/2/2/2 /2 /0 0 /" },
19 | /* 回答入力テスト */
20 | { input:["playmode"] },
21 | { input:["newboard,2,2", "editmode"],
22 | result:"pzprv3/cbblock/2/2/0 /0 /0 0 /" },
23 | { input:["mouse,left, 0,2, 4,2", "mouse,left, 2,0, 2,4"],
24 | result:"pzprv3/cbblock/2/2/2 /2 /2 2 /" },
25 | { input:["mouse,left, 0,2, 4,2"],
26 | result:"pzprv3/cbblock/2/2/2 /2 /0 0 /" },
27 | { input:["playmode"] },
28 | { input:["mouse,left, 0,2, 4,2", "mouse,left, 2,0, 2,4"],
29 | result:"pzprv3/cbblock/2/2/1 /1 /0 0 /" },
30 | { input:["mouse,right, 1,1, 1,3, 3,3, 3,1, 1,1"],
31 | result:"pzprv3/cbblock/2/2/3 /3 /-1 -1 /" },
32 | { input:["mouse,left, 2,0, 2,2"],
33 | result:"pzprv3/cbblock/2/2/-2 /3 /-1 -1 /" }
34 | ]
35 | });
36 |
--------------------------------------------------------------------------------
/test/script/test_chocona.js:
--------------------------------------------------------------------------------
1 | /* test_chocona.js */
2 |
3 | ui.debug.addDebugData('chocona', {
4 | url : '6/6/8guumlfvo1eq33122g21g32',
5 | failcheck : [
6 | ['brNoShade',"pzprv3/chocona/6/6"],
7 | ['csNotRect',"pzprv3/chocona/6/6/11/0 0 1 1 1 1 /0 2 2 2 2 2 /3 4 5 6 7 7 /3 4 5 6 7 7 /3 5 5 8 9 9 /3 10 10 8 8 9 /3 . 3 . . . /. 1 . . . . /2 2 . 2 1 . /. . . . . . /. . . . 3 . /. 2 . . . . /# # . . . . /# # # # # # /. . . . . . /. . . . . . /. . . . . . /. . . . . . /"],
8 | ['bkShadeNe',"pzprv3/chocona/6/6/11/0 0 1 1 1 1 /0 2 2 2 2 2 /3 4 5 6 7 7 /3 4 5 6 7 7 /3 5 5 8 9 9 /3 10 10 8 8 9 /3 . 3 . . . /. 1 . . . . /2 2 . 2 1 . /. . . . . . /. . . . 3 . /. 2 . . . . /# # . # # # /# # . # # # /. . . . . . /. . . . . . /. . . . . . /. . . . . . /"],
9 | [null, "pzprv3/chocona/6/6/11/0 0 1 1 1 1 /0 2 2 2 2 2 /3 4 5 6 7 7 /3 4 5 6 7 7 /3 5 5 8 9 9 /3 10 10 8 8 9 /3 . 3 . . . /. 1 . . . . /2 2 . 2 1 . /. . . . . . /. . . . 3 . /. 2 . . . . /# # + # # # /# # + + + + /# # + # + # /# # + # + + /. . + + # # /. # # + # # /"]
10 | ],
11 | inputs : [] /* shimaguniと同じなので省略 */
12 | });
13 |
--------------------------------------------------------------------------------
/test/script/test_cojun.js:
--------------------------------------------------------------------------------
1 | /* test_cojun.js */
2 |
3 | ui.debug.addDebugData('cojun', {
4 | url : '4/4/pd0hsoh3p3h',
5 | failcheck : [
6 | ['bkDupNum', "pzprv3/cojun/4/4/1 1 0 /0 1 0 /1 1 0 /1 0 0 /1 0 0 0 /1 1 1 1 /0 0 1 1 /. . 3 . /. . . . /. . . . /. 3 . . /. . . . /. . . 3 /. . . . /. . . . /"],
7 | ['nmAdjacent', "pzprv3/cojun/4/4/1 1 0 /0 1 0 /1 1 0 /1 0 0 /1 0 0 0 /1 1 1 1 /0 0 1 1 /. . 3 . /. . . . /. . . . /. 3 . . /. 3 . . /. . . . /. . . . /. . . . /"],
8 | ['bkSmallOnBig',"pzprv3/cojun/4/4/1 1 0 /0 1 0 /1 1 0 /1 0 0 /1 0 0 0 /1 1 1 1 /0 0 1 1 /. . 3 . /. . . . /. . . . /. 3 . . /1 2 . . /3 1 4 . /. . . . /. . . . /"],
9 | ['ceNoNum', "pzprv3/cojun/4/4/1 1 0 /0 1 0 /1 1 0 /1 0 0 /1 0 0 0 /1 1 1 1 /0 0 1 1 /. . 3 . /. . . . /. . . . /. 3 . . /1 2 . 4 /3 1 2 1 /. . 1 2 /. . 2 1 /"],
10 | [null, "pzprv3/cojun/4/4/1 1 0 /0 1 0 /1 1 0 /1 0 0 /1 0 0 0 /1 1 1 1 /0 0 1 1 /. . 3 . /. . . . /. . . . /. 3 . . /1 2 . 4 /3 1 2 1 /2 4 1 2 /1 . 2 1 /"]
11 | ],
12 | inputs : [
13 | /* 問題入力, 回答入力はrippleと同じなので省略 */
14 | ]
15 | });
16 |
--------------------------------------------------------------------------------
/test/script/test_country.js:
--------------------------------------------------------------------------------
1 | /* test_country.js */
2 |
3 | ui.debug.addDebugData('country', {
4 | url : '5/5/amda0uf02h12h',
5 | failcheck : [
6 | ['lnBranch', "pzprv3/country/5/5/7/0 0 1 1 2 /0 0 1 1 2 /3 4 4 4 2 /3 5 5 6 6 /3 5 5 6 6 /2 . . . . /. . . . . /1 2 . . . /. . . . . /. . . . . /0 0 0 0 /1 1 1 1 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 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 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /"],
7 | ['lnCross', "pzprv3/country/5/5/7/0 0 1 1 2 /0 0 1 1 2 /3 4 4 4 2 /3 5 5 6 6 /3 5 5 6 6 /2 . . . . /. . . . . /1 2 . . . /. . . . . /. . . . . /0 0 0 0 /1 1 1 1 /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 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 0 0 0 /"],
8 | ['bkPassTwice',"pzprv3/country/5/5/7/0 0 1 1 2 /0 0 1 1 2 /3 4 4 4 2 /3 5 5 6 6 /3 5 5 6 6 /2 . . . . /. . . . . /1 2 . . . /. . . . . /. . . . . /0 1 1 0 /0 0 0 0 /1 0 0 0 /0 0 0 0 /1 1 1 0 /0 1 0 1 0 /0 1 0 1 0 /1 0 0 1 0 /1 0 0 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 0 /"],
9 | ['bkLineNe', "pzprv3/country/5/5/7/0 0 1 1 2 /0 0 1 1 2 /3 4 4 4 2 /3 5 5 6 6 /3 5 5 6 6 /2 . . . . /. . . . . /1 2 . . . /. . . . . /. . . . . /0 1 0 0 /1 0 0 0 /1 1 0 0 /0 1 0 1 /0 1 1 0 /0 1 0 0 0 /1 0 0 0 0 /0 0 1 0 0 /0 1 0 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 0 /"],
10 | ['bkNoLine', "pzprv3/country/5/5/8/0 0 1 1 2 /0 0 1 1 2 /3 4 4 5 2 /3 6 6 7 7 /3 6 6 7 7 /2 . . . . /. . . . . /1 2 . . . /. . . . . /. . . . . /0 0 1 0 /1 1 0 1 /1 1 0 0 /0 1 0 1 /0 1 1 0 /0 0 1 1 0 /1 0 0 0 1 /0 0 1 0 1 /0 1 0 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 0 /"],
11 | ['cbNoLine', "pzprv3/country/5/5/7/0 0 1 1 2 /0 0 1 1 2 /3 4 4 4 2 /3 5 5 6 6 /3 5 5 6 6 /2 . . . . /. . . . . /1 2 . . . /. . . . . /. . . . . /0 0 1 1 /1 1 0 0 /1 1 0 0 /0 1 0 1 /0 1 1 0 /0 0 1 0 1 /1 0 0 0 1 /0 0 1 0 1 /0 1 0 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 0 /"],
12 | ['lnDeadEnd', "pzprv3/country/5/5/7/0 0 1 1 2 /0 0 1 1 2 /3 4 4 4 2 /3 5 5 6 6 /3 5 5 6 6 /2 . . . . /. . . . . /1 2 . . . /. . . . . /. . . . . /0 0 1 0 /1 1 0 0 /1 1 0 0 /0 1 0 1 /0 1 1 0 /0 0 1 1 0 /1 0 0 0 1 /0 0 1 0 1 /0 1 0 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 0 /"],
13 | ['lnPlLoop', "pzprv3/country/5/5/7/0 0 1 1 2 /0 0 1 1 2 /3 4 4 4 2 /3 5 5 6 6 /3 5 5 6 6 /2 . . . . /. . . . . /1 3 . . . /. . . . . /. . . . . /0 0 1 0 /1 1 0 1 /1 1 1 1 /0 1 1 0 /0 1 1 0 /0 0 1 1 0 /1 0 0 0 1 /0 0 0 0 0 /0 1 0 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 0 /"],
14 | [null, "pzprv3/country/5/5/7/0 0 1 1 2 /0 0 1 1 2 /3 4 4 4 2 /3 5 5 6 6 /3 5 5 6 6 /2 . . . . /. . . . . /1 2 . . . /. . . . . /. . . . . /0 0 1 0 /1 1 0 1 /1 1 0 0 /0 1 0 1 /0 1 1 0 /0 0 1 1 0 /1 0 0 0 1 /0 0 1 0 1 /0 1 0 1 0 /2 2 1 0 0 /1 1 0 1 0 /1 1 1 2 1 /2 1 0 1 0 /2 1 0 0 0 /"]
15 | ]
16 | });
17 |
--------------------------------------------------------------------------------
/test/script/test_creek.js:
--------------------------------------------------------------------------------
1 | /* test_creek.js */
2 |
3 | ui.debug.addDebugData('creek', {
4 | url : '6/6/gagaich2cgb6769dt',
5 | failcheck : [
6 | ['brNoShade',"pzprv3/creek/6/6"],
7 | ['crShadeGt',"pzprv3/creek/6/6/. 0 . . . 0 . /. . . . 2 . . /. . 2 2 . . . /1 . . 1 . 2 . /1 . 4 . 3 . . /. . . . . . . /. . . . . . . /# # . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /"],
8 | ['cuDivide', "pzprv3/creek/6/6/. 0 . . . 0 . /. . . . 2 . . /. . 2 2 . . . /1 . . 1 . 2 . /1 . 4 . 3 . . /. . . . . . . /. . . . . . . /. . . . . . /. . . # . . /# # # . # # /. . . . . . /. . . . . . /. . . . . . /"],
9 | ['crShadeLt',"pzprv3/creek/6/6/. 0 . . . 0 . /. . . . 2 . . /. . 2 2 . . . /1 . . 1 . 2 . /1 . 4 . 3 . . /. . . . . . . /. . . . . . . /. . . . . . /. . . . # . /. . . . # . /. # # . # . /. # # # # . /. . . . . . /"],
10 | [null, "pzprv3/creek/6/6/. 0 . . . 0 . /. . . . 2 . . /. . 2 2 . . . /1 . . 1 . 2 . /1 . 4 . 3 . . /. . . . . . . /. . . . . . . /. + + + + . /. # # # # + /. + + + # + /# # # + # + /. # # # # + /. . + + + + /"]
11 | ],
12 | inputs : [
13 | /* 回答入力はnurikabeと同じなので省略 */
14 | { input:["editmode", "newboard,5,1"] },
15 | { input:["cursor,0,0", "key,-", "key,right", "key,0", "key,right", "key,1", "key,right", "key,2", "key,right", "key,3" ],
16 | result:"pzprv3/creek/1/5/. 0 1 2 3 . /. . . . . . /. . . . . /" },
17 | { input:["cursor,0,0", "key,-", "key,right", "key,-", "key,right", "key,-", "key,-" ],
18 | result:"pzprv3/creek/1/5/. . . 2 3 . /. . . . . . /. . . . . /" },
19 | { input:["newboard,6,1"] },
20 | { input:["cursor,0,2", "mouse,leftx2, 0,0", "mouse,leftx3, 2,0", "mouse,leftx4, 4,0", "mouse,leftx5, 6,0", "mouse,leftx6, 8,0", "mouse,leftx7, 10,0", "mouse,leftx8, 12,0",
21 | "cursor,0,0", "mouse,rightx2, 0,2", "mouse,rightx3, 2,2", "mouse,rightx4, 4,2", "mouse,rightx5, 6,2", "mouse,rightx6, 8,2", "mouse,rightx7, 10,2", "mouse,rightx8, 12,2"],
22 | result:"pzprv3/creek/1/6/- 0 1 2 3 4 . /4 3 2 1 0 - . /. . . . . . /" }
23 | ]
24 | });
25 |
--------------------------------------------------------------------------------
/test/script/test_dosufuwa.js:
--------------------------------------------------------------------------------
1 | /* test_dosufuwa.js */
2 |
3 | ui.debug.addDebugData('dosufuwa', {
4 | url : '5/5/7pnsmrhf31d1',
5 | failcheck : [
6 | ["bkUCGe2","pzprv3/dosufuwa/5/5/7/0 0 0 # 1 /# 0 2 1 1 /3 3 2 4 4 /5 3 2 4 # /5 # 6 6 6 /. 1 . . . /. 1 . . . /. . . . . /. . . . . /. . . . . /"],
7 | ["bkSCGe2","pzprv3/dosufuwa/5/5/7/0 0 0 # 1 /# 0 2 1 1 /3 3 2 4 4 /5 3 2 4 # /5 # 6 6 6 /. 2 . . . /. 2 . . . /. . . . . /. . . . . /. . . . . /"],
8 | ["cuNotTop","pzprv3/dosufuwa/5/5/7/0 0 0 # 1 /# 0 2 1 1 /3 3 2 4 4 /5 3 2 4 # /5 # 6 6 6 /. . . . . /. . 1 . . /. . . . . /. . . . . /. . . . . /"],
9 | ["csNotBottom","pzprv3/dosufuwa/5/5/7/0 0 0 # 1 /# 0 2 1 1 /3 3 2 4 4 /5 3 2 4 # /5 # 6 6 6 /. . 1 . . /. 2 1 . . /1 . . . . /1 2 2 . . /2 . 2 . . /"],
10 | ["bkNoUC","pzprv3/dosufuwa/5/5/7/0 0 0 # 1 /# 0 2 1 1 /3 3 2 4 4 /5 3 2 4 # /5 # 6 6 6 /2 . 1 . . /. . 1 . . /1 . . . . /1 2 2 . . /2 . 2 . . /"],
11 | ["bkNoSC","pzprv3/dosufuwa/5/5/7/0 0 0 # 1 /# 0 2 1 1 /3 3 2 4 4 /5 3 2 4 # /5 # 6 6 6 /2 . 1 . . /. . 1 1 . /1 . . 1 . /1 2 2 . . /2 . 2 . 1 /"],
12 | [null,"pzprv3/dosufuwa/5/5/7/0 0 0 # 1 /# 0 2 1 1 /3 3 2 4 4 /5 3 2 4 # /5 # 6 6 6 /2 + 1 . . /. + 1 1 2 /1 + + 1 2 /1 2 2 + . /2 . 2 + 1 /"]
13 | ],
14 | inputs : [
15 | /* 問題入力テスト */
16 | { input:["newboard,4,2", "editmode"] },
17 | { input:["mouse,left, 1,1, 1,-1", "mouse,left, 3,1, 3,3", "mouse,left, 7,1, 5,1" ],
18 | result:"pzprv3/dosufuwa/2/4/2/0 0 # 1 /0 # 1 1 /. . . . /. . . . /" },
19 | { input:["mouse,left, 0,2, 8,2", "mouse,left, 0,2, 2,2", "mouse,left, 2,0, 2,4", "mouse,left, 4,0, 4,4"],
20 | result:"pzprv3/dosufuwa/2/4/4/0 1 # 2 /0 # 3 3 /. . . . /. . . . /" },
21 | { input:["mouse,left, 5,1" ],
22 | result:"pzprv3/dosufuwa/2/4/3/0 1 1 1 /0 # 2 2 /. . . . /. . . . /" },
23 | /* 回答入力テスト */
24 | { input:["playmode"] },
25 | { input:["mouse,left, 1,1", "mouse,leftx2, 3,1", "mouse,leftx3, 5,1", "mouse,leftx4, 7,1", "mouse,left, 3,3"],
26 | result:"pzprv3/dosufuwa/2/4/3/0 1 1 1 /0 # 2 2 /1 2 + . /. . . . /" },
27 | { input:["ansclear"] },
28 | { input:["mouse,right, 1,1", "mouse,rightx2, 3,1", "mouse,rightx3, 5,1", "mouse,rightx4, 7,1", "mouse,rightx2, 3,3"],
29 | result:"pzprv3/dosufuwa/2/4/3/0 1 1 1 /0 # 2 2 /+ 2 1 . /. . . . /" }
30 | ]
31 | });
32 |
--------------------------------------------------------------------------------
/test/script/test_easyasabc.js:
--------------------------------------------------------------------------------
1 | /* test_easyasabc.js */
2 |
3 | ui.debug.addDebugData('easyasabc', {
4 | url : '4/4/3/1m2h3g3h',
5 | failcheck : [
6 | ['nmDupRow', "pzprv3/easyasabc/4/4/3/. 1 . . . . /2 - 2 . 2 . /. . . . . 3 /. . . . . . /3 . . . . . /. . . . . . /"],
7 | ['nmSightNe',"pzprv3/easyasabc/4/4/3/. 1 . . . . /2 - 2 . . . /. 1 . . . 3 /. + . . . . /3 + . . . . /. . . . . . /"],
8 | ['nmMissRow',"pzprv3/easyasabc/4/4/3/. 1 . . . . /2 - 2 3 1 . /. 1 - 2 3 3 /. 2 3 .[1,3,,] . . /3 3 1 . . . /. . . . . . /"],
9 | [null, "pzprv3/easyasabc/4/4/3/. 1 . . . . /2 - 2 3 1 . /. 1 - 2 3 3 /. 2 3 1 . . /3 3 1 . 2 . /. . . . . . /"]
10 | ],
11 | inputs : [
12 | /* 問題入力テスト */
13 | { input:["newboard,4,4,3","editmode"] },
14 | { input:["cursor,1,-1", "key,b,right,d,down,c"],
15 | result:"pzprv3/easyasabc/4/4/3/. 2 . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . 3 . . . /"},
16 | { input:["mouse,leftx2, 3,-3"],
17 | result:"pzprv3/easyasabc/4/4/4/. 2 . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . 3 . . . /"},
18 | { input:["key,a"],
19 | result:"pzprv3/easyasabc/4/4/1/. 2 . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . 3 . . . /"},
20 | /* 回答入力テスト */
21 | { input:["newboard,4,4,3","playmode"] },
22 | { input:["cursor,1,1", "key,shift,a,right,left,1"],
23 | result:"pzprv3/easyasabc/4/4/3/. . . . . . /. +[1,,,] . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /"},
24 | { input:["cursor,3,1", "key,shift,a,right,left,b"],
25 | result:"pzprv3/easyasabc/4/4/3/. . . . . . /. +[1,,,] 2 . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /"},
26 | { input:["cursor,5,1", "key,1,right,left,shift,b"],
27 | result:"pzprv3/easyasabc/4/4/3/. . . . . . /. +[1,,,] 2 +[2,,,] . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /"},
28 | { input:["cursor,1,3", "key,shift,a,right,left", "mouse,right, 1,3"],
29 | result:"pzprv3/easyasabc/4/4/3/. . . . . . /. +[1,,,] 2 +[2,,,] . . /. -[1,,,] . . . . /. . . . . . /. . . . . . /. . . . . . /"},
30 | { input:["mouse,left, 1,3"],
31 | result:"pzprv3/easyasabc/4/4/3/. . . . . . /. +[1,,,] 2 +[2,,,] . . /. .[1,,,] . . . . /. . . . . . /. . . . . . /. . . . . . /"},
32 | { input:["cursor,1,1", "key,-"],
33 | result:"pzprv3/easyasabc/4/4/3/. . . . . . /. .[1,,,] 2 +[2,,,] . . /. .[1,,,] . . . . /. . . . . . /. . . . . . /. . . . . . /"},
34 | { input:["cursor,5,1", "key, "],
35 | result:"pzprv3/easyasabc/4/4/3/. . . . . . /. .[1,,,] 2 . . . /. .[1,,,] . . . . /. . . . . . /. . . . . . /. . . . . . /"}
36 | ]
37 | });
38 |
--------------------------------------------------------------------------------
/test/script/test_factors.js:
--------------------------------------------------------------------------------
1 | /* test_factors.js */
2 |
3 | ui.debug.addDebugData('factors', {
4 | url : '5/5/rvvcm9jf54653-28ca2833-14',
5 | failcheck : [
6 | ['nmDupRow', "pzprv3/factors/5/5/1 1 0 1 /1 1 1 1 /1 1 1 1 /1 1 1 0 /1 1 0 0 /1 0 1 1 0 /0 1 0 0 1 /1 0 0 1 1 /0 1 1 1 1 /5 4 6 . 5 /3 . 40 12 . /. 10 . . 2 /8 . . 3 . /. 3 20 . . /5 . . . 5 /. . . . 1 /. . . . . /. . . . . /. . . . . /"],
7 | ['nmProduct',"pzprv3/factors/5/5/1 1 0 1 /1 1 1 1 /1 1 1 1 /1 1 1 0 /1 1 0 0 /1 0 1 1 0 /0 1 0 0 1 /1 0 0 1 1 /0 1 1 1 1 /5 4 6 . 5 /3 . 40 12 . /. 10 . . 2 /8 . . 3 . /. 3 20 . . /5 . . . 2 /. . . . 5 /. . . . . /. . . . . /. . . . . /"],
8 | ['ceNoNum', "pzprv3/factors/5/5/1 1 0 1 /1 1 1 1 /1 1 1 1 /1 1 1 0 /1 1 0 0 /1 0 1 1 0 /0 1 0 0 1 /1 0 0 1 1 /0 1 1 1 1 /5 4 6 . 5 /3 . 40 12 . /. 10 . . 2 /8 . . 3 . /. 3 20 . . /5 4 . . 1 /3 1 . 4 5 /1 . . 3 . /. . . . . /. . . . . /"],
9 | [null, "pzprv3/factors/5/5/1 1 0 1 /1 1 1 1 /1 1 1 1 /1 1 1 0 /1 1 0 0 /1 0 1 1 0 /0 1 0 0 1 /1 0 0 1 1 /0 1 1 1 1 /5 4 6 . 5 /3 . 40 12 . /. 10 . . 2 /8 . . 3 . /. 3 20 . . /5 4 3 2 1 /3 1 2 4 5 /1 5 4 3 2 /4 2 5 1 3 /2 3 1 5 4 /"]
10 | ],
11 | inputs : [
12 | /* 問題入力テスト */
13 | { input:["editmode", "newboard,4,4"] },
14 | { input:["mouse,left, 0,2, 8,2", "mouse,left, 0,4, 8,4", "mouse,left, 0,6, 8,6", "mouse,left, 4,0, 4,8"] },
15 | { input:["cursor,0,0", "mouse,leftx2, 3,1", "mouse,leftx3, 3,3", "mouse,leftx4, 1,5", "mouse,leftx5, 1,7",
16 | "cursor,0,0", "mouse,rightx2, 7,1", "mouse,rightx3, 7,3", "mouse,rightx4, 5,5", "mouse,rightx5, 5,7"],
17 | result:"pzprv3/factors/4/4/0 1 0 /0 1 0 /0 1 0 /0 1 0 /1 1 1 1 /1 1 1 1 /1 1 1 1 /1 . 999999 . /2 . 999998 . /3 . 999997 . /4 . 999996 . /. . . . /. . . . /. . . . /. . . . /" },
18 | { input:["editmode", "newboard,4,4"] },
19 | { input:["mouse,left, 0,2, 8,2", "mouse,left, 0,4, 8,4", "mouse,left, 0,6, 8,6", "mouse,left, 4,0, 4,8"] },
20 | { input:["cursor,3,1", "key,1", "key,down,2", "key,down,5,0,0,0,0", "key,down,9,9,9,9,9,9"],
21 | result:"pzprv3/factors/4/4/0 1 0 /0 1 0 /0 1 0 /0 1 0 /1 1 1 1 /1 1 1 1 /1 1 1 1 /1 . . . /2 . . . /50000 . . . /999999 . . . /. . . . /. . . . /. . . . /. . . . /" },
22 | { input:["cursor,3,1", "key,-", "key,down,-,-", "key,down, "],
23 | result:"pzprv3/factors/4/4/0 1 0 /0 1 0 /0 1 0 /0 1 0 /1 1 1 1 /1 1 1 1 /1 1 1 1 /. . . . /. . . . /. . . . /999999 . . . /. . . . /. . . . /. . . . /. . . . /" }
24 | /* 回答入力はkakuroと同じなので省略 */
25 | ]
26 | });
27 |
--------------------------------------------------------------------------------
/test/script/test_fillmat.js:
--------------------------------------------------------------------------------
1 | /* test_fillmat.js */
2 |
3 | ui.debug.addDebugData('fillmat', {
4 | url : '5/5/3b3h1h1b4',
5 | failcheck : [
6 | ['bdCross' ,"pzprv3/fillmat/5/5/3 . . 3 . /. . . . . /. . 1 . . /. . . . . /. 1 . . 4 /0 1 0 0 /0 1 0 0 /0 1 0 0 /0 1 0 0 /0 1 0 0 /0 0 0 0 0 /1 1 1 0 0 /0 0 0 0 0 /0 0 0 0 0 /"],
7 | ['bsSizeEq',"pzprv3/fillmat/5/5/3 . . 3 . /. . . . . /. . 1 . . /. . . . . /. 1 . . 4 /0 0 1 1 /0 0 1 1 /0 0 1 1 /0 0 0 0 /0 0 0 0 /1 1 1 0 0 /0 0 0 0 0 /0 0 0 1 0 /0 0 0 0 0 /"],
8 | ['bkLenGt4',"pzprv3/fillmat/5/5/3 . . 3 . /. . . . . /. . 1 . . /. . . . . /. 1 . . 4 /1 0 0 0 /1 0 0 0 /1 0 0 0 /1 0 0 0 /1 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /"],
9 | ['bkNumGe2',"pzprv3/fillmat/5/5/3 . . 3 . /. . . . . /. . 1 . . /. . . . . /. 1 . . 4 /0 0 0 1 /0 0 1 0 /1 0 0 0 /0 1 0 0 /0 0 0 1 /1 1 1 1 1 /1 1 1 1 1 /1 1 1 1 1 /1 1 1 1 1 /"],
10 | ['bkSizeNe',"pzprv3/fillmat/5/5/3 . . 3 . /. . . . . /. . 1 . . /. . . . . /. 1 . . 4 /0 1 0 0 /0 0 0 1 /0 -1 2 -1 /1 0 -1 -1 /-1 -1 2 0 /1 1 1 1 1 /1 1 1 1 1 /1 1 1 1 1 /1 1 1 1 1 /"],
11 | [null, "pzprv3/fillmat/5/5/3 . . 3 . /. . . . . /. . 1 . . /. . . . . /. 1 . . 4 /1 1 0 0 /1 1 0 1 /1 1 1 1 /1 1 1 1 /1 1 1 1 /0 -1 1 1 1 /0 -1 1 1 -1 /1 -1 1 -1 -1 /0 1 -1 0 -1 /"]
12 | ],
13 | inputs : [
14 | /* 問題入力, 回答入力はshikaku等と同じなので省略 */
15 | ]
16 | });
17 |
--------------------------------------------------------------------------------
/test/script/test_fivecells.js:
--------------------------------------------------------------------------------
1 | /* test_fivecells.js */
2 |
3 | ui.debug.addDebugData('fivecells', {
4 | url : '6/6/72b1i0f2b1i3a',
5 | failcheck : [
6 | ['bkSizeLt5', "pzprv3/fivecells/6/6/* 2 . . 1 . /. . . . . . /. . 0 . . . /. . . 2 . . /1 . . . . . /. . . . 3 . /0 0 0 1 0 0 0 /0 0 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 /0 0 0 0 0 0 0 /0 0 0 0 0 0 /0 0 1 0 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 0 0 0 /"],
7 | ['nmBorderNe',"pzprv3/fivecells/6/6/* 2 . . 1 . /. . . . . . /. . 0 . . . /. . . 2 . . /1 . . . . . /. . . . 3 . /0 0 -1 1 -1 -1 0 /0 0 1 1 0 0 0 /0 1 -1 -1 1 0 0 /0 0 1 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 -1 1 0 -1 0 /0 1 -1 1 0 0 /0 1 -1 1 0 0 /0 0 1 2 0 0 /0 0 0 0 0 0 /0 0 0 0 0 0 /"],
8 | ['bdDeadEnd', "pzprv3/fivecells/6/6/* 2 . . 1 . /. . . . . . /. . 0 . . . /. . . 2 . . /1 . . . . . /. . . . 3 . /0 0 -1 1 -1 -1 0 /0 0 1 1 -1 1 0 /0 1 -1 -1 1 0 0 /0 1 1 1 -1 0 0 /0 -1 1 0 0 0 0 /0 1 0 0 0 1 0 /0 0 0 0 0 0 /0 -1 1 -1 -1 1 /0 1 -1 1 1 0 /1 1 -1 1 0 0 /-1 -1 1 -1 0 0 /-1 1 0 0 1 0 /0 0 0 0 0 0 /"],
9 | ['bkSizeGt5', "pzprv3/fivecells/6/6/* 2 . . 1 . /. . . . . . /. . 0 . . . /. . . 2 . . /1 . . . . . /. . . . 3 . /0 0 -1 1 -1 -1 0 /0 0 1 1 -1 1 0 /0 1 -1 -1 1 0 0 /0 0 1 1 -1 0 0 /0 -1 1 1 0 0 0 /0 1 0 0 0 1 0 /0 0 0 0 0 0 /0 -1 1 -1 -1 1 /0 1 -1 1 1 0 /1 1 -1 1 0 0 /-1 -1 1 -1 0 0 /-1 1 0 1 1 0 /0 0 0 0 0 0 /"],
10 | [null, "pzprv3/fivecells/6/6/* 2 . . 1 . /. . . . . . /. . 0 . . . /. . . 2 . . /1 . . . . . /. . . . 3 . /0 0 -1 1 -1 -1 0 /0 0 1 1 -1 1 0 /0 1 -1 -1 1 1 0 /0 0 1 1 -1 1 0 /0 -1 1 1 0 1 0 /0 1 0 0 0 1 0 /0 0 0 0 0 0 /0 -1 1 -1 -1 1 /0 1 -1 1 1 -1 /1 1 -1 1 0 -1 /-1 -1 1 -1 0 -1 /-1 1 0 1 1 0 /0 0 0 0 0 0 /"]
11 | ],
12 | inputs : [
13 | /* 問題入力テスト */
14 | { input:["newboard,5,1", "editmode"] },
15 | { input:["cursor,1,1", "key,w", "key,right,w", "key,left,w" ],
16 | result:"pzprv3/fivecells/1/5/. * . . . /0 0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /" }
17 | /* その他の問題入力はnurikabeと同じなので省略 */
18 | /* 回答入力はsashiganeと同じなので省略 */
19 | ]
20 | });
21 |
--------------------------------------------------------------------------------
/test/script/test_fourcells.js:
--------------------------------------------------------------------------------
1 | /* test_fourcells.js */
2 |
3 | ui.debug.addDebugData('fourcells', {
4 | url : '6/6/b1d2a3e3d1f2b2a3b2',
5 | failcheck : [
6 | ['bkSizeLt4', "pzprv3/fourcells/6/6/. . 1 . . . /. 2 . 3 . . /. . . 3 . . /. . 1 . . . /. . . 2 . . /2 . 3 . . 2 /1 0 0 0 0 /1 0 0 1 1 /0 0 0 1 1 /0 0 0 0 0 /1 0 1 0 0 /0 0 0 0 0 /0 0 0 0 1 0 /1 0 0 0 0 0 /0 0 0 0 1 0 /0 1 1 0 0 0 /0 1 1 0 0 0 /"],
7 | ['nmBorderNe',"pzprv3/fourcells/6/6/. . 1 . . . /. 2 . 3 . . /. . . 3 . . /. . 1 . . . /. . . 2 . . /2 . 3 . . 2 /1 -1 -1 1 0 /-1 1 1 0 0 /1 1 0 0 0 /0 0 1 0 0 /1 0 0 0 0 /-1 0 1 0 0 /-1 1 -1 1 0 0 /1 -1 1 0 0 0 /-1 1 1 0 0 0 /1 1 1 0 0 0 /-1 1 1 0 0 0 /"],
8 | ['bdDeadEnd', "pzprv3/fourcells/6/6/. . 1 . . . /. 2 . 3 . . /. . . 3 . . /. . 1 . . . /. . . 2 . . /2 . 3 . . 2 /1 -1 -1 1 0 /-1 1 1 0 0 /1 1 1 0 0 /0 1 0 1 0 /1 1 1 0 0 /-1 0 1 0 0 /-1 1 -1 1 0 0 /1 -1 1 1 1 0 /-1 1 0 1 0 0 /1 0 0 1 0 0 /-1 1 1 0 0 0 /"],
9 | ['bkSizeGt4', "pzprv3/fourcells/6/6/. . 1 . . . /. 2 . 3 . . /. . . 3 . . /. . 1 . . . /. . . 2 . . /2 . 3 . . 2 /1 -1 -1 1 0 /-1 1 1 0 1 /1 1 1 0 0 /0 1 0 1 0 /1 1 1 0 0 /-1 0 1 0 0 /-1 1 -1 1 0 1 /1 -1 1 1 1 0 /-1 1 0 1 0 0 /1 0 0 1 0 0 /-1 1 1 0 0 0 /"],
10 | [null, "pzprv3/fourcells/6/6/. . 1 . . . /. 2 . 3 . . /. . . 3 . . /. . 1 . . . /. . . 2 . . /2 . 3 . . 2 /1 -1 -1 1 0 /-1 1 1 0 1 /1 1 1 0 0 /0 1 0 1 1 /1 1 1 -1 1 /-1 0 1 1 0 /-1 1 -1 1 0 1 /1 -1 1 1 1 0 /-1 1 0 1 1 1 /1 0 0 1 0 0 /-1 1 1 -1 1 0 /"]
11 | ],
12 | inputs : [
13 | /* 問題入力, 回答入力はfivecellsと同じなので省略 */
14 | ]
15 | });
16 |
--------------------------------------------------------------------------------
/test/script/test_goishi.js:
--------------------------------------------------------------------------------
1 | /* test_goishi.js */
2 |
3 | ui.debug.addDebugData('goishi', {
4 | url : '6/7/vsten1tvo',
5 | failcheck : [
6 | ['brNoStone', "pzprv3/goishi/7/6"],
7 | ['goishiRemains',"pzprv3/goishi/7/6/. . . . . . /. . 0 0 . . /. 5 . 4 . . /. 0 . 3 . . /. 0 0 2 1 . /. . . 0 . . /. . . . . . /"],
8 | [null, "pzprv3/goishi/7/6/. . . . . . /. . 9 10 . . /. 5 . 4 . . /. 6 . 3 . . /. 7 8 2 1 . /. . . 11 . . /. . . . . . /"]
9 | ],
10 | inputs : [
11 | /* 問題入力テスト */
12 | { input:["newboard,4,4", "editmode"] },
13 | { input:["cursor,3,3", "key,q", "key,right,q,q"],
14 | result:"pzprv3/goishi/4/4/. . . . /. 0 . . /. . . . /. . . . /" },
15 | { input:["cursor,3,5", "mouse,left, 3,5", "mouse,left, 5,5", "mouse,leftx2, 7,5"],
16 | result:"pzprv3/goishi/4/4/. . . . /. 0 . . /. 0 0 . /. . . . /" },
17 | /* 回答入力テスト */
18 | { input:["playmode", "mouse,left, 1,1"],
19 | result:"pzprv3/goishi/4/4/. . . . /. 0 . . /. 0 0 . /. . . . /" },
20 | { input:["mouse,left, 3,3", "mouse,left, 5,5", "mouse,left, 3,5"],
21 | result:"pzprv3/goishi/4/4/. . . . /. 1 . . /. 2 0 . /. . . . /" }
22 | ]
23 | });
24 |
--------------------------------------------------------------------------------
/test/script/test_gokigen.js:
--------------------------------------------------------------------------------
1 | /* test_gokigen.js */
2 |
3 | ui.debug.addDebugData('gokigen', {
4 | url : '4/4/iaegcgcj6a',
5 | failcheck : [
6 | ['slLoop', "pzprv3/gokigen/4/4/. . . 0 . /. 4 . . . /2 . . . 2 /. . . . . /. 1 . 0 . /. 2 1 . /2 . . 1 /1 . . 2 /. 1 2 . /"],
7 | ['crConnSlNe',"pzprv3/gokigen/4/4/. . . 0 . /. 4 . . . /2 . . . 2 /. . . . . /. 1 . 0 . /. 2 1 . /2 . . 1 /1 . . 2 /. . 2 . /"],
8 | ['ceNoSlash', "pzprv3/gokigen/4/4/. . . 0 . /. 4 . . . /2 . . . 2 /. . . . . /. 1 . 0 . /1 2 1 2 /2 1 . 1 /1 . . 2 /. 2 2 1 /"],
9 | [null, "pzprv3/gokigen/4/4/. . . 0 . /. 4 . . . /2 . . . 2 /. . . . . /. 1 . 0 . /1 2 1 2 /2 1 1 1 /1 1 2 2 /2 2 2 1 /"]
10 | ],
11 | inputs : [
12 | /* 問題入力はcreekでやっているので省略 */
13 | /* 回答入力テスト */
14 | { input:["newboard,3,2", "playmode", "setconfig,use,1", "ansclear"] },
15 | { input:["mouse,left, 1,1", "mouse,leftx2, 3,1", "mouse,leftx3, 5,1",
16 | "mouse,right, 1,3", "mouse,rightx2, 3,3", "mouse,rightx3, 5,3"],
17 | result:"pzprv3/gokigen/2/3/. . . . /. . . . /. . . . /1 . 1 /2 . 2 /" },
18 | { input:["newboard,3,2", "playmode", "setconfig,use,2", "ansclear"] },
19 | { input:["mouse,left, 1,1", "mouse,leftx2, 3,1", "mouse,leftx3, 5,1",
20 | "mouse,right, 1,3", "mouse,rightx2, 3,3", "mouse,rightx3, 5,3"],
21 | result:"pzprv3/gokigen/2/3/. . . . /. . . . /. . . . /1 2 . /2 1 . /" },
22 | { input:["newboard,3,2", "playmode"] },
23 | { input:["mouse,left, 1,1, 4,4", "mouse,left, 1,3, 4,0, 5,1"],
24 | result:"pzprv3/gokigen/2/3/. . . . /. . . . /. . . . /1 2 1 /2 1 . /" },
25 | { input:["mouse,left, 0,4, 2,2, 1.9,4, 4,0"],
26 | result:"pzprv3/gokigen/2/3/. . . . /. . . . /. . . . /1 . 1 /. 1 . /" }
27 | ]
28 | });
29 |
--------------------------------------------------------------------------------
/test/script/test_hashikake.js:
--------------------------------------------------------------------------------
1 | /* test_hashikake.js */
2 |
3 | ui.debug.addDebugData('hashikake', {
4 | url : '5/5/4g2i3h23k3g1g3g4g3',
5 | failcheck : [
6 | ['brNoLine', "pzprv3/hashikake/5/5"],
7 | ['nmLineGt', "pzprv3/hashikake/5/5/4 . 2 . . /. 3 . . 2 /3 . . . . /. 3 . 1 . /3 . 4 . 3 /2 2 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /2 0 0 0 0 /2 0 0 0 0 /2 0 0 0 0 /2 0 0 0 0 /"],
8 | ['lcDivided', "pzprv3/hashikake/5/5/4 . 2 . . /. 3 . . 2 /3 . . . . /. 3 . 1 . /3 . 4 . 3 /2 2 0 0 /0 1 1 1 /-1 0 0 0 /0 0 0 0 /0 0 0 0 /2 0 0 0 0 /2 1 0 0 0 /1 1 0 0 0 /1 0 0 0 0 /"],
9 | ['nmLineLt', "pzprv3/hashikake/5/5/4 . 2 . . /. 3 . . 2 /3 . . . . /. 3 . 1 . /3 . 4 . 3 /2 2 0 0 /0 1 1 1 /-1 0 0 0 /0 1 1 0 /1 1 1 1 /2 0 0 0 0 /2 1 0 0 1 /1 1 0 0 1 /1 0 0 0 1 /"],
10 | [null, "pzprv3/hashikake/5/5/4 . 2 . . /. 3 . . 2 /3 . . . . /. 3 . 1 . /3 . 4 . 3 /2 2 0 0 /0 1 1 1 /-1 0 -1 -1 /0 1 1 -1 /2 2 2 2 /2 0 0 0 0 /2 2 0 0 1 /1 2 0 -1 1 /1 0 0 -1 1 /"]
11 | ],
12 | inputs : [
13 | /* 問題入力テスト */
14 | { input:["newboard,5,1", "editmode"] },
15 | { input:["cursor,1,1", "key,-", "key,right", "key,0", "key,right", "key,1", "key,right", "key,2", "key,right", "key,1,0" ],
16 | result:"pzprv3/hashikake/1/5/- . 1 2 1 /0 0 0 0 /" },
17 | { input:["cursor,1,1", "key,-", "key,right", "key,-", "key,right", "key,-", "key,-" ],
18 | result:"pzprv3/hashikake/1/5/. - . 2 1 /0 0 0 0 /" },
19 | { input:["newboard,10,2", "editmode"] },
20 | { input:["newboard,6,1"] },
21 | { input:["cursor,0,0", "mouse,leftx2, 1,1", "mouse,leftx3, 3,1", "mouse,leftx4, 5,1", "mouse,leftx5, 7,1", "mouse,leftx6, 9,1", "mouse,rightx2, 11,1"],
22 | result:"pzprv3/hashikake/1/6/- 1 2 3 4 8 /0 0 0 0 0 /" },
23 | /* 回答入力テスト */
24 | { input:["newboard,4,4", "editmode"] },
25 | { input:["cursor,1,3", "key,1", "cursor,3,1", "key,2", "cursor,3,7", "key,4", "cursor,7,3", "key,3", "cursor,7,7", "key,4", "playmode"] },
26 | { input:["mouse,left, 3,1, 3,3", "mouse,left, 1,3, 3,3", "mouse,left, 3,3, 3,1", "mouse,left, 7,3, 7,7", "mouse,left, 7,7, 7,3" ],
27 | result:"pzprv3/hashikake/4/4/. 2 . . /1 . . 3 /. . . . /. 4 . 4 /0 0 0 /1 1 1 /0 0 0 /0 0 0 /0 2 0 0 /0 2 0 2 /0 2 0 2 /"},
28 | { input:["mouse,right, 7,6, 6,7"],
29 | result:"pzprv3/hashikake/4/4/. 2 . . /1 . . 3 /. . . . /. 4 . 4 /0 0 0 /1 1 1 /0 0 0 /0 0 -1 /0 2 0 0 /0 2 0 0 /0 2 0 -1 /"},
30 | { input:["mouse,left, 7,5, 7,7, 5,7", "mouse,left, 5,7, 7,7, 7,5"],
31 | result:"pzprv3/hashikake/4/4/. 2 . . /1 . . 3 /. . . . /. 4 . 4 /0 0 0 /1 1 1 /0 0 0 /0 2 2 /0 2 0 0 /0 2 0 2 /0 2 0 2 /"}
32 | ]
33 | });
34 |
--------------------------------------------------------------------------------
/test/script/test_heyawake.js:
--------------------------------------------------------------------------------
1 | /* test_heyawake.js */
2 |
3 | ui.debug.addDebugData('heyawake', {
4 | url : '6/6/lll155007rs12222j',
5 | failcheck : [
6 | ['brNoShade', "pzprv3/heyawake/6/6"],
7 | ['csAdjacent', "pzprv3/heyawake/6/6/8/0 1 1 2 2 3 /0 1 1 2 2 3 /0 1 1 2 2 3 /4 4 4 4 4 3 /5 5 5 6 6 3 /5 5 5 6 6 7 /2 2 . 2 . 2 /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. # . . . . /. # . . . . /. . . . . . /. . . . . . /"],
8 | ['cuDivideRB', "pzprv3/heyawake/6/6/8/0 1 1 2 2 3 /0 1 1 2 2 3 /0 1 1 2 2 3 /4 4 4 4 4 3 /5 5 5 6 6 3 /5 5 5 6 6 7 /2 2 . 2 . 2 /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /# . # . . . /. . . # . . /# . # . . . /. # . . . . /. . . . . . /. . . . . . /"],
9 | ['bkShadeNe', "pzprv3/heyawake/6/6/8/0 1 1 2 2 3 /0 1 1 2 2 3 /0 1 1 2 2 3 /4 4 4 4 4 3 /5 5 5 6 6 3 /5 5 5 6 6 7 /2 2 . 2 . 2 /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /# . . . . . /. . . # . . /# . # . # . /. # . . . . /. . . . . . /. . . . . . /"],
10 | ['bkUnshadeConsecGt3',"pzprv3/heyawake/6/6/8/0 1 1 2 2 3 /0 1 1 2 2 3 /0 1 1 2 2 3 /4 4 4 4 4 3 /5 5 5 6 6 3 /5 5 5 6 6 7 /2 2 . 2 . 2 /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /# + # + + # /+ + + # + + /# + # + # + /+ + + + + + /. # . # . # /. . . . . . /"],
11 | [null, "pzprv3/heyawake/6/6/8/0 1 1 2 2 3 /0 1 1 2 2 3 /0 1 1 2 2 3 /4 4 4 4 4 3 /5 5 5 6 6 3 /5 5 5 6 6 7 /2 2 . 2 . 2 /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /# + # + + # /+ + + # + + /# + # + # + /+ + + + + + /. # . # . # /. . # . . . /"]
12 | ],
13 | inputs : [] /* hitori, shimaguniと同じなので省略 */
14 | });
15 |
--------------------------------------------------------------------------------
/test/script/test_ichimaga.js:
--------------------------------------------------------------------------------
1 | /* test_ichimaga.js */
2 |
3 | ui.debug.addDebugData('ichimaga', {
4 | url : '5/5/gdiedgdbic',
5 | failcheck : [
6 | ['brNoLine', "pzprv3/ichimaga/5/5/def"],
7 | ['lnBranch', "pzprv3/ichimaga/5/5/def/. 3 . . . /. . 4 . . /3 . . . 3 /. . 1 . . /. . . 2 . /1 1 1 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /1 1 1 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /"],
8 | ['lcCurveGt1',"pzprv3/ichimaga/5/5/def/. 3 . . . /. . 4 . . /3 . . . 3 /. . 1 . . /. . . 2 . /1 1 -1 0 /0 0 0 0 /0 1 0 0 /0 0 0 0 /0 0 0 0 /1 1 1 0 0 /0 1 0 0 0 /0 0 1 0 0 /0 0 0 0 0 /"],
9 | ['lnCross', "pzprv3/ichimaga/5/5/def/. 3 . . . /. . 4 . . /3 . . . 3 /. . 1 . . /. . . 2 . /1 1 -1 0 /0 0 0 0 /1 1 0 0 /0 0 0 0 /0 0 0 0 /1 1 1 0 0 /1 1 0 0 0 /1 1 0 0 0 /0 0 0 0 0 /"],
10 | ['lcDivided', "pzprv3/ichimaga/5/5/def/. 3 . . . /. . 4 . . /3 . . . 3 /. . 1 . . /. . . 2 . /1 1 -1 0 /0 1 1 1 /1 0 0 1 /0 0 0 0 /0 0 1 0 /1 1 1 -1 0 /1 -1 1 -1 1 /1 0 0 0 1 /0 0 1 0 0 /"],
11 | ['lcDeadEnd', "pzprv3/ichimaga/5/5/def/. 3 . . . /. . 4 . . /3 . . . 3 /. . 1 . . /. . . 2 . /1 1 -1 0 /0 1 1 1 /1 0 0 1 /0 0 0 0 /0 0 0 0 /1 1 1 -1 0 /1 -1 1 -1 1 /1 0 0 0 1 /0 0 0 0 0 /"],
12 | ['nmLineNe', "pzprv3/ichimaga/5/5/def/. 3 . . . /. . 4 . . /2 . . . 3 /. . 1 . . /. . . 2 . /1 1 -1 0 /0 1 1 1 /1 1 -1 1 /1 1 0 0 /0 0 0 1 /1 1 1 -1 0 /1 -1 1 -1 1 /1 -1 -1 1 1 /0 0 0 1 1 /"],
13 | ['nmNoLine', "pzprv3/ichimaga/5/5/def/. 3 . . . /. . 4 . . /3 . . . 3 /. . 1 . . /. - . 2 . /1 1 -1 0 /0 1 1 1 /1 1 -1 1 /1 1 0 0 /0 0 0 1 /1 1 1 -1 0 /1 -1 1 -1 1 /1 -1 -1 1 1 /0 0 0 1 1 /"],
14 | [null, "pzprv3/ichimaga/5/5/def/. 3 . . . /. . 4 . . /3 . . . 3 /. . 1 . . /. . . 2 . /1 1 -1 0 /0 1 1 1 /1 1 -1 1 /1 1 0 0 /0 0 0 1 /1 1 1 -1 0 /1 -1 1 -1 1 /1 -1 -1 1 1 /0 0 0 1 1 /"]
15 | ],
16 | inputs : [
17 | /* 回答入力はfireflyと同じなので省略 */
18 | /* 問題入力テスト */
19 | { input:["newboard,5,1", "editmode"] },
20 | { input:["cursor,1,1", "key,-", "key,right", "key,0", "key,right", "key,1", "key,right", "key,2", "key,right", "key,1,0" ],
21 | result:"pzprv3/ichimaga/1/5/def/- . 1 2 1 /0 0 0 0 /" },
22 | { input:["cursor,1,1", "key,-", "key,right", "key,-", "key,right", "key,-", "key,-" ],
23 | result:"pzprv3/ichimaga/1/5/def/. - . 2 1 /0 0 0 0 /" },
24 | { input:["newboard,6,2", "editmode"] },
25 | { input:["cursor,0,0", "mouse,leftx2, 1,1", "mouse,leftx3, 3,1", "mouse,leftx4, 5,1", "mouse,leftx5, 7,1", "mouse,leftx6, 9,1", "mouse,leftx7, 11,1",
26 | "cursor,0,0", "mouse,rightx2, 1,3", "mouse,rightx3, 3,3", "mouse,rightx4, 5,3", "mouse,rightx5, 7,3", "mouse,rightx6, 9,3", "mouse,rightx7, 11,3"],
27 | result:"pzprv3/ichimaga/2/6/def/- 1 2 3 4 . /4 3 2 1 - . /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 0 /" }
28 | ]
29 | });
30 |
--------------------------------------------------------------------------------
/test/script/test_ichimagam.js:
--------------------------------------------------------------------------------
1 | /* test_ichimagam.js */
2 |
3 | ui.debug.addDebugData('ichimagam', {
4 | url : '5/5/7cgegbegbgcc',
5 | failcheck : [
6 | ['brNoLine', "pzprv3/ichimaga/5/5/mag"],
7 | ['lnBranch', "pzprv3/ichimaga/5/5/mag/2 . 2 . . /. 4 . . . /1 . . 4 . /. . 1 . . /. 2 . . 2 /1 1 1 1 /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 0 0 /0 0 0 0 0 /"],
8 | ['lnCross', "pzprv3/ichimaga/5/5/mag/2 . 2 . . /. 4 . . . /1 . . 4 . /. . 1 . . /. 2 . . 2 /1 1 1 0 /0 0 1 1 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 1 1 0 /0 0 0 1 1 /0 0 0 0 1 /0 0 0 0 1 /"],
9 | ['lcSameNum', "pzprv3/ichimaga/5/5/mag/2 . 2 . . /. 4 . . . /1 . . 4 . /. . 1 . . /. 2 . . 2 /0 0 0 0 /1 1 1 0 /0 1 1 1 /0 0 0 0 /0 0 0 1 /0 1 0 0 0 /0 1 0 1 0 /0 0 0 1 0 /0 0 0 1 0 /"],
10 | ['lcCurveGt1',"pzprv3/ichimaga/5/5/mag/2 . 2 . . /. 4 . . . /1 . . 4 . /. . 1 . . /. 2 . . 2 /0 0 0 0 /1 0 1 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 1 0 0 0 /0 1 1 1 0 /0 0 1 0 0 /0 0 0 0 0 /"],
11 | ['lcDeadEnd', "pzprv3/ichimaga/5/5/mag/2 . 2 . . /. 4 . . . /1 . . 4 . /. . 1 . . /. 2 . . 2 /0 0 0 0 /1 1 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 0 0 0 0 /0 0 0 0 0 /"],
12 | ['lcDivided', "pzprv3/ichimaga/5/5/mag/2 . 2 . . /. 4 . . . /1 . . 4 . /. . 1 . . /. 2 . . 2 /0 0 0 0 /1 1 0 0 /0 0 1 1 /0 0 0 0 /0 0 0 0 /0 1 0 0 0 /0 1 0 1 0 /0 0 0 1 0 /0 0 0 0 0 /"],
13 | ['nmLineNe', "pzprv3/ichimagam/5/5/mag/2 . 2 . . /. 4 . . . /1 . . 4 . /. . 1 . . /. 2 . . 2 /1 0 1 0 /1 1 0 0 /0 0 1 1 /0 0 0 0 /1 1 0 1 /1 1 1 1 0 /0 1 0 1 0 /1 1 1 1 1 /1 1 1 1 1 /"],
14 | ['nmNoLine', "pzprv3/ichimagam/5/5/mag/2 . 2 . . /. 4 . . - /1 . . 4 . /. . 1 . . /. 2 . . 2 /1 0 1 0 /1 1 0 0 /0 0 1 1 /0 0 0 0 /1 0 0 1 /1 1 1 1 0 /0 1 0 1 0 /1 1 1 1 1 /1 1 0 1 1 /"],
15 | [null, "pzprv3/ichimaga/5/5/mag/2 . 2 . . /. 4 . . . /1 . . 4 . /. . 1 . . /. 2 . . 2 /1 0 1 -1 /1 1 0 -1 /-1 -1 1 1 /0 -1 -1 0 /1 0 0 1 /1 1 1 1 -1 /-1 1 -1 1 -1 /1 1 1 1 1 /1 1 -1 1 1 /"]
16 | ],
17 | inputs : [
18 | /* 回答入力はfireflyと同じなので省略 */
19 | /* 問題入力はichimagaと同じなので省略 */
20 | ]
21 | });
22 |
--------------------------------------------------------------------------------
/test/script/test_ichimagax.js:
--------------------------------------------------------------------------------
1 | /* test_ichimagax.js */
2 |
3 | ui.debug.addDebugData('ichimagax', {
4 | url : '5/5/g8bgedgbeg8b',
5 | failcheck : [
6 | ['brNoLine', "pzprv3/ichimagax/5/5/cross"],
7 | ['lnBranch', "pzprv3/ichimagax/5/5/cross/. 3 . 1 . /. . 4 . . /3 . . . 1 /. . 4 . . /. 3 . 1 . /1 1 0 0 /1 1 1 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /1 1 1 0 0 /1 0 1 0 0 /0 0 0 0 0 /0 0 0 0 0 /"],
8 | ['lcCurveGt1',"pzprv3/ichimagax/5/5/cross/. 3 . 1 . /. . 4 . . /3 . . . 1 /. . 4 . . /. 3 . 1 . /1 1 0 0 /0 1 1 0 /1 0 0 0 /0 1 0 0 /0 0 0 0 /1 1 1 0 0 /1 0 1 0 0 /0 1 0 0 0 /0 0 0 0 0 /"],
9 | ['lcDivided', "pzprv3/ichimagax/5/5/cross/. 3 . 1 . /. . 4 . . /3 . . . 1 /. . 4 . . /. 3 . 1 . /1 1 0 0 /0 1 1 0 /1 0 0 0 /0 0 0 0 /1 1 0 0 /1 1 1 0 0 /1 0 1 0 0 /1 0 0 0 0 /0 1 0 0 0 /"],
10 | ['lcDeadEnd', "pzprv3/ichimagax/5/5/cross/. 3 . 1 . /. . 4 . . /3 . . . 1 /. . 4 . . /. 3 . 1 . /1 1 0 0 /0 1 1 0 /0 0 0 0 /0 1 1 0 /1 1 0 0 /1 1 1 0 0 /1 0 1 0 0 /1 0 1 0 0 /1 1 1 1 0 /"],
11 | ['nmLineNe', "pzprv3/ichimagax/5/5/cross/. 3 . 1 . /. . 4 . . /3 . . . 1 /. . 4 . . /. 3 . 1 . /1 1 0 0 /0 1 1 0 /0 0 0 0 /0 1 1 0 /1 1 0 0 /1 1 1 1 0 /1 0 1 0 0 /1 0 1 0 0 /1 1 1 1 0 /"],
12 | ['nmNoLine', "pzprv3/ichimagax/5/5/cross/. 3 . 1 . /. . 4 . . /3 . . . 1 /. . 4 . - /. 3 . 1 . /1 1 0 0 /0 1 1 0 /1 1 1 1 /0 1 1 0 /1 1 0 0 /1 1 1 1 0 /1 0 1 0 0 /1 0 1 0 0 /1 1 1 1 0 /"],
13 | [null, "pzprv3/ichimagax/5/5/cross/. 3 . 1 . /. . 4 . . /3 . . . 1 /. . 4 . . /. 3 . 1 . /1 1 0 -1 /-1 1 1 -1 /1 1 1 1 /-1 1 1 0 /1 1 0 0 /1 1 1 1 -1 /1 -1 1 0 -1 /1 -1 1 0 0 /1 1 1 1 0 /"]
14 | ],
15 | inputs : [
16 | /* 回答入力はfireflyと同じなので省略 */
17 | /* 問題入力はichimagaと同じなので省略 */
18 | ]
19 | });
20 |
--------------------------------------------------------------------------------
/test/script/test_juosan.js:
--------------------------------------------------------------------------------
1 | /* test_juosan.js */
2 |
3 | ui.debug.addDebugData('juosan', {
4 | url : '5/5/8mdnvues132g213g22g',
5 | failcheck : [
6 | ["baParaGe3", "pzprv3/juosan/5/5/11/0 0 1 1 1 /2 2 3 3 4 /5 6 6 6 4 /5 7 7 8 4 /9 9 10 8 4 /1 . 3 . . /2 . . . 2 /1 3 . . . /. . . 2 . /2 . . . . /0 0 2 2 2 /0 0 2 2 0 /0 2 2 2 0 /0 0 0 0 0 /0 0 0 0 0 /"],
7 | ["bkMajorBarGt","pzprv3/juosan/5/5/11/0 0 1 1 1 /2 2 3 3 4 /5 6 6 6 4 /5 7 7 8 4 /9 9 10 8 4 /1 . 3 . . /2 . . . 2 /1 3 . . . /. . . 2 . /2 . . . . /0 0 2 2 2 /0 0 1 1 0 /0 2 2 2 1 /0 0 0 0 1 /0 0 0 0 1 /"],
8 | ["bkMajorBarLt","pzprv3/juosan/5/5/11/0 0 1 1 1 /2 2 3 3 4 /5 6 6 6 4 /5 7 7 8 4 /9 9 10 8 4 /1 . 3 . . /2 . . . 2 /1 3 . . . /. . . 2 . /2 . . . . /0 1 2 2 2 /0 2 1 1 2 /0 2 2 2 0 /0 1 0 0 0 /0 0 0 0 0 /"],
9 | ["ceNoBar", "pzprv3/juosan/5/5/11/0 0 1 1 1 /2 2 3 3 4 /5 6 6 6 4 /5 7 7 8 4 /9 9 10 8 4 /1 . 3 . . /2 . . . 2 /1 3 . . . /. . . 2 . /2 . . . . /2 1 2 2 2 /2 2 1 1 2 /1 2 2 2 0 /2 1 2 1 0 /2 2 1 1 2 /"],
10 | [null, "pzprv3/juosan/5/5/11/0 0 1 1 1 /2 2 3 3 4 /5 6 6 6 4 /5 7 7 8 4 /9 9 10 8 4 /1 . 3 . . /2 . . . 2 /1 3 . . . /. . . 2 . /2 . . . . /2 1 2 2 2 /2 2 1 1 2 /1 2 2 2 1 /2 1 2 1 1 /2 2 1 1 2 /"]
11 | ],
12 | inputs : [
13 | /* 問題入力はなげなわと同じ */
14 | /* 回答入力はタテボーヨコボーと同じ */
15 | ]
16 | });
17 |
--------------------------------------------------------------------------------
/test/script/test_kakuro.js:
--------------------------------------------------------------------------------
1 | /* test_kakuro.js */
2 |
3 | ui.debug.addDebugData('kakuro', {
4 | url : '5/5/48la0.na0lh3l0Bn.0cl.c4a3',
5 | failcheck : [
6 | ['nmDupRow', "pzprv3/kakuro/5/5/0 0 12 4 0 0 /0 8,4 . . 0,10 0,0 /10 . . . . 0,10 /3 . . 3,17 . . /0 21,0 . . . . /0 0,0 12,0 . . 0,0 /. . . . . /2 . . . . /2 . . . . /. . . . . /. . . . . /"],
7 | ['nmSumRowNe',"pzprv3/kakuro/5/5/0 0 12 4 0 0 /0 8,4 . . 0,10 0,0 /10 . . . . 0,10 /3 . . 3,17 . . /0 21,0 . . . . /0 0,0 12,0 . . 0,0 /. . 3 . . /3 4 1 5 . /1 2 . . . /. . . . . /. . . . . /"],
8 | ['ceNoNum', "pzprv3/kakuro/5/5/0 0 12 4 0 0 /0 8,4 . . 0,10 0,0 /10 . . . . 0,10 /3 . . 3,17 . . /0 21,0 . . . . /0 0,0 12,0 . . 0,0 /. . 3 . . /3 4 1 2 . /1 2 . 1 2 /. . 9 . 8 /. . 8 4 . /"],
9 | [null, "pzprv3/kakuro/5/5/0 0 12 4 0 0 /0 8,4 . . 0,10 0,0 /10 . . . . 0,10 /3 . . 3,17 . . /0 21,0 . . . . /0 0,0 12,0 . . 0,0 /. 5 3 . . /3 4 1 2 . /1 2 . 1 2 /. 1 9 3 8 /. . 8 4 . /"]
10 | ],
11 | inputs : [
12 | /* 問題入力テスト */
13 | { input:["newboard,5,2", "editmode"] },
14 | { input:["cursor,1,-1", "key,-", "key,right", "key,0", "key,right", "key,1", "key,right", "key,2", "key,right", "key,1", "key,0" ],
15 | result:"pzprv3/kakuro/2/5/0 0 0 1 2 10 /0 . . . . . /0 . . . . . /. . . . . /. . . . . /" },
16 | { input:["cursor,1,-1", "key,-", "key,right", "key,-", "key,right", "key,-", "key,-" ],
17 | result:"pzprv3/kakuro/2/5/0 0 0 0 2 10 /0 . . . . . /0 . . . . . /. . . . . /. . . . . /" },
18 | { input:["newboard,2,2", "editmode"] },
19 | { input:["cursor,0,0", "mouse,leftx2, 1,1", "key,1", "mouse,left, 1,1", "key,0", "mouse,left, 1,1"],
20 | result:"pzprv3/kakuro/2/2/0 0 0 /0 1,0 . /0 . . /. . /. . /" },
21 | { input:["newboard,2,2", "editmode"] },
22 | { input:["cursor,1,1", "key,q,0,shift,4,5,shift"],
23 | result:"pzprv3/kakuro/2/2/0 0 0 /0 0,45 . /0 . . /. . /. . /" },
24 | /* 回答入力テスト */
25 | { input:["newboard,5,1", "editmode", "cursor,9,1", "key,q", "playmode"] },
26 | { input:["cursor,1,1", "key,0", "key,right", "key,1", "key,right", "key,2", "key,right", "key,3", "key,right", "key,1,0" ],
27 | result:"pzprv3/kakuro/1/5/0 0 0 0 0 0 /0 . . . . 0,0 /. 1 2 3 1 /" },
28 | { input:["cursor,3,1", "key,-", "key,right,-,-", "key,right, " ],
29 | result:"pzprv3/kakuro/1/5/0 0 0 0 0 0 /0 . . . . 0,0 /. . . . 1 /" },
30 | { input:["newboard,5,2", "editmode", "cursor,9,1", "key,q,down,q", "playmode"] },
31 | { input:["cursor,0,0", "mouse,leftx2, 1,1", "mouse,leftx3, 3,1", "mouse,leftx4, 5,1", "mouse,leftx10, 7,1", "mouse,leftx11, 9,1",
32 | "mouse,rightx2, 1,3", "mouse,rightx3, 3,3", "mouse,rightx4, 5,3", "mouse,rightx10, 7,3", "mouse,rightx11, 9,3"],
33 | result:"pzprv3/kakuro/2/5/0 0 0 0 0 0 /0 . . . . 0,0 /0 . . . . 0,0 /1 2 3 9 . /9 8 7 1 . /" }
34 | ]
35 | });
36 |
--------------------------------------------------------------------------------
/test/script/test_kakuru.js:
--------------------------------------------------------------------------------
1 | /* test_kakuru.js */
2 |
3 | ui.debug.addDebugData('kakuru', {
4 | url : '5/5/3.a+4+mD.S.bm+g+A.3',
5 | failcheck : [
6 | ['nqAroundDup', "pzprv3/kakuru/5/5/3 . 10 b 4 /b . . . . /23 . 38 . 11 /. . . . b /16 b 20 . 3 /. 0 . . . /. 0 0 2 2 /. 0 . 0 . /0 0 0 0 . /. . . 0 . /"],
7 | ['nqAroundSumNe',"pzprv3/kakuru/5/5/3 . 10 b 4 /b . . . . /23 . 38 . 11 /. . . . b /16 b 20 . 3 /. 1 . . . /. 2 5 3 1 /. 0 . 0 . /0 0 0 0 . /. . . 0 . /"],
8 | ['nmAround', "pzprv3/kakuru/5/5/3 . 10 b 4 /b . . . . /23 . . . 11 /. . . . b /16 b 20 . 3 /. 1 . . . /. 2 4 3 1 /. 0 3 0 . /0 0 0 0 . /. . . 0 . /"],
9 | ['ceNoNum', "pzprv3/kakuru/5/5/3 . 10 b 4 /b . . . . /23 . 38 . 11 /. . . . b /16 b 20 . 3 /. 2 . . . /. 1 4 3 1 /. 0 . 5 . /0 0 0 2 . /. . . 1 . /"],
10 | [null, "pzprv3/kakuru/5/5/3 . 10 b 4 /b . . . . /23 . 38 . 11 /. . . . b /16 b 20 . 3 /. 2 . . . /. 1 4 3 1 /. 6 . 5 . /7 9 8 2 . /. . . 1 . /"]
11 | ],
12 | inputs : [
13 | /* 問題入力テスト */
14 | { input:["newboard,5,1", "playmode", "cursor,5,1", "key,1", "editmode"] },
15 | { input:["cursor,1,1", "key,0", "key,right", "key,1", "key,right", "key,2", "key,right", "key,3", "key,right", "key,1,0" ],
16 | result:"pzprv3/kakuru/1/5/. 1 2 3 10 /0 . . . . /" },
17 | { input:["cursor,3,1", "key,-", "key,right,-,-", "key,right, " ],
18 | result:"pzprv3/kakuru/1/5/. ? . . 10 /0 . 0 0 . /" },
19 | { input:["cursor,1,1", "key,q", "key,right,q", "key,left,q", "cursor,9,1", "key, " ],
20 | result:"pzprv3/kakuru/1/5/. b . . . /0 . 0 0 0 /" },
21 | { input:["newboard,5,2", "editmode"] },
22 | { input:["cursor,0,0", "mouse,leftx2, 1,1", "mouse,leftx3, 3,1", "mouse,leftx46, 5,1", "mouse,leftx47, 7,1", "mouse,leftx48, 9,1",
23 | "cursor,0,0", "mouse,rightx2, 1,3", "mouse,rightx3, 3,3", "mouse,rightx46, 5,3", "mouse,rightx47, 7,3", "mouse,rightx48, 9,3"],
24 | result:"pzprv3/kakuru/2/5/b ? 43 44 . /44 43 ? b . /. . . . 0 /. . . . 0 /" },
25 | /* 回答入力テスト */
26 | { input:["newboard,6,1", "editmode", "cursor,5,1", "key,4", "cursor,9,1", "key,q", "playmode"] },
27 | { input:["cursor,1,1", "key,0", "key,right,1", "key,right,2", "key,right,3", "key,right,4", "key,right,1,0" ],
28 | result:"pzprv3/kakuru/1/6/. . 4 . b . /0 1 . 3 . 1 /" },
29 | { input:["cursor,3,1", "key,-", "key,right,-,-", "key,right, " ],
30 | result:"pzprv3/kakuru/1/6/. . 4 . b . /0 0 . 0 . 1 /" },
31 | { input:["newboard,5,2", "playmode"] },
32 | { input:["cursor,0,0", "mouse,leftx2, 1,1", "mouse,leftx3, 3,1", "mouse,leftx3, 5,1", "mouse,leftx10, 7,1", "mouse,leftx11, 9,1",
33 | "mouse,rightx2, 1,3", "mouse,rightx3, 3,3", "mouse,rightx3, 5,3", "mouse,rightx10, 7,3", "mouse,rightx11, 9,3"],
34 | result:"pzprv3/kakuru/2/5/. . . . . /. . . . . /1 2 2 9 0 /9 8 8 1 0 /" }
35 | ]
36 | });
37 |
--------------------------------------------------------------------------------
/test/script/test_kramma.js:
--------------------------------------------------------------------------------
1 | /* test_kramma.js */
2 |
3 | ui.debug.addDebugData('kramma', {
4 | url : 'c/5/5/9ock3ba9i',
5 | failcheck : [
6 | ['bkNoNum',"pzprv3/kramma/5/5/1 . . 2 2 /. 1 1 . 2 /. 2 . 1 . /1 . 2 1 . /1 1 . . 2 /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /1 0 1 0 /1 0 1 0 /1 0 1 0 /1 0 1 0 /1 0 1 0 /1 1 1 1 1 /1 1 1 1 1 /-1 -1 -1 -1 -1 /0 0 0 0 0 /"],
7 | ['bkPlNum',"pzprv3/kramma/5/5/1 . . 2 2 /. 1 1 . 2 /. 2 . 1 . /1 . 2 1 . /1 1 . . 2 /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /1 0 1 0 /1 0 1 0 /1 0 1 0 /1 0 1 0 /1 0 1 0 /0 0 0 0 0 /1 1 1 1 1 /-1 -1 -1 -1 -1 /0 0 0 0 0 /"],
8 | [null, "pzprv3/kramma/5/5/1 . . 2 2 /. 1 1 . 2 /. 2 . 1 . /1 . 2 1 . /1 1 . . 2 /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /1 0 1 -1 /1 0 1 -1 /1 -1 1 -1 /1 -1 1 -1 /1 0 1 -1 /-1 -1 -1 -1 -1 /1 1 1 1 1 /-1 -1 -1 -1 -1 /1 1 1 1 1 /"]
9 | ],
10 | inputs : [
11 | /* 問題入力, 回答入力はkrammanと同じなので省略 */
12 | ]
13 | });
14 |
--------------------------------------------------------------------------------
/test/script/test_kramman.js:
--------------------------------------------------------------------------------
1 | /* test_kramman.js */
2 |
3 | ui.debug.addDebugData('kramman', {
4 | url : '5/5/32223i3f2fb99i',
5 | failcheck : [
6 | ['bdBranch', "pzprv3/kramman/5/5/2 . . . 1 /. 1 2 . . /. 2 1 2 . /1 . 2 1 . /. 1 . . 2 /. . . . . . /. . . . 1 . /. . . 1 . . /. . 1 . . . /. 1 . . . . /. . . . . . /0 0 1 0 /0 0 1 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 0 /1 1 1 1 1 /0 0 0 0 0 /0 0 0 0 0 /"],
7 | ['bdCrossBP', "pzprv3/kramman/5/5/2 . . . 1 /. 1 2 . . /. 2 1 2 . /1 . 2 1 . /. 1 . . 2 /. . . . . . /. . . . 1 . /. . . 1 . . /. . 1 . . . /. 1 . . . . /. . . . . . /0 0 1 0 /0 0 1 0 /0 0 1 0 /0 0 1 0 /0 0 0 0 /0 0 0 0 0 /1 1 1 1 1 /0 0 0 0 0 /0 1 1 0 0 /"],
8 | ['bdCurveExBP',"pzprv3/kramman/5/5/2 . . . 1 /. 1 2 . . /. 2 1 2 . /1 . 2 1 . /. 1 . . 2 /. . . . . . /. . . . 1 . /. . . 1 . . /. . 1 . . . /. 1 . . . . /. . . . . . /0 0 0 0 /0 0 0 0 /0 0 1 0 /0 0 1 0 /0 0 0 0 /0 0 0 0 0 /1 1 1 0 0 /0 0 0 0 0 /0 1 1 0 0 /"],
9 | ['bkNoNum', "pzprv3/kramman/5/5/2 . . . 1 /. 1 2 . . /. 2 1 2 . /1 . 2 1 . /. 1 . . 2 /. . . . . . /. . . . 1 . /. . . 1 . . /. . 1 . . . /. 1 . . . . /. . . . . . /1 0 0 1 /1 0 0 0 /1 0 0 0 /1 0 0 0 /0 0 0 0 /1 1 1 1 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /"],
10 | ['bkPlNum', "pzprv3/kramman/5/5/2 . . . 1 /. 1 2 . . /. 2 1 2 . /1 . 2 1 . /. 1 . . 2 /. . . . . . /. . . . 1 . /. . . 1 . . /. . 1 . . . /. 1 . . . . /. . . . . . /1 0 0 1 /1 0 0 0 /1 0 0 0 /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 0 0 /"],
11 | ['bdDeadEnd', "pzprv3/kramman/5/5/2 . . . 1 /. 1 2 . . /. 2 1 2 . /1 . 2 1 . /. 1 . . 2 /. . . . . . /. . . 1 1 . /. . . 1 . . /. . 1 . . . /. 1 . . . . /. . . . . . /1 1 1 1 /1 1 0 0 /1 1 1 0 /1 0 1 0 /0 0 1 0 /0 0 0 0 1 /1 1 1 0 0 /0 0 1 1 1 /0 1 1 1 1 /"],
12 | ['bdIgnoreBP', "pzprv3/kramman/5/5/2 . . . 1 /. 1 2 . . /. 2 1 2 . /1 . 2 1 . /. 1 . . 2 /. . . . . . /. . . 1 1 . /. . . 1 . . /. . 1 . . . /. 1 . . . . /. . . . . . /1 1 0 1 /1 1 0 0 /1 1 1 0 /1 0 1 0 /0 0 1 0 /0 0 0 0 1 /1 1 1 0 0 /0 0 1 1 1 /0 1 1 1 1 /"],
13 | [null, "pzprv3/kramman/5/5/2 . . . 1 /. 1 2 . . /. 2 1 2 . /1 . 2 1 . /. 1 . . 2 /. . . . . . /. . . . 1 . /. . . 1 . . /. . 1 . . . /. 1 . . . . /. . . . . . /1 1 -1 1 /1 1 -1 -1 /1 1 1 -1 /1 -1 1 0 /0 -1 1 0 /-1 -1 -1 -1 1 /1 1 1 -1 -1 /-1 -1 1 1 1 /0 1 1 1 1 /"]
14 | ],
15 | inputs : [
16 | /* 問題入力はmashu, bdblockと同じなので省略 */
17 | /* 回答入力テスト */
18 | { input:["newboard,3,3", "editmode", "mouse,left,4,2", "playmode"] },
19 | { input:["mouse,left, 2,3, 2,4", "mouse,left, 3,2, 4,2, 4,3"],
20 | result:"pzprv3/kramman/3/3/. . . /. . . /. . . /. . . . /. . 1 . /. . . . /. . . . /1 0 /1 1 /1 1 /1 1 0 /0 0 0 /" },
21 | { input:["mouse,left, 1,3, 5,3"],
22 | result:"pzprv3/kramman/3/3/. . . /. . . /. . . /. . . . /. . 1 . /. . . . /. . . . /1 0 /2 2 /1 1 /1 1 0 /0 0 0 /" },
23 | { input:["mouse,left, 3,2, 4,2, 4,3"],
24 | result:"pzprv3/kramman/3/3/. . . /. . . /. . . /. . . . /. . 1 . /. . . . /. . . . /1 0 /2 -1 /1 0 /0 0 0 /0 0 0 /" }
25 | ]
26 | });
27 |
--------------------------------------------------------------------------------
/test/script/test_kropki.js:
--------------------------------------------------------------------------------
1 | /* test_kropki.js */
2 |
3 | ui.debug.addDebugData('kropki', {
4 | url : '4/4/aa7fioco',
5 | failcheck : [
6 | ['nmDupRow',"pzprv3/kropki/4/4/1 0 1 /1 0 1 /0 2 1 /1 2 0 /2 0 0 2 /2 0 1 1 /0 2 2 0 /4 4 . . /. . . . /. . . . /. . . . /"],
7 | ['nmSubNe1',"pzprv3/kropki/4/4/1 0 1 /1 0 1 /0 2 1 /1 2 0 /2 0 0 2 /2 0 1 1 /0 2 2 0 /4 1 . . /. . . . /. . . . /. . . . /"],
8 | ['nmSubEq1',"pzprv3/kropki/4/4/1 0 1 /1 0 1 /0 2 1 /1 2 0 /2 0 0 2 /2 0 1 1 /0 2 2 0 /1 . . . /2 . . . /4 . . . /3 . . . /"],
9 | ['nmDivNe2',"pzprv3/kropki/4/4/1 0 1 /1 0 1 /0 2 1 /1 2 0 /2 0 0 2 /2 0 1 1 /0 2 2 0 /4 . . . /2 . . . /1 . . . /3 4 1 . /"],
10 | ['nmDivEq2',"pzprv3/kropki/4/4/1 0 1 /1 0 1 /0 2 1 /1 2 0 /2 0 0 2 /2 0 1 1 /0 2 2 0 /4 3 . . /2 1 . . /1 . . . /3 .[2,4,,] 4 2 /"],
11 | ['ceNoNum', "pzprv3/kropki/4/4/1 0 1 /1 0 1 /0 2 1 /1 2 0 /2 0 0 2 /2 0 1 1 /0 2 2 0 /4 3 1 2 /2 1 . . /1 . . . /3 .[2,4,,] . . /"],
12 | [null, "pzprv3/kropki/4/4/1 0 1 /1 0 1 /0 2 1 /1 2 0 /2 0 0 2 /2 0 1 1 /0 2 2 0 /4 3 1 2 /2 1 3 4 /1 4 2 3 /3 2 4 1 /"]
13 | ],
14 | inputs : [
15 | ]
16 | });
17 |
--------------------------------------------------------------------------------
/test/script/test_kurochute.js:
--------------------------------------------------------------------------------
1 | /* test_kurochute.js */
2 |
3 | ui.debug.addDebugData('kurochute', {
4 | url : '5/5/132k1i1i2k332',
5 | failcheck : [
6 | ['brNoShade', "pzprv3/kurochute/5/5"],
7 | ['csAdjacent', "pzprv3/kurochute/5/5/1 3 2 . . /. . . 1 . /. . 1 . . /. 2 . . . /. . 3 3 2 /. . . . . /. 1 . . . /. 1 . . . /. . . . . /. . . . . /"],
8 | ['cuDivideRB', "pzprv3/kurochute/5/5/1 3 2 . . /. . . 1 . /. . 1 . . /. 2 . . . /. . 3 3 2 /- . . . . /1 + 1 . . /+ 1 . 1 . /. . . . 1 /. . . . . /"],
9 | ['nmShootShadeNe1',"pzprv3/kurochute/5/5/1 3 2 . . /. . . 1 . /. . 1 . . /. 2 . . . /. . 3 3 2 /- - - + 1 /1 + 1 . + /+ + . 1 . /. - + . . /1 . - - . /"],
10 | [null, "pzprv3/kurochute/5/5/1 3 2 . . /. . . 1 . /. . 1 . . /. 2 . . . /. . 3 3 2 /- - - + 1 /1 + 1 . + /+ + . . 1 /. - + 1 . /1 . - - . /"]
11 | ],
12 | inputs : [
13 | /* 回答入力テスト */
14 | { input:["editmode", "newboard,5,1", "cursor,1,1", "key,1", "playmode"] },
15 | /* 問題入力はnurikabeやhitori等と同じなので省略 */
16 | { input:["setconfig,use,1", "ansclear"] },
17 | { input:["mouse,left, 3,1, 9,1"],
18 | result:"pzprv3/kurochute/1/5/1 . . . . /. 1 . 1 . /" },
19 | { input:["mouse,left, 3,1, 9,1"],
20 | result:"pzprv3/kurochute/1/5/1 . . . . /. . . . . /" },
21 | { input:["mouse,right, 1,1, 9,1"],
22 | result:"pzprv3/kurochute/1/5/1 . . . . /+ + + + + /" },
23 | { input:["mouse,right, 1,1, 9,1"],
24 | result:"pzprv3/kurochute/1/5/1 . . . . /. . . . . /" },
25 | { input:["setconfig,use,2", "ansclear"] },
26 | { input:["mouse,left, 3,1, 9,1"],
27 | result:"pzprv3/kurochute/1/5/1 . . . . /. 1 . 1 . /" },
28 | { input:["mouse,left, 3,1, 9,1"],
29 | result:"pzprv3/kurochute/1/5/1 . . . . /. + + + + /" },
30 | { input:["mouse,left, 3,1, 9,1"],
31 | result:"pzprv3/kurochute/1/5/1 . . . . /. . . . . /" },
32 | { input:["mouse,right, 3,1, 9,1"],
33 | result:"pzprv3/kurochute/1/5/1 . . . . /. + + + + /" },
34 | { input:["mouse,right, 3,1, 9,1"],
35 | result:"pzprv3/kurochute/1/5/1 . . . . /. 1 + 1 + /" },
36 | { input:["mouse,right, 3,1, 9,1"],
37 | result:"pzprv3/kurochute/1/5/1 . . . . /. . . . . /" },
38 | { input:["setconfig,use,1", "ansclear"] },
39 | { input:["mouse,left, 1,1"],
40 | result:"pzprv3/kurochute/1/5/1 . . . . /- . . . . /" }
41 | ]
42 | });
43 |
--------------------------------------------------------------------------------
/test/script/test_kurodoko.js:
--------------------------------------------------------------------------------
1 | /* test_kurodoko.js */
2 |
3 | ui.debug.addDebugData('kurodoko', {
4 | url : '5/5/i7g5l2l2g4i',
5 | failcheck : [
6 | ['brNoShade', "pzprv3/kurodoko/5/5"],
7 | ['csAdjacent', "pzprv3/kurodoko/5/5/. . . 7 . /5 . . . . /. . 2 . . /. . . . 2 /. 4 . . . /. . . . . /. . . . . /. . . . . /. . # . . /. . # . . /"],
8 | ['cuDivideRB', "pzprv3/kurodoko/5/5/. . . 7 . /5 . . . . /. . 2 . . /. . . . 2 /. 4 . . . /. # . . . /. . # . . /. # . . . /. . # . . /. . . # . /"],
9 | ['nmSumViewNe',"pzprv3/kurodoko/5/5/. . . 7 . /5 . . . . /. . 2 . . /. . . . 2 /. 4 . . . /# + + + . /+ + # + + /+ # + + # /+ + # + + /# + + + # /"],
10 | [null, "pzprv3/kurodoko/5/5/. . . 7 . /5 . . . . /. . 2 . . /. . . . 2 /. 4 . . . /+ # + + . /+ + # + + /+ # + + # /+ + # + + /# + + + # /"]
11 | ],
12 | inputs : [] /* hitori, kurottoと同じなので省略 */
13 | });
14 |
--------------------------------------------------------------------------------
/test/script/test_kurotto.js:
--------------------------------------------------------------------------------
1 | /* test_kurotto.js */
2 |
3 | ui.debug.addDebugData('kurotto', {
4 | url : '5/5/30m4h6h4m02',
5 | failcheck : [
6 | ['brNoShade', "pzprv3/kurotto/5/5"],
7 | ['nmSumSizeNe',"pzprv3/kurotto/5/5/3 0 . . . /. . . . 4 /. . 6 . . /4 . . . . /. . . 0 2 /. . + . . /# + . . . /# # . + # /. + . + # /# + + . . /"],
8 | [null, "pzprv3/kurotto/5/5/3 0 . . . /. . . . 4 /. . 6 . . /4 . . . . /. . . 0 2 /. . + + + /# + # # . /# # . + # /. + # + # /# + + . . /"]
9 | ],
10 | inputs : [
11 | /* 回答入力はnurikabeと同じなので省略 */
12 | { input:["editmode", "newboard,5,1"] },
13 | { input:["cursor,1,1", "key,-", "key,right", "key,0", "key,right", "key,1", "key,right", "key,2", "key,right", "key,3" ],
14 | result:"pzprv3/kurotto/1/5/- 0 1 2 3 /. . . . . /" },
15 | { input:["cursor,1,1", "key,-", "key,right", "key,-", "key,right", "key,-", "key,-" ],
16 | result:"pzprv3/kurotto/1/5/. - . 2 3 /. . . . . /" },
17 | { input:["newboard,6,1"] },
18 | { input:["cursor,0,0", "mouse,leftx2, 1,1", "mouse,leftx3, 3,1", "mouse,leftx4, 5,1", "mouse,leftx5, 7,1", "mouse,leftx6, 9,1", "mouse,rightx2, 11,1"],
19 | result:"pzprv3/kurotto/1/6/- 0 1 2 3 5 /. . . . . . /" }
20 | ]
21 | });
22 |
--------------------------------------------------------------------------------
/test/script/test_lightup.js:
--------------------------------------------------------------------------------
1 | /* test_lightup.js */
2 |
3 | ui.debug.addDebugData('lightup', {
4 | url : '6/6/nekcakbl',
5 | failcheck : [
6 | ['nmAkariNe',"pzprv3/lightup/6/6/. . . . . . /. . 4 . . . /. # . . 2 . /# 0 # . . . /. # . 1 . . /. . . . . . /"],
7 | ['akariDup', "pzprv3/lightup/6/6/. . # . . # /. # 4 # . . /. . # . 2 . /. 0 . . # . /. . . 1 . . /. . . . . . /"],
8 | ['nmAkariNe',"pzprv3/lightup/6/6/. . # . . . /. # 4 # . . /. . # . 2 # /+ 0 . . # . /. + . 1 . . /. . . . . . /"],
9 | ['ceDark', "pzprv3/lightup/6/6/. . # . . . /. # 4 # . . /. . # . 2 # /+ 0 . . # . /. + . 1 . . /. . . # . . /"],
10 | [null, "pzprv3/lightup/6/6/. . # . . . /. # 4 # . . /. . # . 2 # /+ 0 . . # . /# + . 1 . . /. . . # . . /"]
11 | ],
12 | inputs : [
13 | /* 問題入力はshakashakaと同じなので省略 */
14 | /* 回答入力テスト */
15 | { input:["newboard,3,2", "playmode", "setconfig,use,1", "ansclear"] },
16 | { input:["mouse,left, 1,1", "mouse,leftx2, 3,1", "mouse,leftx3, 5,1",
17 | "mouse,right, 1,3", "mouse,rightx2, 3,3", "mouse,rightx3, 5,3"],
18 | result:"pzprv3/lightup/2/3/# . # /+ . + /" },
19 | { input:["mouse,right, 1,1, 3,1, 3,3, 5,3"],
20 | result:"pzprv3/lightup/2/3/+ + # /+ + + /" },
21 | { input:["mouse,right, 1,1, 3,1, 3,3, 5,3"],
22 | result:"pzprv3/lightup/2/3/. . # /+ . . /" },
23 | { input:["newboard,3,2", "playmode", "setconfig,use,2", "ansclear"] },
24 | { input:["mouse,left, 1,1", "mouse,leftx2, 3,1", "mouse,leftx3, 5,1",
25 | "mouse,right, 1,3", "mouse,rightx2, 3,3", "mouse,rightx3, 5,3"],
26 | result:"pzprv3/lightup/2/3/# + . /+ # . /" },
27 | { input:["mouse,left, 1,1, 3,1, 3,3, 5,3"],
28 | result:"pzprv3/lightup/2/3/+ + . /+ + + /" },
29 | { input:["mouse,left, 1,1, 3,1, 3,3, 5,3"],
30 | result:"pzprv3/lightup/2/3/. . . /+ . . /" },
31 | { input:["mouse,right, 1,3, 5,3"],
32 | result:"pzprv3/lightup/2/3/. . . /# . . /" }
33 | ]
34 | });
35 |
--------------------------------------------------------------------------------
/test/script/test_lits.js:
--------------------------------------------------------------------------------
1 | /* test_lits.js */
2 |
3 | ui.debug.addDebugData('lits', {
4 | url : '4/4/9q02jg',
5 | failcheck : [
6 | ['cs2x2', "pzprv3/lits/4/4/3/0 0 1 1 /0 0 1 2 /0 1 1 2 /2 2 2 2 /# # . . /# # . . /. . . . /. . . . /"],
7 | ['bkShadeGt4', "pzprv3/lits/4/4/3/0 0 1 1 /0 0 1 2 /0 1 1 2 /2 2 2 2 /. . # # /. . # . /. # # . /. . . . /"],
8 | ['bkShadeDivide', "pzprv3/lits/4/4/3/0 0 1 1 /0 0 1 2 /0 1 1 2 /2 2 2 2 /. . # # /. . . . /. # # # /. . . . /"],
9 | ['bsSameShape', "pzprv3/lits/4/4/3/0 0 1 1 /0 0 1 2 /0 1 1 2 /2 2 2 2 /# # # # /# . # . /# . # . /. . . . /"],
10 | ['csDivide', "pzprv3/lits/4/4/3/0 0 1 1 /0 0 1 2 /0 1 1 2 /2 2 2 2 /# . # # /# . # . /# . # . /. . . . /"],
11 | ['bkNoShade', "pzprv3/lits/4/4/3/0 0 1 1 /0 0 1 2 /0 1 1 2 /2 2 2 2 /# . # # /# # # . /# . # . /. . . . /"],
12 | ['bkShadeLt4', "pzprv3/lits/4/4/3/0 0 1 1 /0 0 1 2 /0 1 1 2 /2 2 2 2 /# . # # /# # # . /# . # . /. . # # /"],
13 | [null, "pzprv3/lits/4/4/3/0 0 1 1 /0 0 1 2 /0 1 1 2 /2 2 2 2 /# + # # /# # # + /# + # + /# # # # /"]
14 | ],
15 | inputs : [
16 | /* 回答入力はnurikabeと同じなので省略 */
17 | { input:["editmode", "newboard,4,4"] },
18 | { input:["mouse,left, 4,0, 4,4, 2,4, 2,6", "mouse,left, 0,6, 6,6, 6,2, 8,2"],
19 | result:"pzprv3/lits/4/4/3/0 0 1 1 /0 0 1 2 /0 1 1 2 /2 2 2 2 /. . . . /. . . . /. . . . /. . . . /" },
20 | { input:["mouse,left, 4,0, 4,4, 2,4, 2,6", "mouse,left, 0,6, 6,6, 6,2, 8,2"],
21 | result:"pzprv3/lits/4/4/1/0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /. . . . /. . . . /. . . . /. . . . /" }
22 | ]
23 | });
24 |
--------------------------------------------------------------------------------
/test/script/test_lookair.js:
--------------------------------------------------------------------------------
1 | /* test_lookair.js */
2 |
3 | ui.debug.addDebugData('lookair', {
4 | url : '6/6/3e3b3g1a2e0a2c1d',
5 | failcheck : [
6 | ['brNoShade', "pzprv3/lookair/6/6"],
7 | ['csNotSquare',"pzprv3/lookair/6/6/3 . . . . . /3 . . 3 . . /. . . . . 1 /. 2 . . . . /. 0 . 2 . . /. 1 . . . . /# # . . . . /# . . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /"],
8 | ['lookairBC', "pzprv3/lookair/6/6/3 . . . . . /3 . . 3 . . /. . . . . 1 /. 2 . . . . /. 0 . 2 . . /. 1 . . . . /# # + . . . /# # + . . . /+ + . . . . /# + # . . . /+ + + . . . /# + . . . . /"],
9 | ['nmShade5Ne', "pzprv3/lookair/6/6/3 . . . . . /3 . . 3 . . /. . . . . 1 /. 2 . . . . /. 0 . 2 . . /. 1 . . . . /# # + . . . /# # + + . . /+ + # # + . /# + # # + . /+ + + + . . /+ + # + . . /"],
10 | [null, "pzprv3/lookair/6/6/3 . . . . . /3 . . 3 . . /. . . . . 1 /. 2 . . . . /. 0 . 2 . . /. 1 . . . . /# # + # + + /# # + + # + /+ + # # + # /# + # # + + /+ + + + # # /+ + # + # # /"]
11 | ],
12 | inputs : [
13 | /* マウスの問題入力以外nurikabeと同じなので省略 */
14 | { input:["editmode", "newboard,8,2"] },
15 | { input:["cursor,0,0", "mouse,leftx2, 1,1", "mouse,leftx3, 3,1", "mouse,leftx4, 5,1", "mouse,leftx5, 7,1", "mouse,leftx6, 9,1", "mouse,leftx7, 11,1", "mouse,leftx8, 13,1", "mouse,leftx9, 15,1",
16 | "cursor,0,0", "mouse,rightx2, 1,3", "mouse,rightx3, 3,3", "mouse,rightx4, 5,3", "mouse,rightx5, 7,3", "mouse,rightx6, 9,3", "mouse,rightx7, 11,3", "mouse,rightx8, 13,3", "mouse,rightx9, 15,3"],
17 | result:"pzprv3/lookair/2/8/- 0 1 2 3 4 5 . /5 4 3 2 1 0 - . /. . . . . . . . /. . . . . . . . /" }
18 | ]
19 | });
20 |
--------------------------------------------------------------------------------
/test/script/test_loopsp.js:
--------------------------------------------------------------------------------
1 | /* test_loopsp.js */
2 |
3 | ui.debug.addDebugData('loopsp', {
4 | url : '5/5/sgnmn1n1n2njnls',
5 | failcheck : [
6 | ['ceAddLine',"pzprv3/loopsp/5/5/. . . . . /. a . g . /1 . 1 . 2 /. d . f . /. . . . . /0 0 0 0 /0 0 1 1 /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 0 0 /0 0 0 0 0 /"],
7 | ['lnBranch', "pzprv3/loopsp/5/5/. . . . . /. a . g . /1 . 1 . 2 /. d . f . /. . . . . /0 0 0 0 /0 1 0 0 /0 0 0 0 /0 1 1 0 /0 0 0 0 /0 1 1 0 0 /0 1 0 0 0 /0 1 0 0 0 /0 0 0 1 0 /"],
8 | ['lnCrossOnNum',"pzprv3/loopsp/5/5/. . . . . /. a . g . /1 . 1 . 2 /. d . f . /. . . . . /0 0 0 0 /0 0 0 0 /1 1 1 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 0 0 /"],
9 | ['lpPlNum', "pzprv3/loopsp/5/5/. . . . . /. a . g . /1 . 1 . 2 /. d . f . /. . . . . /1 1 1 1 /0 0 0 0 /1 1 0 0 /0 0 0 0 /0 0 1 1 /1 0 0 0 1 /1 0 0 0 1 /0 0 1 0 1 /0 0 1 0 1 /"],
10 | ['lpSepNum', "pzprv3/loopsp/5/5/. . . . . /. a . g . /1 . 1 . 2 /. d . f . /. . . . . /1 0 1 1 /0 0 0 1 /0 0 1 0 /0 1 0 0 /1 1 0 0 /1 1 1 0 1 /1 1 1 1 0 /1 1 0 0 0 /1 0 1 0 0 /"],
11 | ['lpNoNum', "pzprv3/loopsp/5/5/. . . . . /. a . g . /1 . 1 . 2 /. d . f . /. . . . . /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 1 0 /0 -1 1 -1 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 1 1 0 /"],
12 | ['lnNotCrossMk',"pzprv3/loopsp/5/5/. . . . . /. a . g . /1 . 1 . 2 /. d . f . /. . . . . /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 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /"],
13 | ['ceNoLine', "pzprv3/loopsp/5/5/. . . . . /. a . g . /1 . 1 . 2 /. d . f . /. . . . . /1 0 1 1 /1 1 0 1 /0 0 0 1 /0 1 1 0 /0 0 0 1 /1 1 1 0 1 /0 1 0 1 0 /0 1 0 0 1 /0 0 0 1 1 /"],
14 | ['lnDeadEnd',"pzprv3/loopsp/5/5/. . . . . /. a . g . /1 . 1 . 2 /. d . f . /. . . . . /1 -1 1 1 /1 1 -1 1 /1 1 -1 1 /0 1 1 0 /0 1 -1 1 /1 1 1 -1 1 /-1 1 -1 1 0 /1 1 1 0 1 /1 0 1 1 1 /"],
15 | [null, "pzprv3/loopsp/5/5/. . . . . /. a . g . /1 . 1 . 2 /. d . f . /. . . . . /1 -1 1 1 /1 1 -1 1 /1 1 -1 1 /0 1 1 0 /1 1 -1 1 /1 1 1 -1 1 /-1 1 -1 1 0 /1 1 1 0 1 /1 0 1 1 1 /"]
16 | ],
17 | inputs : [
18 | /* 回答入力はicebarn, pipelinkと同じなので省略 */
19 | /* 問題入力テスト */
20 | { input:["editmode", "newboard,5,2"] },
21 | { input:["cursor,1,1", "key,-", "key,right", "key,0", "key,right", "key,1", "key,right", "key,2" ],
22 | result:"pzprv3/loopsp/2/5/-2 . 1 2 . /. . . . . /0 0 0 0 /0 0 0 0 /0 0 0 0 0 /"},
23 | { input:["cursor,1,1", "key,-", "key,right", "key,-", "key,right", "key,-", "key,-" ],
24 | result:"pzprv3/loopsp/2/5/. -2 . 2 . /. . . . . /0 0 0 0 /0 0 0 0 /0 0 0 0 0 /"},
25 | { input:["newboard,4,2"] },
26 | { input:["cursor,0,0", "mouse,leftx2, 1,1", "mouse,leftx3, 3,1", "mouse,leftx4, 5,1", "mouse,leftx5, 7,1",
27 | "mouse,rightx8, 1,3", "mouse,rightx9, 3,3", "mouse,rightx9, 5,3", "mouse,left, 5,3"],
28 | result:"pzprv3/loopsp/2/4/-2 1 2 a /a 2 a . /0 0 0 /1 0 0 /0 0 0 0 /"}
29 | ]
30 | });
31 |
--------------------------------------------------------------------------------
/test/script/test_loute.js:
--------------------------------------------------------------------------------
1 | /* test_loute.js */
2 |
3 | ui.debug.addDebugData('loute', {
4 | url : '5/5/5i3h1h1i1h2h4i5',
5 | failcheck : [
6 | ['arBlkEdge', "pzprv3/loute/5/5/5 . . . 3 /. . 1 . . /1 . . . 1 /. . 2 . . /4 . . . 5 /0 0 0 0 /0 1 0 0 /1 0 0 0 /1 0 0 0 /0 0 0 0 /1 1 0 0 0 /0 1 0 0 0 /0 0 0 0 0 /1 0 0 0 0 /"],
7 | ['arNotPtCnr', "pzprv3/loute/5/5/5 . . . 3 /. . 1 . . /1 . . . 1 /. . 2 . . /4 . . . 5 /0 0 0 0 /0 0 0 0 /1 0 0 0 /0 1 0 0 /0 0 0 0 /0 0 0 0 0 /1 0 0 0 0 /0 1 0 0 0 /1 1 0 0 0 /"],
8 | ['ciNotOnCnr', "pzprv3/loute/5/5/5 . . . 3 /. . 1 . . /1 . . . 1 /. . 2 . . /4 . . . 5 /0 0 0 0 /1 0 0 0 /1 0 0 0 /0 1 1 0 /0 1 0 0 /0 1 0 0 0 /0 0 0 0 0 /1 0 1 0 0 /0 0 0 1 1 /"],
9 | ['bdDeadEnd', "pzprv3/loute/5/5/5 . . . 3 /. . 1 . . /1 . . . 1 /. . 2 . . /4 . . . 5 /-1 1 0 -1 /1 1 1 0 /1 0 0 1 /-1 1 1 1 /-1 -1 1 -1 /-1 1 0 1 1 /-1 0 1 0 0 /1 0 1 0 1 /1 1 -1 1 -1 /"],
10 | ['bkNotLshape',"pzprv3/loute/5/5/5 . . . 3 /. . 1 . . /1 . . . 1 /. . 2 . . /4 . . . 5 /-1 1 0 -1 /1 1 1 0 /1 0 0 1 /-1 1 1 1 /-1 -1 1 -1 /-1 1 0 1 1 /-1 0 1 1 0 /1 0 1 0 1 /1 1 -1 1 -1 /"],
11 | [null, "pzprv3/loute/5/5/5 . . . 3 /. . 1 . . /1 . . . 1 /. . 2 . . /4 . . . 5 /-1 1 0 -1 /1 1 1 0 /1 1 0 1 /-1 1 1 1 /-1 -1 1 -1 /-1 1 0 1 1 /-1 0 1 1 0 /1 0 1 0 1 /1 1 -1 1 -1 /"]
12 | ],
13 | inputs : [
14 | /* 問題, 回答はsashiganeと同じなので省略 */
15 | ]
16 | });
17 |
--------------------------------------------------------------------------------
/test/script/test_mejilink.js:
--------------------------------------------------------------------------------
1 | /* test_mejilink.js */
2 |
3 | ui.debug.addDebugData('mejilink', {
4 | url : '4/4/g9rm4',
5 | failcheck : [
6 | ['lnBranch', "pzprv3/mejilink/4/4/1 0 1 1 1 /2 2 1 1 1 /2 0 1 1 1 /1 0 0 0 1 /1 1 1 1 /1 0 0 0 /2 0 0 1 /1 1 0 1 /1 1 1 1 /"],
7 | ['lnCross', "pzprv3/mejilink/4/4/1 0 1 1 1 /1 1 1 2 1 /1 0 2 2 1 /1 0 0 0 1 /1 1 1 1 /1 0 0 0 /1 0 2 2 /2 2 0 2 /1 1 1 1 /"],
8 | ['bkNoLineNe',"pzprv3/mejilink/4/4/2 0 1 1 1 /1 2 1 1 1 /2 0 1 1 1 /2 0 0 0 1 /2 2 1 1 /2 0 0 0 /2 0 0 1 /1 1 0 1 /2 2 2 2 /"],
9 | ['lnDeadEnd', "pzprv3/mejilink/4/4/2 0 1 2 2 /1 2 1 2 2 /2 0 1 2 2 /2 0 0 1 2 /2 2 2 1 /2 0 0 0 /2 0 0 1 /1 1 0 0 /2 2 2 2 /"],
10 | ['lnPlLoop', "pzprv3/mejilink/4/4/2 2 0 2 2 /2 2 0 2 2 /1 0 0 0 1 /2 1 0 1 2 /2 1 1 2 /1 0 0 1 /2 1 1 2 /2 2 2 2 /2 2 2 2 /"],
11 | [null, "pzprv3/mejilink/4/4/2 0 -1 1 2 /-1 2 -1 1 2 /2 0 -1 2 1 /2 0 0 0 2 /2 2 2 2 /2 0 0 0 /2 0 0 2 /-1 -1 0 2 /2 2 2 2 /"]
12 | ],
13 | inputs : [
14 | /* 回答入力はslitherと同じなので省略 */
15 | { input:["newboard,4,1", "editmode"] },
16 | { input:["anslear", "mouse,left, 0,0, 8,0, 8,2, 0,2, 0,0"],
17 | result:"pzprv3/mejilink/1/4/0 0 0 0 0 /0 0 0 0 /0 0 0 0 /" },
18 | { input:["anslear", "mouse,left, 0,0, 8,0, 8,2, 0,2, 0,0", "mouse,left, 2,0, 2,2, 4,2, 4,0, 6,0, 6,2"],
19 | result:"pzprv3/mejilink/1/4/1 1 1 1 1 /1 1 1 1 /1 1 1 1 /" },
20 | { input:["playmode", "mouse,left, 0,0, 4,0, 4,2, 8,2"],
21 | result:"pzprv3/mejilink/1/4/1 1 2 1 1 /2 2 1 1 /1 1 2 2 /"},
22 | { input:["editmode", "mouse,left, 2,0, 2,2, 4,2, 4,0, 6,0, 6,2"],
23 | result:"pzprv3/mejilink/1/4/1 0 2 0 1 /2 2 0 1 /1 0 2 2 /" },
24 | { input:["newboard,4,1"]},
25 | { input:["playmode", "mouse,left, 0,0, 4,0, 4,2, 8,2"],
26 | result:"pzprv3/mejilink/1/4/1 0 0 0 1 /2 2 1 1 /1 1 2 2 /"}
27 | ]
28 | });
29 |
--------------------------------------------------------------------------------
/test/script/test_mochikoro.js:
--------------------------------------------------------------------------------
1 | /* test_mochikoro.js */
2 |
3 | ui.debug.addDebugData('mochikoro', {
4 | url : '5/5/4p2n1i1',
5 | failcheck : [
6 | ['brNoShade',"pzprv3/mochikoro/5/5"],
7 | ['cs2x2', "pzprv3/mochikoro/5/5/4 . . . . /. . . . . /. 2 . . . /. . . . . /1 . . . 1 /. . . # # /. . . # # /. . . . . /. . . . . /. . . . . /"],
8 | ['csDivide8',"pzprv3/mochikoro/5/5/4 . . . . /. . . . . /. 2 . . . /. . . . . /1 . . . 1 /+ + + + # /# # # # # /. . . . . /. . . . . /. . . . . /"],
9 | ['cuNotRect',"pzprv3/mochikoro/5/5/4 . . . . /. . . . . /. 2 . . . /. . . . . /1 . . . 1 /+ + + + # /# # # # + /. . # + + /. . . # # /. . . . . /"],
10 | ['bkNumGe2', "pzprv3/mochikoro/5/5/4 . . . . /. . . . . /. 2 . . . /. . . . . /1 . . . 1 /+ + # + . /. . # . + /. . # . + /# # . # # /. . # . . /"],
11 | ['bkSizeNe', "pzprv3/mochikoro/5/5/4 . . . . /. . . . . /. 2 . . . /. . . . . /1 . . . 1 /+ + + + # /# # # # + /# + + # + /+ # # + # /+ # + # + /"],
12 | [null, "pzprv3/mochikoro/5/5/4 . . . . /. . . . . /. 2 . . . /. . . . . /1 . . . 1 /+ + + + # /# # # # + /# + # + # /# + # + # /+ # + # + /"]
13 | ],
14 | inputs : [] /* nurikabeと同じなので省略 */
15 | });
16 |
--------------------------------------------------------------------------------
/test/script/test_mochinyoro.js:
--------------------------------------------------------------------------------
1 | /* test_mochinyoro.js */
2 |
3 | ui.debug.addDebugData('mochinyoro', {
4 | url : '5/5/l4g2m2m1',
5 | failcheck : [
6 | ['brNoShade',"pzprv3/mochinyoro/5/5"],
7 | ['cs2x2', "pzprv3/mochinyoro/5/5/. . . . . /. 4 . 2 . /. . . . . /. 2 . . . /. . . . 1 /. . . . . /. . . . . /. . . . . /. . # # . /. . # # . /"],
8 | ['csDivide8',"pzprv3/mochinyoro/5/5/. . . . . /. 4 . 2 . /. . . . . /. 2 . . . /. . . . 1 /. . # . . /. . # . . /# # # . . /. . . . . /. . . . . /"],
9 | ['cuNotRect',"pzprv3/mochinyoro/5/5/. . . . . /. 4 . 2 . /. . . . . /. 2 . . . /. . . . 1 /+ + # . . /+ + # . . /# # + . . /. . . . . /. . . . . /"],
10 | ['bkNumGe2', "pzprv3/mochinyoro/5/5/. . . . . /. 4 . 2 . /. . . . . /. 2 . . . /. . . . 1 /+ + # . # /+ + # . # /. . # # . /. . # . # /# # . # . /"],
11 | ['bkSizeNe', "pzprv3/mochinyoro/5/5/. . . . . /. 4 . 2 . /. . . . . /. 2 . . . /. . . . 1 /+ + # . . /+ + # + . /# # + # # /# + # + # /# # # # + /"],
12 | ['csRect', "pzprv3/mochinyoro/5/5/. . . . . /. 4 . 2 . /. . . . . /. 2 . . . /. . . . 1 /+ + # + # /+ + # + # /# # + # # /# + # + # /# + # # + /"],
13 | [null, "pzprv3/mochinyoro/5/5/. . . . . /. 4 . 2 . /. . . . . /. 2 . . . /. . . . 1 /+ + # # # /+ + # + + /# # + # # /# + # + # /# + # # + /"]
14 | ],
15 | inputs : [] /* nurikabeと同じなので省略 */
16 | });
17 |
--------------------------------------------------------------------------------
/test/script/test_nagenawa.js:
--------------------------------------------------------------------------------
1 | /* test_nagenawa.js */
2 |
3 | ui.debug.addDebugData('nagenawa', {
4 | url : '6/6/alrrlafbaaqu3011314g223h',
5 | failcheck : [
6 | ['brNoLine', "pzprv3/nagenawa/6/6/13/0 0 1 1 2 2 /0 3 3 4 4 2 /5 3 6 6 4 7 /5 8 6 6 9 7 /10 8 8 9 9 11 /10 10 12 12 11 11 /3 . 0 . 1 . /. 1 . 3 . . /1 . 4 . . . /. 2 . . . . /3 . . 2 . . /. . . . . . /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 /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 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 0 0 0 /0 0 0 0 0 0 /0 0 0 0 0 0 /0 0 0 0 0 0 /"],
7 | ['bkLineGt', "pzprv3/nagenawa/6/6/13/0 0 1 1 2 2 /0 3 3 4 4 2 /5 3 6 6 4 7 /5 8 6 6 9 7 /10 8 8 9 9 11 /10 10 12 12 11 11 /3 . 0 . 1 . /. 1 . 3 . . /1 . 4 . . . /. 2 . . . . /3 . . 2 . . /. . . . . . /1 0 0 0 0 /0 0 0 0 0 /1 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /1 1 0 0 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 2 2 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 0 /0 0 0 0 0 0 /"],
8 | ['lnBranch', "pzprv3/nagenawa/6/6/13/0 0 1 1 2 2 /0 3 3 4 4 2 /5 3 6 6 4 7 /5 8 6 6 9 7 /10 8 8 9 9 11 /10 10 12 12 11 11 /3 . 0 . 1 . /. 1 . 3 . . /1 . 4 . . . /. 2 . . . . /3 . . 2 . . /. . . . . . /1 0 0 0 0 /1 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 1 0 0 0 0 /0 0 0 0 0 0 /0 0 0 0 0 0 /1 0 0 0 0 0 /1 0 0 0 0 0 /0 0 2 2 0 0 /0 0 2 0 0 0 /2 2 0 0 0 0 /1 0 0 0 0 0 /1 0 0 0 0 0 /1 1 0 0 0 0 /"],
9 | ['lnDeadEnd',"pzprv3/nagenawa/6/6/13/0 0 1 1 2 2 /0 3 3 4 4 2 /5 3 6 6 4 7 /5 8 6 6 9 7 /10 8 8 9 9 11 /10 10 12 12 11 11 /3 . 0 . 1 . /. 1 . 3 . . /1 . 4 . . . /. 2 . . . . /3 . . 2 . . /. . . . . . /1 0 0 0 0 /1 0 0 1 0 /0 0 1 1 0 /1 0 0 0 0 /0 0 0 0 0 /1 0 0 0 0 /1 1 0 0 0 0 /0 0 0 1 0 0 /0 0 1 1 0 0 /1 1 0 0 0 0 /1 1 0 0 0 0 /0 0 2 2 0 0 /0 0 2 0 0 0 /2 2 0 0 0 0 /1 0 0 0 0 0 /1 0 2 0 0 0 /1 1 0 0 0 0 /"],
10 | ['bkLineLt', "pzprv3/nagenawa/6/6/13/0 0 1 1 2 2 /0 3 3 4 4 2 /5 3 6 6 4 7 /5 8 6 6 9 7 /10 8 8 9 9 11 /10 10 12 12 11 11 /3 . 0 . 1 . /. 1 . 3 . . /1 . 4 . . . /. 2 . . . . /3 . . 2 . . /. . . . . . /1 0 0 0 0 /1 0 0 1 0 /0 0 1 1 0 /1 0 1 0 0 /0 0 0 0 0 /1 0 0 0 0 /1 1 0 0 0 0 /0 0 0 1 1 0 /0 0 1 1 0 0 /1 1 0 0 0 0 /1 1 0 0 0 0 /0 0 2 2 0 0 /0 0 2 0 0 0 /2 2 0 0 0 0 /1 0 0 0 0 0 /1 0 2 0 0 0 /1 1 0 0 0 0 /"],
11 | ['lnNotRect',"pzprv3/nagenawa/6/6/13/0 0 1 1 2 2 /0 3 3 4 4 2 /5 3 6 6 4 7 /5 8 6 6 9 7 /10 8 8 9 9 11 /10 10 12 12 11 11 /3 . 0 . 1 . /. 1 . 3 . . /1 . 4 . . . /. . . . . . /3 . . 2 . . /. . . . . . /1 0 0 0 0 /1 0 0 1 1 /0 0 1 1 0 /1 0 1 1 0 /0 0 1 0 0 /1 0 1 1 1 /1 1 0 0 0 0 /0 0 0 1 0 1 /0 0 1 1 1 1 /1 1 0 1 0 1 /1 1 1 0 0 1 /0 0 2 2 0 0 /0 0 2 0 0 0 /2 2 0 0 0 0 /1 0 0 0 0 0 /1 0 2 0 0 0 /1 1 0 0 0 0 /"],
12 | [null, "pzprv3/nagenawa/6/6/13/0 0 1 1 2 2 /0 3 3 4 4 2 /5 3 6 6 4 7 /5 8 6 6 9 7 /10 8 8 9 9 11 /10 10 12 12 11 11 /3 . 0 . 1 . /. 1 . 3 . . /1 . 4 . . . /. 2 . . . . /3 . . 2 . . /. . . . . . /1 0 0 0 0 /1 0 0 1 1 /0 0 1 1 0 /1 0 1 1 0 /0 0 0 0 0 /1 0 0 1 1 /1 1 0 0 0 0 /0 0 0 1 0 1 /0 0 1 1 1 1 /1 1 0 1 0 1 /1 1 0 1 0 1 /0 0 2 2 0 0 /0 0 2 0 0 0 /2 2 0 0 0 0 /1 0 0 0 0 0 /1 0 2 0 0 0 /1 1 0 0 0 0 /"]
13 | ],
14 | inputs : [
15 | /* 回答入力はicebarn, countryと同じなので省略 */
16 | /* 問題入力はcountryと同じなので省略 */
17 | ]
18 | });
19 |
--------------------------------------------------------------------------------
/test/script/test_nanro.js:
--------------------------------------------------------------------------------
1 | /* test_nanro.js */
2 |
3 | ui.debug.addDebugData('nanro', {
4 | url : '4/4/6r0s1oi13n1h',
5 | failcheck : [
6 | ['nm2x2', "pzprv3/nanro/4/4/5/0 0 0 1 /2 3 3 1 /2 3 3 1 /2 4 4 4 /. . . 1 /3 . . . /. . . . /. 1 . . /. . . . /. . . - /3 2 . - /3 . - - /"],
7 | ['cbSameNum',"pzprv3/nanro/4/4/5/0 0 0 1 /2 3 3 1 /2 3 3 1 /2 4 4 4 /. . . 1 /3 . . . /. . . . /. 1 . . /. . . . /. 3 3 - /3 . 3 - /3 . - - /"],
8 | ['bkPlNum', "pzprv3/nanro/4/4/5/0 0 0 1 /2 3 3 1 /2 3 3 1 /2 4 4 4 /. . . 1 /3 . . . /. . . . /. 1 . . /. + . . /. . 1 - /3 - 2 - /3 . - - /"],
9 | ['nmCountGt',"pzprv3/nanro/4/4/5/0 0 0 1 /2 3 3 1 /2 3 3 1 /2 4 4 4 /. . . 1 /3 . . . /. . . . /. 1 . . /. + . . /. . 1 - /3 - 1 - /3 . - - /"],
10 | ['nmDivide', "pzprv3/nanro/4/4/5/0 0 0 1 /2 3 3 1 /2 3 3 1 /2 4 4 4 /. . . 1 /3 . . . /. . . . /. 1 . . /. + . . /. 1 . - /3 - . - /3 . - - /"],
11 | ['nmCountLt',"pzprv3/nanro/4/4/5/0 0 0 1 /2 3 3 1 /2 3 3 1 /2 4 4 4 /. . . 1 /3 . . . /. . . . /. 1 . . /. 3 3 . /. 1 . - /3 - . - /3 . - - /"],
12 | ['bkNoNum', "pzprv3/nanro/4/4/6/0 0 0 1 /2 3 4 1 /2 3 4 1 /2 5 5 5 /. . . 1 /3 . . . /. . . . /. 1 . . /. 2 2 . /. 1 . - /3 - . - /3 . - - /"],
13 | ['ceSuspend',"pzprv3/nanro/4/4/5/0 0 0 1 /2 3 3 1 /2 3 3 1 /2 4 3 3 /. . . 1 /3 . . . /. . . . /. 1 . . /. 2 2 . /. 1 . - /3 - + - /3 . + + /"],
14 | [null, "pzprv3/nanro/4/4/5/0 0 0 1 /2 3 3 1 /2 3 3 1 /2 4 4 4 /. . . 1 /3 . . . /. . . . /. 1 . . /. 2 2 . /. 1 . - /3 - . - /3 . - - /"]
15 | ],
16 | inputs : [
17 | /* 問題入力はrippleと同じなので省略 */
18 | /* 回答入力テスト */
19 | { input:["newboard,4,2", "editmode", "mouse,left, 0,2, 8,2", "mouse,left, 4,0, 4,4", "playmode"] },
20 | { input:["cursor,1,1", "key,1", "key,right,2", "key,right,q", "key,right,w"],
21 | result:"pzprv3/nanro/2/4/4/0 0 1 1 /2 2 3 3 /. . . . /. . . . /1 2 + - /. . . . /" },
22 | { input:["cursor,1,1", "key,-", "key,right, ", "key,right,-,-", "key,right,e"],
23 | result:"pzprv3/nanro/2/4/4/0 0 1 1 /2 2 3 3 /. . . . /. . . . /. . . . /. . . . /" },
24 | { input:["cursor,1,1", "key,q", "key,down,w"] },
25 | { input:["mouse,left, 1,1, 5,1", "mouse,left, 1,3, 5,3" ],
26 | result:"pzprv3/nanro/2/4/4/0 0 1 1 /2 2 3 3 /. . . . /. . . . /+ + + . /- - - . /" }
27 | ]
28 | });
29 |
--------------------------------------------------------------------------------
/test/script/test_nawabari.js:
--------------------------------------------------------------------------------
1 | /* test_nawabari.js */
2 |
3 | ui.debug.addDebugData('nawabari', {
4 | url : '5/5/f0a1g2a1f',
5 | failcheck : [
6 | ['bkNotRect', "pzprv3/nawabari/5/5/. . . . . /. 0 . 1 . /. . . . . /. 2 . 1 . /. . . . . /0 0 1 0 /0 0 1 0 /0 1 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 0 /0 0 1 0 0 /1 1 0 0 0 /0 0 0 0 0 /"],
7 | ['bkNoNum', "pzprv3/nawabari/5/5/. . . . . /. 0 . 1 . /. . . . . /. 2 . 1 . /. . . . . /0 0 1 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /1 1 1 1 1 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /"],
8 | ['bkNumGe2', "pzprv3/nawabari/5/5/. . . . . /. 0 . 1 . /. . . . . /. 2 . 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 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /"],
9 | ['nmBorderNe',"pzprv3/nawabari/5/5/. . . . . /. 0 . 1 . /. . . . . /. 2 . 1 . /. . . . . /0 0 1 0 /0 0 1 0 /0 0 1 0 /0 0 1 0 /0 0 1 0 /0 0 0 0 0 /0 0 0 1 1 /1 1 1 0 0 /0 0 0 0 0 /"],
10 | ['bdDeadEnd', "pzprv3/nawabari/5/5/. . . . . /. 0 . 1 . /. . . . . /. 2 . 1 . /. . . . . /0 0 1 0 /0 0 1 0 /0 0 1 0 /0 1 0 0 /0 1 0 0 /0 0 0 0 0 /0 0 0 0 0 /1 1 1 1 1 /0 0 1 0 0 /"],
11 | [null, "pzprv3/nawabari/5/5/. . . . . /. 0 . 1 . /. . . . . /. 2 . 1 . /. . . . . /0 0 1 0 /0 0 1 0 /0 0 1 0 /0 1 0 0 /0 1 0 0 /0 0 0 0 0 /0 0 0 0 0 /1 1 1 1 1 /0 0 0 0 0 /"]
12 | ],
13 | inputs : [
14 | /* 問題入力, 回答入力はshikaku等と同じなので省略 */
15 | ]
16 | });
17 |
--------------------------------------------------------------------------------
/test/script/test_nondango.js:
--------------------------------------------------------------------------------
1 | /* test_nondango.js */
2 |
3 | ui.debug.addDebugData('nondango', {
4 | url : '6/6/5jlp72e15tpq2i3ikht0',
5 | failcheck : [
6 | ['bkMSGe2', "pzprv3/nondango/6/6/8/0 0 0 1 1 2 /0 3 3 3 1 2 /0 3 3 1 1 2 /4 3 5 5 5 6 /4 4 4 7 5 6 /7 7 7 7 6 6 /# o # . o . /o o . o o o /o . . . o o /. o . o . o /o . o o o . /. . . o . o /"],
7 | ['msConsecGt3',"pzprv3/nondango/6/6/9/0 0 0 1 1 2 /0 3 3 3 1 2 /0 3 4 1 1 2 /5 3 6 6 6 7 /5 5 5 8 6 7 /8 8 8 8 7 7 /# o o . o . /o # . o o o /o . # . o o /. o . o . o /o . o o o . /. . . o . o /"],
8 | ['muConsecGt3',"pzprv3/nondango/6/6/8/0 0 0 1 1 2 /0 3 3 3 1 2 /0 3 3 1 1 2 /4 3 5 5 5 6 /4 4 4 7 5 6 /7 7 7 7 6 6 /# % % . o . /% # . % o o /% . . . # o /. % . o . o /o . # o o . /. . . o . o /"],
9 | ['bkNoMS', "pzprv3/nondango/6/6/8/0 0 0 1 1 2 /0 3 3 3 1 2 /0 3 3 1 1 2 /4 3 5 5 5 6 /4 4 4 7 5 6 /7 7 7 7 6 6 /# % % . % . /% # . % % # /% . . . # o /. % . % . o /o . # o # . /. . . # . o /"],
10 | [null, "pzprv3/nondango/6/6/8/0 0 0 1 1 2 /0 3 3 3 1 2 /0 3 3 1 1 2 /4 3 5 5 5 6 /4 4 4 7 5 6 /7 7 7 7 6 6 /# % % . % . /% # . % % # /% . . . # o /. % . % . o /o . # o # . /. . . # . # /"]
11 | ],
12 | inputs : [
13 | /* 問題入力テスト */
14 | { input:["editmode", "newboard,2,1"] },
15 | { input:["mouse,left, 1,1", "mouse,leftx2, 3,1"],
16 | result:"pzprv3/nondango/1/2/1/0 0 /o . /"},
17 | /* 回答入力テスト */
18 | { input:["editmode", "newboard,3,2", "mouse,left, 1,1", "mouse,left, 3,1", "mouse,left, 5,1", "playmode", "setconfig,use,1"] },
19 | { input:["mouse,left, 1,1", "mouse,leftx2, 3,1", "mouse,leftx3, 5,1", "mouse,left, 1,3", "mouse,leftx2, 3,3", "mouse,leftx3, 5,3"],
20 | result:"pzprv3/nondango/2/3/1/0 0 0 /0 0 0 /# o # /+ . + /"},
21 | { input:["ansclear", "mouse,right, 1,1", "mouse,rightx2, 3,1", "mouse,rightx3, 5,1", "mouse,right, 1,3", "mouse,rightx2, 3,3", "mouse,rightx3, 5,3"],
22 | result:"pzprv3/nondango/2/3/1/0 0 0 /0 0 0 /% o % /+ . + /"},
23 | { input:["ansclear", "setconfig,use,2", "mouse,left, 1,1", "mouse,leftx2, 3,1", "mouse,leftx3, 5,1", "mouse,left, 1,3", "mouse,leftx2, 3,3", "mouse,leftx3, 5,3"],
24 | result:"pzprv3/nondango/2/3/1/0 0 0 /0 0 0 /# % o /+ . + /"},
25 | { input:["ansclear", "mouse,right, 1,1", "mouse,rightx2, 3,1", "mouse,rightx3, 5,1", "mouse,right, 1,3", "mouse,rightx2, 3,3", "mouse,rightx3, 5,3"],
26 | result:"pzprv3/nondango/2/3/1/0 0 0 /0 0 0 /% # o /+ . + /"}
27 | ]
28 | });
29 |
--------------------------------------------------------------------------------
/test/script/test_norinori.js:
--------------------------------------------------------------------------------
1 | /* test_norinori.js */
2 |
3 | ui.debug.addDebugData('norinori', {
4 | url : '5/5/cag4ocjo',
5 | failcheck : [
6 | ['csGt2', "pzprv3/norinori/5/5/5/0 0 1 2 2 /1 1 1 2 2 /1 3 3 2 2 /3 3 3 3 3 /4 4 3 3 3 /# # . . . /. # . . . /. . . . . /. . . . . /. . . . . /"],
7 | ['bkShadeGt2', "pzprv3/norinori/5/5/5/0 0 1 2 2 /1 1 1 2 2 /1 3 3 2 2 /3 3 3 3 3 /4 4 3 3 3 /# # + . # /+ + # # . /# . . . # /. . . . # /. . . . . /"],
8 | ['csLt2', "pzprv3/norinori/5/5/5/0 0 1 2 2 /1 1 1 2 2 /1 3 3 2 2 /3 3 3 3 3 /4 4 3 3 3 /# # + + + /+ + # # + /# . . + . /+ + . . . /# # + . . /"],
9 | ['bkShadeLt2', "pzprv3/norinori/5/5/5/0 0 1 2 2 /1 1 1 2 2 /1 3 3 2 2 /3 3 3 3 3 /4 4 3 3 3 /# # + + + /+ + # # + /# # + + . /+ + . . . /# # + . . /"],
10 | ['bkNoShade', "pzprv3/norinori/5/5/5/0 0 1 2 2 /1 1 1 2 2 /1 3 3 2 2 /3 3 3 3 3 /4 4 3 3 3 /# # + + + /+ + + + + /+ + + + . /+ + . . . /# # + . . /"],
11 | [null, "pzprv3/norinori/5/5/5/0 0 1 2 2 /1 1 1 2 2 /1 3 3 2 2 /3 3 3 3 3 /4 4 3 3 3 /# # + + + /+ + # # + /# # + + # /+ + . . # /# # + . . /"]
12 | ],
13 | inputs : [
14 | /* 問題入力はlitsと同じなので省略 */
15 | /* 回答入力テスト */
16 | { input:["playmode", "newboard,4,4"] },
17 | { input:["mouse,left, 4,0, 4,4, 2,4, 2,6", "mouse,left, 0,6, 6,6, 6,2, 8,2"],
18 | result:"pzprv3/norinori/4/4/1/0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /. . # . /. . # . /. . . . /# # . . /"}
19 | ]
20 | });
21 |
--------------------------------------------------------------------------------
/test/script/test_numlin.js:
--------------------------------------------------------------------------------
1 | /* test_numlin.js */
2 |
3 | ui.debug.addDebugData('numlin', {
4 | url : '5/5/1j2h3m1h2j3',
5 | failcheck : [
6 | ['brNoLine', "pzprv3/numlin/5/5"],
7 | ['lnBranch', "pzprv3/numlin/5/5/1 . . . . /2 . . 3 . /. . . . . /. 1 . . 2 /. . . . 3 /0 0 0 0 /1 1 1 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 0 0 0 0 /"],
8 | ['lnCross', "pzprv3/numlin/5/5/1 . . . . /2 . . 3 . /. . . . . /. 1 . . 2 /. . . . 3 /1 0 0 0 /1 1 1 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 0 0 0 0 /"],
9 | ['lcTripleNum',"pzprv3/numlin/5/5/1 . . . . /2 . . 3 . /. . . . . /. 1 . . 2 /. . . . 3 /1 1 1 1 /1 1 1 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /1 0 0 0 1 /0 0 0 0 1 /0 0 0 0 1 /0 0 0 0 1 /"],
10 | ['nmConnDiff',"pzprv3/numlin/5/5/1 . . . . /2 . . 3 . /. . . . . /. 1 . . 2 /. . . . 3 /1 1 0 0 /0 0 0 0 /0 0 0 0 /0 0 1 1 /0 0 0 0 /0 0 1 0 0 /0 0 1 0 0 /0 0 1 0 0 /0 0 0 0 0 /"],
11 | ['lcOnNum', "pzprv3/numlin/5/5/1 . . . . /2 . . 3 . /. . . . . /. 1 . . 2 /. . . . 3 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 1 1 /0 0 0 0 /0 0 1 0 1 /0 0 1 0 1 /0 0 1 0 1 /0 0 0 0 0 /"],
12 | ['lnDeadEnd',"pzprv3/numlin/5/5/1 . . . . /2 . . 3 . /. . . . . /. 1 . . 2 /. . . . 3 /1 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 1 /0 1 0 0 0 /0 1 0 1 0 /0 0 0 1 0 /0 0 0 1 0 /"],
13 | ['lcIsolate',"pzprv3/numlin/5/5/1 . . . . /2 . . 3 . /. . . . . /. 1 . . 2 /. . . . 3 /1 0 0 0 /0 0 0 0 /0 0 1 0 /0 0 0 0 /0 0 1 0 /0 1 0 0 0 /0 1 0 0 0 /0 1 1 1 0 /0 0 1 1 0 /"],
14 | ['nmNoLine', "pzprv3/numlin/5/5/1 . . . . /2 . . 3 . /. . . . . /. 1 . . 2 /. . . . 3 /1 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 1 /0 1 0 0 0 /0 1 0 1 0 /0 1 0 1 0 /0 0 0 1 0 /"],
15 | [null, "pzprv3/numlin/5/5/1 . . . . /2 . . 3 . /. . . . . /. 1 . . 2 /. . . . 3 /1 -1 1 1 /0 -1 0 0 /0 -1 -1 0 /0 -1 -1 0 /1 1 -1 1 /0 1 1 0 1 /1 1 1 1 1 /1 1 1 1 1 /1 0 1 1 0 /"]
16 | ],
17 | inputs : [
18 | /* 問題入力はnurikabeと同じなので省略 */
19 | /* 回答入力はmashuと同じなので省略 */
20 | /* AreaLineManagerでエラーしないか確認 */
21 | { input:["newboard,5,2", "playmode"] },
22 | { input:["anslear", "mouse,left, 1,1, 7,1", "mouse,left, 3,3, 9,3", "mouse,left, 5,1, 5,3", "mouse,right, 6,3, 5,2"],
23 | result:"pzprv3/numlin/2/5/. . . . . /. . . . . /1 1 1 0 /0 1 -1 1 /0 0 -1 0 0 /"},
24 | { input:["anslear", "mouse,left, 5,1, 5,3, 7,3"],
25 | result:"pzprv3/numlin/2/5/. . . . . /. . . . . /1 1 1 0 /0 1 1 1 /0 0 1 0 0 /"}
26 | ]
27 | });
28 |
--------------------------------------------------------------------------------
/test/script/test_nuribou.js:
--------------------------------------------------------------------------------
1 | /* test_nuribou.js */
2 |
3 | ui.debug.addDebugData('nuribou', {
4 | url : '5/5/1g2l1g4r7',
5 | failcheck : [
6 | ['csWidthGt1',"pzprv3/nuribou/5/5/1 . 2 . . /. . . . 1 /. 4 . . . /. . . . . /. . . . 7 /. . . . . /# # # . . /. . # . . /. . # . . /. . . . . /"],
7 | ['csCornerSize',"pzprv3/nuribou/5/5/1 . 2 . . /. . . . 1 /. 4 . . . /. . . . . /. . . . 7 /+ # + + # /# + # # + /. . + + # /. . . . . /. . . . . /"],
8 | ['bkNoNum', "pzprv3/nuribou/5/5/1 . 2 . . /. . . . 1 /. 4 . . . /. . . . . /. . . . 7 /+ # + + # /# + # # + /# + + + # /. # . . . /. . # # . /"],
9 | ['bkNumGe2',"pzprv3/nuribou/5/5/1 . 2 . . /. . . . 1 /. 4 . . . /. . . . . /. . . . 7 /+ # + + # /# + # # + /# + + + # /. . . . . /. . . . . /"],
10 | ['bkSizeNe',"pzprv3/nuribou/5/5/1 . 2 . . /. . . . 1 /. 4 . . . /. . . . . /. . . . 7 /+ # + # . /+ # + # + /# + # . # /. . # . . /. . # . . /"],
11 | [null, "pzprv3/nuribou/5/5/1 . 2 . . /. . . . 1 /. 4 . . . /. . . . . /. . . . 7 /+ # + + # /# + # # + /# + + + # /+ # # # . /. . . . . /"]
12 | ],
13 | inputs : [] /* nurikabeと同じなので省略 */
14 | });
15 |
--------------------------------------------------------------------------------
/test/script/test_nurikabe.js:
--------------------------------------------------------------------------------
1 | /* test_nurikabe.js */
2 |
3 | ui.debug.addDebugData('nurikabe', {
4 | url : '5/5/g5k2o1k3g',
5 | failcheck : [
6 | ['cs2x2', "pzprv3/nurikabe/5/5/. 5 . . . /. . 2 . . /# # . . . /# # 1 . . /. . . 3 . /"],
7 | ['bkNoNum', "pzprv3/nurikabe/5/5/. 5 # # . /. # 2 . # /. # # # # /. # 1 . . /# . . 3 . /"],
8 | ['csDivide',"pzprv3/nurikabe/5/5/. 5 # # # /. # 2 . # /. . # # # /. . 1 . . /# . . 3 . /"],
9 | ['bkNumGe2',"pzprv3/nurikabe/5/5/. 5 # # # /. # 2 . # /. # # # # /. . 1 . . /. . . 3 . /"],
10 | ['bkSizeNe',"pzprv3/nurikabe/5/5/. 5 # # # /. # 2 . # /. # # # # /. # 1 # . /. # # 3 . /"],
11 | [null, "pzprv3/nurikabe/5/5/+ 5 # # # /+ # 2 + # /+ # # # # /+ # 1 # . /# # # 3 . /"]
12 | ],
13 | inputs : [
14 | /* 回答入力テスト */
15 | { input:["newboard,5,1", "playmode", "setconfig,use,1"] },
16 | { input:["ansclear", "mouse,left, 1,1, 9,1"],
17 | result:"pzprv3/nurikabe/1/5/# # # # # /" },
18 | { input:["mouse,left, 1,1, 9,1"],
19 | result:"pzprv3/nurikabe/1/5/. . . . . /" },
20 | { input:["anslear", "mouse,right, 1,1, 9,1"],
21 | result:"pzprv3/nurikabe/1/5/+ + + + + /" },
22 | { input:["mouse,right, 1,1, 9,1"],
23 | result:"pzprv3/nurikabe/1/5/. . . . . /" },
24 | { input:["setconfig,use,2", "ansclear"] },
25 | { input:["mouse,left, 1,1, 9,1"],
26 | result:"pzprv3/nurikabe/1/5/# # # # # /" },
27 | { input:["mouse,left, 1,1, 9,1"],
28 | result:"pzprv3/nurikabe/1/5/+ + + + + /" },
29 | { input:["mouse,left, 1,1, 9,1"],
30 | result:"pzprv3/nurikabe/1/5/. . . . . /" },
31 | { input:["mouse,right, 1,1, 9,1"],
32 | result:"pzprv3/nurikabe/1/5/+ + + + + /" },
33 | { input:["mouse,right, 1,1, 9,1"],
34 | result:"pzprv3/nurikabe/1/5/# # # # # /" },
35 | { input:["mouse,right, 1,1, 9,1"],
36 | result:"pzprv3/nurikabe/1/5/. . . . . /" },
37 | /* 問題入力テスト */
38 | { input:["editmode", "newboard,5,1"] },
39 | { input:["cursor,1,1", "key,-", "key,right", "key,0", "key,right", "key,1", "key,right", "key,2", "key,right", "key,1,0" ],
40 | result:"pzprv3/nurikabe/1/5/- . 1 2 10 /" },
41 | { input:["cursor,1,1", "key,-", "key,right", "key,-", "key,right", "key,-", "key,-" ],
42 | result:"pzprv3/nurikabe/1/5/. - . 2 10 /" },
43 | { input:["newboard,6,1"] },
44 | { input:["cursor,0,0", "mouse,leftx2, 1,1", "mouse,leftx3, 3,1", "mouse,leftx4, 5,1", "mouse,leftx5, 7,1", "mouse,leftx6, 9,1", "mouse,rightx2, 11,1"],
45 | result:"pzprv3/nurikabe/1/6/- 1 2 3 4 999 /" }
46 | ]
47 | });
48 |
--------------------------------------------------------------------------------
/test/script/test_nurimisaki.js:
--------------------------------------------------------------------------------
1 | /* test_nurimisaki.js */
2 |
3 | ui.debug.addDebugData('nurimisaki', {
4 | url : '5/5/4l2l.n.g',
5 | failcheck : [
6 | ['brNoShade', "pzprv3/nurimisaki/5/5/4 . . . . /. . 2 . . /. . . . - /. . . . . /. . . - . /. . . . . /. . . . . /. . . . . /. . . . . /. . . . . /"],
7 | ['cuDivide', "pzprv3/nurimisaki/5/5/4 . . . . /. . 2 . . /. . . . - /. . . . . /. . . - . /. # . . . /. # . . . /. # . . . /. # . . . /. # . . . /"],
8 | ['cs2x2', "pzprv3/nurimisaki/5/5/4 . . . . /. . 2 . . /. . . . - /. . . . . /. . . - . /. . . . . /. . . . . /. # # . . /. # # . . /. . . . . /"],
9 | ['nmUnshadeNe1',"pzprv3/nurimisaki/5/5/4 . . . . /. . 2 . . /. . . . - /. . . . . /. . . - . /. # . . . /+ . . . . /+ . . . . /+ + . . . /# # . . . /"],
10 | ['nmUnshadeEq1',"pzprv3/nurimisaki/5/5/4 . . . . /. . 2 . . /. . . . - /. . . . . /. . . - . /. # # . . /+ # . . # /+ # # . . /+ + . . # /# # # . # /"],
11 | ['nmSumSizeNe', "pzprv3/nurimisaki/5/5/4 . . . . /. . 2 . . /. . . . - /. . . . . /. . . - . /. # # # # /+ # . . # /+ # # . . /+ + . . # /. . # . # /"],
12 | ['cu2x2', "pzprv3/nurimisaki/5/5/4 . . . . /. . 2 . . /. . . . - /. . . . . /. . . - . /. # # # # /+ # . . # /+ . # . . /+ + . . # /# # # . # /"],
13 | [null, "pzprv3/nurimisaki/5/5/4 . . . . /. . 2 . . /. . . . - /. . . . . /. . . - . /. # # # # /+ # . . # /+ # # . . /+ + . . # /# # # . # /"]
14 | ],
15 | inputs : [
16 | /* 回答入力はnurikabeと同じなので省略 */
17 | /* 問題入力はkurottoと同じなので省略 */
18 | ]
19 | });
20 |
--------------------------------------------------------------------------------
/test/script/test_paintarea.js:
--------------------------------------------------------------------------------
1 | /* test_paintarea.js */
2 |
3 | ui.debug.addDebugData('paintarea', {
4 | url : '5/5/pmvmfuejf4k1f',
5 | failcheck : [
6 | ['bkMixed', "pzprv3/paintarea/5/5/12/0 1 2 2 2 /0 3 2 2 4 /5 6 6 7 4 /5 8 9 10 4 /8 8 9 11 11 /. . . . . /. 4 . . . /. . . . . /. . . 1 . /. . . . . /. . + + + /. . # # . /. . . . . /. . . . . /. . . . . /"],
7 | ['csDivide', "pzprv3/paintarea/5/5/13/0 1 2 2 2 /0 3 4 4 5 /6 7 7 8 5 /6 9 10 11 5 /9 9 10 12 12 /. . . . . /. 4 . . . /. . . . . /. . . 1 . /. . . . . /# # + + + /# + # # . /. # # . . /. . . . . /. . . . . /"],
8 | ['cs2x2', "pzprv3/paintarea/5/5/13/0 1 2 2 2 /0 3 4 4 5 /6 7 7 8 5 /6 9 10 11 5 /9 9 10 12 12 /. . . . . /. 4 . . . /. . . . . /. . . 1 . /. . . . . /# # + + + /# + # # . /# # # . . /# # . . . /# # . . . /"],
9 | ['nmShadeNe',"pzprv3/paintarea/5/5/13/0 1 2 2 2 /0 3 4 4 5 /6 7 7 8 5 /6 9 10 11 5 /9 9 10 12 12 /. . . . . /. 4 . . . /. . . . . /. . . 1 . /. . . . . /# # + + + /# + # # . /# # # . . /# + + . . /+ + + . . /"],
10 | ['cu2x2', "pzprv3/paintarea/5/5/13/0 1 2 2 2 /0 3 4 4 5 /6 7 7 8 5 /6 9 10 11 5 /9 9 10 12 12 /. . . . . /. 4 . . . /. . . . . /. . . 1 . /. . . . . /# # + + + /# + # # # /# # # . # /# + + . # /+ + + . . /"],
11 | [null, "pzprv3/paintarea/5/5/13/0 1 2 2 2 /0 3 4 4 5 /6 7 7 8 5 /6 9 10 11 5 /9 9 10 12 12 /. . . . . /. 4 . . . /. . . . . /. . . 1 . /. . . . . /# # + + + /# + # # + /# # # + + /# + # # + /+ + # + + /"]
12 | ],
13 | inputs : [
14 | /* 問題入力テスト */
15 | { input:["editmode", "newboard,6,2"] },
16 | { input:["mouse,left, 4,0, 4,2, 2,2, 2,4", "mouse,left, 8,0, 8,2, 6,2, 6,4"],
17 | result:"pzprv3/paintarea/2/6/3/0 0 1 1 2 2 /0 1 1 2 2 2 /. . . . . . /. . . . . . /. . . . . . /. . . . . . /" },
18 | { input:["cursor,1,1", "key,-", "key,right", "key,0", "key,right", "key,1", "key,right", "key,2", "key,right", "key,3" ],
19 | result:"pzprv3/paintarea/2/6/3/0 0 1 1 2 2 /0 1 1 2 2 2 /- 0 1 2 3 . /. . . . . . /. . . . . . /. . . . . . /" },
20 | { input:["cursor,1,1", "key,-", "key,right", "key,-", "key,right", "key,-", "key,-" ],
21 | result:"pzprv3/paintarea/2/6/3/0 0 1 1 2 2 /0 1 1 2 2 2 /. - . 2 3 . /. . . . . . /. . . . . . /. . . . . . /" },
22 | { input:["newboard,7,2", "mouse,left, 4,0, 4,2, 2,2, 2,4", "mouse,left, 8,0, 8,2, 6,2, 6,4", "mouse,left, 12,0, 12,2, 10,2, 10,4"]},
23 | { input:["cursor,0,0", "mouse,leftx2, 1,1", "mouse,leftx3, 3,1", "mouse,leftx4, 5,1", "mouse,leftx5, 7,1", "mouse,leftx6, 9,1", "mouse,leftx7, 11,1", "mouse,leftx8, 13,1",
24 | "cursor,0,0", "mouse,rightx2, 1,3", "mouse,rightx3, 3,3", "mouse,rightx4, 5,3", "mouse,rightx5, 7,3", "mouse,rightx6, 9,3", "mouse,rightx7, 11,3", "mouse,rightx8, 13,3"],
25 | result:"pzprv3/paintarea/2/7/4/0 0 1 1 2 2 3 /0 1 1 2 2 3 3 /- 0 1 2 3 4 . /4 3 2 1 0 - . /. . . . . . . /. . . . . . . /" }
26 | ]
27 | });
28 |
--------------------------------------------------------------------------------
/test/script/test_pipelinkr.js:
--------------------------------------------------------------------------------
1 | /* test_pipelinkr.js */
2 |
3 | ui.debug.addDebugData('pipelinkr', {
4 | url : '5/5/ma0j2j0fm',
5 | failcheck : [
6 | ['ceAddLine', "pzprv3/pipelinkr/5/5/circle/. . . . . /. a o . . /. o o o . /. . o f . /. . . . . /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 0 0 0 /0 0 0 1 0 /"],
7 | ['lnBranch', "pzprv3/pipelinkr/5/5/circle/. . . . . /. a o . . /. o o o . /. . o f . /. . . . . /0 0 0 0 /1 1 0 0 /0 0 0 0 /0 1 1 0 /0 0 0 0 /0 1 0 0 0 /0 1 0 0 0 /0 1 0 0 0 /0 1 0 1 0 /"],
8 | ['lnCrossExIce',"pzprv3/pipelinkr/5/5/circle/. . . . . /. a o . . /. o o o . /. . o f . /. . . . . /0 0 0 0 /1 1 0 0 /0 0 0 0 /1 1 1 0 /0 0 0 0 /0 1 0 0 0 /0 1 0 0 0 /0 1 0 0 0 /0 1 0 1 0 /"],
9 | ['lnCurveOnIce',"pzprv3/pipelinkr/5/5/circle/. . . . . /. a o . . /. o o o . /. . o f . /. . . . . /0 0 0 0 /1 1 0 0 /0 0 0 1 /0 1 1 -1 /0 0 0 1 /0 1 0 0 0 /0 1 0 1 0 /0 1 0 -1 1 /0 0 0 1 1 /"],
10 | ['lnPlLoop', "pzprv3/pipelinkr/5/5/circle/. . . . . /. a o . . /. o o o . /. . o f . /. . . . . /0 0 0 1 /1 1 1 1 /1 1 1 1 /0 1 1 -1 /0 1 0 1 /0 1 1 0 1 /0 1 1 -1 0 /0 1 1 -1 1 /0 0 1 1 1 /"],
11 | ['lnNotCrossMk',"pzprv3/pipelinkr/5/5/circle/. . . . . /. a o . . /. o o o . /. . o f . /. . . . . /0 0 1 1 /0 1 1 1 /1 1 1 1 /0 1 1 -1 /0 1 0 1 /0 0 1 0 1 /0 1 1 -1 0 /0 1 1 -1 1 /0 0 1 1 1 /"],
12 | ['ceNoLine', "pzprv3/pipelinkr/5/5/circle/. . . . . /. a o . . /. o o o . /. . o f . /. . . . . /1 0 1 1 /1 1 1 1 /1 1 1 1 /0 1 1 -1 /0 1 0 1 /1 1 1 0 1 /0 1 1 -1 0 /0 1 1 -1 1 /0 0 1 1 1 /"],
13 | ['lnDeadEnd', "pzprv3/pipelinkr/5/5/circle/. . . . . /. a o . . /. o o o . /. . o f . /. . . . . /1 0 1 1 /1 1 1 1 /1 1 1 1 /0 1 1 -1 /0 1 0 1 /1 1 1 0 1 /0 1 1 -1 0 /1 1 1 -1 1 /1 0 1 1 1 /"],
14 | [null, "pzprv3/pipelinkr/5/5/circle/. . . . . /. a o . . /. o o o . /. . o f . /. . . . . /1 0 1 1 /1 1 1 1 /1 1 1 1 /0 1 1 -1 /1 1 0 1 /1 1 1 0 1 /0 1 1 -1 0 /1 1 1 -1 1 /1 0 1 1 1 /"]
15 | ],
16 | inputs : [
17 | /* 問題入力テスト */
18 | { input:["newboard,5,2", "editmode"] },
19 | { input:["cursor,1,1", "key,q", "key,right", "key,w", "key,right", "key,e", "key,right", "key,r", "key,right", "key,1",
20 | "cursor,1,3", "key,a", "key,right", "key,s", "key,right", "key,d", "key,right", "key,f" ],
21 | result:"pzprv3/pipelinkr/2/5/circle/a b c . o /d e f g . /0 0 0 0 /0 0 0 0 /0 0 0 0 0 /" },
22 | { input:["cursor,1,1", "key,r", "key,right", "key,-", "key,right,right", "key,-,-", "cursor,3,3", "key, " ],
23 | result:"pzprv3/pipelinkr/2/5/circle/. - c . o /d . f g . /0 0 0 0 /1 0 0 0 /1 1 0 0 0 /" }
24 | /* 回答入力はicebarn, pipelinkと同じ */
25 | ]
26 | });
27 |
--------------------------------------------------------------------------------
/test/script/test_reflect.js:
--------------------------------------------------------------------------------
1 | /* test_reflect.js */
2 |
3 | ui.debug.addDebugData('reflect', {
4 | url : '5/5/49l20c5f24',
5 | failcheck : [
6 | ['brNoLine', "pzprv3/reflect/5/5"],
7 | ['lnBranch', "pzprv3/reflect/5/5/49 . . . . /. . . . . /. . . 2 . /. . + . . /. . . . 24 /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 0 1 0 /0 0 1 0 0 /0 0 1 0 0 /"],
8 | ['lnCrossExMk', "pzprv3/reflect/5/5/49 . . . . /. . . . . /. . . 2 . /. . + . . /. . . . 24 /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 1 0 /0 0 1 0 0 /0 0 1 0 0 /"],
9 | ['lnLenGt', "pzprv3/reflect/5/5/49 . . . . /. . . . . /. . . 2 . /. . + . . /. . . . 24 /0 0 0 0 /0 0 0 0 /0 0 1 0 /0 0 0 0 /0 0 1 1 /0 0 0 0 0 /0 0 0 1 0 /0 0 1 0 1 /0 0 1 0 1 /"],
10 | ['lnExTri', "pzprv3/reflect/5/5/49 . . . . /. . . . . /. . . 2 . /. . + . . /. . . . 24 /1 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /1 0 1 1 /1 0 0 0 0 /1 0 0 0 0 /1 0 1 0 0 /1 0 1 0 1 /"],
11 | ['lnLenLt', "pzprv3/reflect/5/5/49 . . . . /. . . . . /. . . 2 . /. . + . . /. . . . 24 /1 0 0 0 /0 0 0 0 /0 0 1 0 /0 0 0 0 /1 0 1 1 /1 0 0 0 0 /1 0 0 1 0 /1 0 1 0 0 /1 0 1 0 1 /"],
12 | ['lnNotCrossMk',"pzprv3/reflect/5/5/49 . . . . /. . . . . /. . . 2 . /. . + . . /. . . . 24 /1 1 1 1 /0 0 0 0 /0 0 1 0 /0 0 0 0 /1 0 1 1 /1 0 0 0 1 /1 0 0 1 0 /1 0 1 0 0 /1 0 1 0 1 /"],
13 | ['lnDeadEnd', "pzprv3/reflect/5/5/49 . . . . /. . . . . /. . . 2 . /. . . . . /. . . . 2-2 /1 1 1 1 /0 1 1 0 /0 1 1 0 /0 0 1 1 /1 0 1 1 /1 0 0 0 1 /1 1 0 1 0 /1 0 0 0 0 /1 0 1 0 1 /"],
14 | ['lnPlLoop', "pzprv3/reflect/5/5/49 . . . . /. . . . . /. . . 2 . /. . . . . /. . . . 2-2 /1 1 1 1 /0 1 1 0 /0 1 1 0 /0 0 0 0 /1 1 1 1 /1 0 0 0 1 /1 1 0 1 1 /1 0 0 0 1 /1 0 0 0 1 /"],
15 | [null, "pzprv3/reflect/5/5/49 . . . . /. . . . . /. . . 2 . /. . + . . /. . . . 24 /1 1 1 1 /0 0 -1 1 /0 -1 1 0 /-1 1 1 1 /1 0 1 1 /1 0 0 -1 1 /1 0 -1 1 0 /1 -1 1 0 0 /1 1 1 0 1 /"]
16 | ],
17 | inputs : [
18 | /* 問題入力テスト */
19 | { input:["newboard,5,1", "editmode"] },
20 | { input:["cursor,1,1", "key,q", "key,right", "key,w", "key,right", "key,e", "key,right", "key,r", "key,right", "key,t" ],
21 | result:"pzprv3/reflect/1/5/1 2 3 4 + /0 0 0 0 /" },
22 | { input:["cursor,1,1", "key,y", "key,right", "key,y" ],
23 | result:"pzprv3/reflect/1/5/. . 3 4 + /0 0 0 0 /" },
24 | { input:["newboard,6,2", "editmode"] },
25 | { input:["cursor,0,0", "mouse,leftx2, 1,1", "mouse,leftx3, 3,1", "mouse,leftx4, 5,1", "mouse,leftx5, 7,1", "mouse,leftx6, 9,1", "mouse,leftx7, 11,1",
26 | "cursor,0,0", "mouse,rightx2, 1,3", "mouse,rightx3, 3,3", "mouse,rightx4, 5,3", "mouse,rightx5, 7,3", "mouse,rightx6, 9,3", "mouse,rightx7, 11,3"],
27 | result:"pzprv3/reflect/2/6/1 2 3 4 + . /+ 4 3 2 1 . /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 0 /"},
28 | /* 回答入力テスト (入力できない箇所) */
29 | { input:["newboard,5,5", "editmode", "cursor,1,1", "mouse,leftx2, 7,3", "mouse,leftx3, 3,3", "mouse,leftx4, 3,7", "mouse,leftx5, 7,7"] },
30 | { input:["playmode", "mouse,left, 1,3, 9,3, 9,7, 1,7, 1,3", "mouse,left, 3,1, 7,1, 7,9, 3,9, 3,1"],
31 | result:"pzprv3/reflect/5/5/. . . . . /. 2 . 1 . /. . . . . /. 3 . 4 . /. . . . . /0 1 1 0 /1 0 0 1 /0 0 0 0 /1 0 0 1 /0 1 1 0 /0 1 0 1 0 /1 0 0 0 1 /1 0 0 0 1 /0 1 0 1 0 /"}
32 | ]
33 | });
34 |
--------------------------------------------------------------------------------
/test/script/test_renban.js:
--------------------------------------------------------------------------------
1 | /* test_renban.js */
2 |
3 | ui.debug.addDebugData('renban', {
4 | url : '4/4/vmok3g1p5g2h',
5 | failcheck : [
6 | ['bkDupNum', "pzprv3/renban/4/4/1 1 1 /1 1 1 /0 1 1 /0 1 1 /1 0 1 0 /0 0 0 0 /1 1 1 0 /1 . . . /. . . . /. . . 5 /. 2 . . /. 3 . . /2 . . . /. 3 . . /. . . . /"],
7 | ['ceNoNum', "pzprv3/renban/4/4/1 1 1 /1 1 1 /0 1 1 /0 1 1 /1 0 1 0 /0 0 0 0 /1 1 1 0 /1 . . . /. . . . /. . . 5 /. 2 . . /. 3 . . /2 . . . /. 5 . . /4 . . . /"],
8 | ['cbDiffLenNe',"pzprv3/renban/4/4/1 1 1 /1 1 1 /0 1 1 /0 1 1 /1 0 1 0 /0 0 0 0 /1 1 1 0 /1 . . . /. . . . /. . . 5 /. 2 . . /. 3 7 . /2 4 8 . /6 5 9 . /3 . 7 . /"],
9 | [null, "pzprv3/renban/4/4/1 1 1 /1 1 1 /0 1 1 /0 1 1 /1 0 1 0 /0 0 0 0 /1 1 1 0 /1 . . . /. . . . /. . . 5 /. 2 . . /. 3 7 3 /2 4 8 4 /6 5 9 . /3 . 6 2 /"]
10 | ],
11 | inputs : [
12 | /* 問題入力, 回答入力はripple, bosanowaとだいたい同じなので省略 */
13 | ]
14 | });
15 |
--------------------------------------------------------------------------------
/test/script/test_ringring.js:
--------------------------------------------------------------------------------
1 | /* test_ringring.js */
2 |
3 | ui.debug.addDebugData('ringring', {
4 | url : '5/5/02084',
5 | failcheck : [
6 | ['lnOnShade',"pzprv3/ringring/5/5/1 0 0 1 1 /0 0 0 0 0 /0 1 0 1 0 /0 0 0 1 0 /0 0 0 0 0 /0 1 0 0 /1 1 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 1 0 0 0 /1 1 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /"],
7 | ['brNoLine', "pzprv3/ringring/5/5/1 0 0 1 1 /0 0 0 0 0 /0 0 0 1 0 /0 0 0 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 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /"],
8 | ['lnBranch', "pzprv3/ringring/5/5/1 0 0 1 1 /0 0 0 0 0 /0 0 0 1 0 /0 0 0 1 0 /0 0 0 0 0 /0 1 0 0 /1 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 1 0 0 0 /1 1 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /"],
9 | ['lnDeadEnd',"pzprv3/ringring/5/5/1 0 0 1 1 /0 0 0 0 0 /0 0 0 1 0 /0 0 0 1 0 /0 0 0 0 0 /0 1 0 0 /1 1 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 1 0 0 0 /1 1 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /"],
10 | ['lnNotRect',"pzprv3/ringring/5/5/1 0 0 1 1 /0 0 0 0 0 /0 0 0 1 0 /0 0 0 1 0 /0 0 0 0 0 /0 1 0 0 /1 0 1 1 /0 0 0 0 /0 0 0 0 /1 1 1 1 /0 1 1 0 0 /1 0 0 0 1 /1 0 0 0 1 /1 0 -1 0 1 /"],
11 | ['cuNoLine', "pzprv3/ringring/5/5/1 0 0 1 1 /0 0 0 0 0 /0 0 0 1 0 /0 0 0 1 0 /0 0 0 0 0 /0 1 0 0 /1 1 1 1 /0 1 0 0 /0 0 0 0 /1 1 1 1 /0 1 1 0 0 /1 1 1 0 1 /1 0 0 0 1 /1 0 -1 0 1 /"],
12 | [null, "pzprv3/ringring/5/5/1 0 0 1 1 /0 0 0 0 0 /0 0 0 1 0 /0 0 0 1 0 /0 0 0 0 0 /0 1 0 0 /1 1 1 1 /0 0 0 0 /0 1 0 0 /1 1 1 1 /0 1 1 0 0 /1 1 1 0 1 /1 1 1 0 1 /1 0 -1 0 1 /"]
13 | ],
14 | inputs : [
15 | /* 問題入力テスト */
16 | { input:["newboard,3,3", "editmode"] },
17 | { input:["mouse,left, 1,1", "mouse,leftx2, 3,1", "mouse,right, 1,3", "mouse,rightx2, 3,3"],
18 | result:"pzprv3/ringring/3/3/1 0 0 /1 0 0 /0 0 0 /0 0 /0 0 /0 0 /0 0 0 /0 0 0 /" },
19 | /* 回答入力テスト */
20 | { input:["newboard,3,3", "editmode", "mouse,left, 3,3", "playmode", "mouse,left, 1,3, 5,3, 5,5, 3,5, 3,1"],
21 | result:"pzprv3/ringring/3/3/0 0 0 /0 1 0 /0 0 0 /0 0 /0 0 /0 1 /0 0 0 /0 0 1 /" }
22 | ]
23 | });
24 |
--------------------------------------------------------------------------------
/test/script/test_ripple.js:
--------------------------------------------------------------------------------
1 | /* test_ripple.js */
2 |
3 | ui.debug.addDebugData('ripple', {
4 | url : '4/4/9n8rigk14h32k',
5 | failcheck : [
6 | ['bkDupNum', "pzprv3/ripple/4/4/0 1 0 /0 1 1 /0 1 1 /1 0 1 /1 1 0 1 /1 1 0 0 /1 0 1 0 /. . . . /. 1 4 . /. 3 2 . /. . . . /. . . . /. . . . /. . . . /. . 3 . /"],
7 | ['nmSmallGap',"pzprv3/ripple/4/4/0 1 0 /0 1 1 /0 1 1 /1 0 1 /1 1 0 1 /1 1 0 0 /1 0 1 0 /. . . . /. 1 4 . /. 3 2 . /. . . . /1 2 . . /2 . . . /4 . . 3 /1 2 1 . /"],
8 | ['ceNoNum', "pzprv3/ripple/4/4/0 1 0 /0 1 1 /0 1 1 /1 0 1 /1 1 0 1 /1 1 0 0 /1 0 1 0 /. . . . /. 1 4 . /. 3 2 . /. . . . /1 2 . . /2 . . . /4 . . . /1 2 1 . /"],
9 | [null, "pzprv3/ripple/4/4/0 1 0 /0 1 1 /0 1 1 /1 0 1 /1 1 0 1 /1 1 0 0 /1 0 1 0 /. . . . /. 1 4 . /. 3 2 . /. . . . /1 2 3 1 /2 . . 2 /4 . . 1 /1 2 1 3 /"]
10 | ],
11 | inputs : [
12 | /* 問題入力テスト */
13 | { input:["newboard,4,2", "editmode", "mouse,left, 0,2, 8,2", "mouse,left, 4,0, 4,4"] },
14 | { input:["cursor,1,1", "key,1", "key,right,2", "key,right,3"],
15 | result:"pzprv3/ripple/2/4/0 1 0 /0 1 0 /1 1 1 1 /1 2 . . /. . . . /. . . . /. . . . /" },
16 | { input:["cursor,5,1", "key,1", "key,right,2", "cursor,1,1", "key,-", "key,right,-,-", "key,right, "],
17 | result:"pzprv3/ripple/2/4/0 1 0 /0 1 0 /1 1 1 1 /- . . 2 /. . . . /. . . . /. . . . /" },
18 | { input:["newboard,4,2", "editmode", "mouse,left, 0,2, 8,2", "mouse,left, 4,0, 4,4"] },
19 | { input:["cursor,0,0", "mouse,leftx2, 1,1", "mouse,leftx3, 3,1", "mouse,leftx4, 5,1", "mouse,leftx5, 7,1",
20 | "mouse,rightx2, 1,3", "mouse,rightx3, 3,3", "mouse,rightx4, 5,3", "mouse,rightx5, 7,3"],
21 | result:"pzprv3/ripple/2/4/0 1 0 /0 1 0 /1 1 1 1 /- 1 2 . /2 1 - . /. . . . /. . . . /" },
22 | /* 回答入力テスト */
23 | { input:["newboard,4,2", "editmode", "mouse,left, 0,2, 8,2", "mouse,left, 4,0, 4,4", "playmode"] },
24 | { input:["cursor,1,1", "key,1", "key,right,2", "key,right,3"],
25 | result:"pzprv3/ripple/2/4/0 1 0 /0 1 0 /1 1 1 1 /. . . . /. . . . /1 2 . . /. . . . /" },
26 | { input:["cursor,5,1", "key,1", "key,right,2", "cursor,1,1", "key,-", "key,right,-,-", "key,right, "],
27 | result:"pzprv3/ripple/2/4/0 1 0 /0 1 0 /1 1 1 1 /. . . . /. . . . /. . . 2 /. . . . /" },
28 | { input:["newboard,4,2", "editmode", "mouse,left, 0,2, 8,2", "mouse,left, 4,0, 4,4", "playmode"] },
29 | { input:["cursor,0,0", "mouse,leftx2, 1,1", "mouse,leftx3, 3,1", "mouse,leftx4, 5,1", "mouse,leftx5, 7,1",
30 | "mouse,rightx2, 1,3", "mouse,rightx3, 3,3", "mouse,rightx4, 5,3", "mouse,rightx5, 7,3"],
31 | result:"pzprv3/ripple/2/4/0 1 0 /0 1 0 /1 1 1 1 /. . . . /. . . . /1 2 . 1 /2 1 . 2 /" }
32 | ]
33 | });
34 |
--------------------------------------------------------------------------------
/test/script/test_shikaku.js:
--------------------------------------------------------------------------------
1 | /* test_shikaku.js */
2 |
3 | ui.debug.addDebugData('shikaku', {
4 | url : '6/6/j3g56h6t6h23g5j',
5 | failcheck : [
6 | ['bkNoNum', "pzprv3/shikaku/6/6/. . . . 3 . /5 6 . . 6 . /. . . . . . /. . . . . . /. 6 . . 2 3 /. 5 . . . . /0 0 0 0 0 /0 1 0 1 0 /0 1 0 1 0 /0 1 0 1 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 1 0 0 /0 0 0 0 0 0 /"],
7 | ['bkNumGe2', "pzprv3/shikaku/6/6/. . . . 3 . /5 6 . . 6 . /. . . . . . /. . . . . . /. 6 . . 2 3 /. 5 . . . . /0 0 0 0 0 /1 0 0 0 0 /1 0 0 0 0 /1 0 0 0 0 /1 0 0 0 0 /0 -1 -1 -1 0 /0 0 0 0 0 0 /-1 0 0 0 0 0 /-1 0 0 0 0 0 /-1 0 0 0 0 0 /0 1 1 1 1 0 /"],
8 | ['bkNotRect',"pzprv3/shikaku/6/6/. . . . 3 . /5 6 . . 6 . /. . . . . . /. . . . . . /. 6 . . 2 3 /. 5 . . . . /0 1 1 0 0 /1 0 1 0 0 /1 0 1 0 0 /1 -1 1 0 1 /1 -1 1 0 1 /0 -1 -1 -1 1 /0 1 0 1 1 1 /-1 0 0 0 0 0 /-1 1 1 1 1 1 /-1 -1 -1 0 0 0 /1 1 1 1 1 0 /"],
9 | ['bkSizeNe', "pzprv3/shikaku/6/6/. . . . 3 . /5 6 . . 6 . /. . . . . . /. . . . . . /. 6 . . 2 3 /. 5 . . . . /1 0 1 0 0 /1 0 1 0 0 /1 0 1 0 0 /1 -1 1 0 1 /1 -1 1 0 1 /0 -1 -1 -1 1 /0 0 0 1 1 1 /-1 1 1 0 0 0 /-1 0 0 1 1 1 /-1 -1 -1 0 0 0 /1 1 1 1 1 0 /"],
10 | ['bdDeadEnd',"pzprv3/shikaku/6/6/. . . . 3 . /5 6 . . 6 . /. . . . . . /. . . . . . /. 6 . . 2 3 /. 5 . . . . /1 0 1 0 0 /1 0 1 0 0 /1 0 1 0 0 /1 -1 0 1 1 /1 -1 1 1 1 /0 -1 -1 -1 1 /0 0 0 1 1 1 /-1 0 0 0 0 0 /-1 1 1 1 1 1 /-1 -1 -1 0 0 0 /1 1 1 1 1 0 /"],
11 | [null, "pzprv3/shikaku/6/6/. . . . 3 . /5 6 . . 6 . /. . . . . . /. . . . . . /. 6 . . 2 3 /. 5 . . . . /1 -1 1 0 0 /1 0 1 0 0 /1 -1 1 0 0 /1 -1 0 1 1 /1 -1 0 1 1 /0 -1 -1 -1 1 /0 -1 -1 1 1 1 /-1 -1 -1 0 0 0 /-1 1 1 1 1 1 /-1 -1 -1 0 0 0 /1 1 1 1 1 0 /"]
12 | ],
13 | inputs : [
14 | /* 問題入力テストはlitsと同じなので省略 */
15 | /* 回答入力テスト */
16 | { input:["playmode", "newboard,4,4"] },
17 | { input:["mouse,left, 4,0, 4,4, 2,4, 2,6", "mouse,left, 0,6, 6,6, 6,2, 8,2"],
18 | result:"pzprv3/shikaku/4/4/. . . . /. . . . /. . . . /. . . . /0 1 0 /0 1 1 /1 0 1 /0 0 0 /0 0 0 1 /0 1 0 0 /1 1 1 0 /" },
19 | { input:["mouse,left, 4,0, 4,4, 2,4, 2,6"],
20 | result:"pzprv3/shikaku/4/4/. . . . /. . . . /. . . . /. . . . /0 0 0 /0 0 1 /0 0 1 /0 0 0 /0 0 0 1 /0 0 0 0 /1 1 1 0 /" },
21 | { input:["mouse,right, 1,1, 1,3, 5,3"],
22 | result:"pzprv3/shikaku/4/4/. . . . /. . . . /. . . . /. . . . /0 0 0 /-1 -1 1 /0 0 1 /0 0 0 /-1 0 0 1 /0 0 0 0 /1 1 1 0 /" },
23 | { input:["mouse,right, 1,1, 1,3, 3,3"],
24 | result:"pzprv3/shikaku/4/4/. . . . /. . . . /. . . . /. . . . /0 0 0 /0 -1 1 /0 0 1 /0 0 0 /0 0 0 1 /0 0 0 0 /1 1 1 0 /" }
25 | ]
26 | });
27 |
--------------------------------------------------------------------------------
/test/script/test_shimaguni.js:
--------------------------------------------------------------------------------
1 | /* test_shimaguni.js */
2 |
3 | ui.debug.addDebugData('shimaguni', {
4 | url : '6/6/7fe608s0e3uf3g3g2g43',
5 | failcheck : [
6 | ['cbShade', "pzprv3/shimaguni/6/6/8/0 0 0 1 2 3 /4 4 5 1 2 3 /4 4 5 1 2 2 /5 5 5 1 2 2 /6 6 6 6 6 6 /6 6 7 7 7 7 /3 . . . 3 . /2 . . . . . /. . . . . . /. . . . . . /4 . . . . . /. . 3 . . . /# # # . . . /# # . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /"],
7 | ['bkShadeDivide',"pzprv3/shimaguni/6/6/8/0 0 0 1 2 3 /4 4 5 1 2 3 /4 4 5 1 2 2 /5 5 5 1 2 2 /6 6 6 6 6 6 /6 6 7 7 7 7 /3 . . . 3 . /2 . . . . . /. . . . . . /. . . . . . /4 . . . . . /. . 3 . . . /# # # + . . /+ + + . . . /# # + . . . /+ + # . . . /# # + # # # /# # . . . . /"],
8 | ['bkShadeNe', "pzprv3/shimaguni/6/6/8/0 0 0 1 2 3 /4 4 5 1 2 3 /4 4 5 1 2 2 /5 5 5 1 2 2 /6 6 6 6 6 6 /6 6 7 7 7 7 /3 . . . 3 . /2 . . . . . /. . . . . . /. . . . . . /4 . . . . . /. . 3 . . . /# # # + . . /+ + + . . . /# # + . . . /+ + # . . . /# # + + + + /# + . . . . /"],
9 | ['bsEqShade', "pzprv3/shimaguni/6/6/8/0 0 0 1 2 3 /4 4 5 1 2 3 /4 4 5 1 2 2 /5 5 5 1 2 2 /6 6 6 6 6 6 /6 6 7 7 7 7 /3 . . . 3 . /2 . . . . . /. . . . . . /. . . . . . /4 . . . . . /. . 3 . . . /# # # + . . /+ + + . . . /# # + # . # /+ + # + # # /# # + + + + /# # + # # # /"],
10 | ['bkNoShade', "pzprv3/shimaguni/6/6/8/0 0 0 1 2 3 /4 4 5 1 2 3 /4 4 5 1 2 2 /5 5 5 1 2 2 /6 6 6 6 6 6 /6 6 7 7 7 7 /3 . . . 3 . /2 . . . . . /. . . . . . /. . . . . . /4 . . . . . /. . 3 . . . /# # # + . . /+ + + # . . /# # + # . # /+ + # + # # /# # + + + + /# # + # # # /"],
11 | [null, "pzprv3/shimaguni/6/6/8/0 0 0 1 2 3 /4 4 5 1 2 3 /4 4 5 1 2 2 /5 5 5 1 2 2 /6 6 6 6 6 6 /6 6 7 7 7 7 /3 . . . 3 . /2 . . . . . /. . . . . . /. . . . . . /4 . . . . . /. . 3 . . . /# # # + . # /+ + + # + + /# # + # + # /+ + # + # # /# # + + + + /# # + # # # /"]
12 | ],
13 | inputs : [
14 | /* 回答入力はnurikabeと同じなので省略 */
15 | { input:["editmode", "newboard,4,4"] },
16 | { input:["mouse,left, 0,2, 8,2", "mouse,left, 0,4, 8,4", "mouse,left, 0,6, 8,6", "mouse,left, 4,0, 4,8"],
17 | result:"pzprv3/shimaguni/4/4/8/0 0 1 1 /2 2 3 3 /4 4 5 5 /6 6 7 7 /. . . . /. . . . /. . . . /. . . . /. . . . /. . . . /. . . . /. . . . /" },
18 | { input:["cursor,0,0", "mouse,leftx2, 3,1", "mouse,leftx3, 3,3", "mouse,leftx4, 1,5", "mouse,leftx5, 1,7",
19 | "cursor,0,0", "mouse,rightx2, 7,1", "mouse,rightx3, 7,3", "mouse,rightx4, 5,5", "mouse,rightx5, 5,7"],
20 | result:"pzprv3/shimaguni/4/4/8/0 0 1 1 /2 2 3 3 /4 4 5 5 /6 6 7 7 /- . 2 . /1 . 1 . /2 . - . /. . . . /. . . . /. . . . /. . . . /. . . . /" }
21 | ]
22 | });
23 |
--------------------------------------------------------------------------------
/test/script/test_shugaku.js:
--------------------------------------------------------------------------------
1 | /* test_shugaku.js */
2 |
3 | ui.debug.addDebugData('shugaku', {
4 | url : '5/5/c5d462b',
5 | failcheck : [
6 | ['kitamakura', "pzprv3/shugaku/5/5/. . . . . /. . 5 . . /. . . . . /c 4 . 2 . /g . . . . /"],
7 | ['cs2x2', "pzprv3/shugaku/5/5/. . . . . /. . 5 # # /. a . # # /a 4 a 2 . /j d . . . /"],
8 | ['nmPillowGt', "pzprv3/shugaku/5/5/. - - - . /. - 5 - # /. a - # # /a 4 a 2 a /j d . a . /"],
9 | ['futonHalf', "pzprv3/shugaku/5/5/. . . . . /. . 5 . . /h a . . . /b 4 a 2 . /j d . . . /"],
10 | ['futonMidPos',"pzprv3/shugaku/5/5/. . . . . /. h 5 . . /h b h . . /b 4 b 2 . /j d # # # /"],
11 | ['csDivide', "pzprv3/shugaku/5/5/# # # # . /# h 5 . . /h b h . . /b 4 b 2 . /j d # # # /"],
12 | ['nmPillowLt', "pzprv3/shugaku/5/5/# # # # . /# h 5 # . /h b h # # /b 4 b 2 # /j d # # # /"],
13 | ['ceEmpty', "pzprv3/shugaku/5/5/# # # # # /# h . h # /h b h b # /b 4 b 2 # /j d # # # /"],
14 | [null, "pzprv3/shugaku/5/5/# # # # # /# h 5 h # /h b h b # /b 4 b 2 # /j d # # # /"]
15 | ],
16 | inputs : [
17 | /* 問題入力テスト */
18 | /* shakashakaと同じだけど、いちおう描画方法が異なるのでチェック */
19 | { input:["newboard,6,1", "editmode"] },
20 | { input:["cursor,1,1", "key,-", "key,right", "key,0", "key,right", "key,1", "key,right", "key,2", "key,right", "key,3", "key,right", "key,4" ],
21 | result:"pzprv3/shugaku/1/6/5 0 1 2 3 4 /" },
22 | { input:["cursor,1,1", "key,-", "key,right", "key,-", "key,right", "key,-", "key,-" ],
23 | result:"pzprv3/shugaku/1/6/. 5 . 2 3 4 /" },
24 | { input:["newboard,7,2"] },
25 | { input:["cursor,0,0", "mouse,leftx2, 1,1", "mouse,leftx3, 3,1", "mouse,leftx4, 5,1", "mouse,leftx5, 7,1", "mouse,leftx6, 9,1", "mouse,leftx7, 11,1", "mouse,leftx8, 13,1",
26 | "cursor,0,0", "mouse,rightx2, 1,3", "mouse,rightx3, 3,3", "mouse,rightx4, 5,3", "mouse,rightx5, 7,3", "mouse,rightx6, 9,3", "mouse,rightx7, 11,3", "mouse,rightx8, 13,3"],
27 | result:"pzprv3/shugaku/2/7/5 0 1 2 3 4 . /4 3 2 1 0 5 . /" },
28 | /* 回答入力テスト */
29 | { input:["newboard,3,3", "playmode"] },
30 | { input:["mouse,left, 3,3, 3,1, 5,3, 3,5, 1,3"],
31 | result:"pzprv3/shugaku/3/3/. . . /j d . /. . . /" },
32 | { input:["mouse,left, 3,3"],
33 | result:"pzprv3/shugaku/3/3/. . . /f a . /. . . /" },
34 | { input:["ansclear", "mouse,left, 1,1, 3,1", "mouse,left, 5,1, 5,3", "mouse,left, 5,5, 3,5", "mouse,left, 1,5, 1,3"],
35 | result:"pzprv3/shugaku/3/3/e i c /h . g /b j d /" },
36 | { input:["mouse,right, 1,1, 1,5, 3,5"],
37 | result:"pzprv3/shugaku/3/3/# f c /# . g /# # a /" },
38 | { input:["mouse,right, 1,1, 1,5"],
39 | result:"pzprv3/shugaku/3/3/- f c /- . g /- # a /" },
40 | { input:["mouse,right, 1,3, 5,3"],
41 | result:"pzprv3/shugaku/3/3/- f a /. . . /- # a /" },
42 | { input:["mouse,right, 3,3, 3,1, 5,1"],
43 | result:"pzprv3/shugaku/3/3/- # # /. # . /- # a /" }
44 | ]
45 | });
46 |
--------------------------------------------------------------------------------
/test/script/test_shwolf.js:
--------------------------------------------------------------------------------
1 | /* test_shwolf.js */
2 |
3 | ui.debug.addDebugData('shwolf', {
4 | url : '5/5/0282bocb6ajf9',
5 | failcheck : [
6 | ['bdBranch', "pzprv3/shwolf/5/5/1 . 2 2 2 /. 1 1 . 1 /. 2 . 2 . /1 . 1 2 . /1 1 2 . 1 /. . . . . . /. 1 . . 1 . /. . . . . . /. . . . . . /. 1 . . 1 . /. . . . . . /0 0 0 0 /1 0 0 0 /1 0 0 0 /1 0 0 0 /0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /1 1 1 1 0 /"],
7 | ['bdCrossBP', "pzprv3/shwolf/5/5/1 . 2 2 2 /. 1 1 . 1 /. 2 . 2 . /1 . 1 2 . /1 1 2 . 1 /. . . . . . /. 1 . . 1 . /. . . . . . /. . . . . . /. 1 . . 1 . /. . . . . . /0 0 0 0 /1 0 0 0 /1 0 0 0 /1 0 0 0 /1 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /1 1 1 1 0 /"],
8 | ['bdCurveExBP', "pzprv3/shwolf/5/5/1 . 2 2 2 /. 1 1 . 1 /. 2 . 2 . /1 . 1 2 . /1 1 2 . 1 /. . . . . . /. 1 . . 1 . /. . . . . . /. . . . . . /. 1 . . 1 . /. . . . . . /0 0 0 0 /1 0 0 0 /1 0 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 1 1 1 1 /0 0 0 0 0 /"],
9 | ['bdNotChassis',"pzprv3/shwolf/5/5/1 . 2 2 2 /. 1 1 . 1 /. 2 . 2 . /1 . 1 2 . /1 1 2 . 1 /. . . . . . /. 1 . . 1 . /. . . . . . /. . . . . . /. 1 . . 1 . /. . . . . . /0 0 0 0 /1 0 0 0 /1 0 0 0 /1 0 0 0 /0 0 0 0 /0 1 1 1 0 /0 0 0 0 0 /0 0 0 0 0 /0 1 1 1 0 /"],
10 | ['bkNoNum', "pzprv3/shwolf/5/5/1 . 2 2 2 /. 1 1 . 1 /. 2 . 2 . /1 . 1 2 . /1 1 2 . 1 /. . . . . . /. 1 . . 1 . /. . . . . . /. . . . . . /. 1 . . 1 . /. . . . . . /0 0 1 0 /1 0 1 1 /1 0 1 1 /1 0 1 1 /1 0 1 1 /0 1 1 1 0 /1 1 1 1 1 /0 0 0 0 0 /0 0 0 0 0 /"],
11 | ['bkPlNum', "pzprv3/shwolf/5/5/1 . 2 2 2 /. 1 1 . 1 /. 2 . 2 . /1 . 1 2 . /1 1 2 . 1 /. . . . . . /. 1 . . 1 . /. . . . . . /. . . . . . /. 1 . . 1 . /. . . . . . /0 0 1 0 /1 0 1 0 /1 0 1 0 /1 0 1 0 /1 0 1 1 /0 1 1 1 0 /1 1 1 1 1 /0 0 0 0 0 /0 0 0 0 0 /"],
12 | ['bdDeadEnd', "pzprv3/shwolf/5/5/1 . 2 2 2 /. 1 1 . 1 /. . . 2 . /1 . 1 2 . /1 1 2 . 1 /. . . . . . /. 1 . . 1 . /. . . . . . /. . . . . . /. 1 . . 1 . /. . . . . . /0 1 1 0 /0 1 1 0 /0 1 1 0 /0 1 1 0 /0 1 1 0 /0 1 1 1 1 /1 1 1 1 1 /0 0 0 0 0 /0 1 1 1 1 /"],
13 | [null, "pzprv3/shwolf/5/5/1 . 2 2 2 /. 1 1 . 1 /. 2 . 2 . /1 . 1 2 . /1 1 2 . 1 /. . . . . . /. 1 . . 1 . /. . . . . . /. . . . . . /. 1 . . 1 . /. . . . . . /0 1 1 0 /1 1 1 0 /1 1 1 -1 /1 1 1 -1 /-1 1 1 -1 /0 1 1 1 1 /1 1 1 1 1 /-1 0 -1 -1 -1 /-1 1 1 1 1 /"]
14 | ],
15 | inputs : [
16 | /* 問題入力, 回答入力はkrammanと同じなので省略 */
17 | ]
18 | });
19 |
--------------------------------------------------------------------------------
/test/script/test_slalom.js:
--------------------------------------------------------------------------------
1 | /* test_slalom.js */
2 |
3 | ui.debug.addDebugData('slalom', {
4 | // url : 'p/6/6/9314131314131a1131ag44j11/33',
5 | url : 'd/6/6/9314131314131a1131ag0404j0101/33',
6 | failcheck : [
7 | ['lnOnShade',"pzprv3/slalom/6/6/. . . . . . /w # . # w4 # /w # . # w # /. . . . . . /. # # w1 # . /. . . o . . /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 /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 /0 1 0 0 0 0 /"],
8 | ['lnCross', "pzprv3/slalom/6/6/. . . . . . /w # . # w4 # /w # . . w # /. . . . . . /. # # w1 # . /. . . o . . /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 1 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 0 1 0 0 /0 0 0 1 0 0 /"],
9 | ['lnBranch', "pzprv3/slalom/6/6/. . . . . . /w # . # w4 # /w # . . w # /. . . . . . /. # # w1 # . /. . . o . . /0 0 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 /0 0 0 0 0 0 /0 0 0 1 0 0 /0 0 0 1 0 0 /0 0 0 1 0 0 /"],
10 | ['gateRedup',"pzprv3/slalom/6/6/. . . . . . /w # . # w4 # /w w w # w # /. . . . . . /. # # w1 # . /. . . o . . /1 1 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 /1 0 1 0 0 0 /1 0 1 0 0 0 /1 0 1 0 0 0 /0 0 0 0 0 0 /0 0 0 0 0 0 /"],
11 | ['stLineNe2',"pzprv3.1/slalom/6/6/. . . . . . /- # . 4 - 4 /- # . # - # /. . . . . . /. # 1 - 1 . /. . . o . . /1 1 1 1 0 /0 0 0 0 0 /0 0 0 0 0 /1 1 1 0 1 /0 0 0 0 0 /-1 -1 -1 1 1 /1 0 -1 0 1 0 /1 0 -1 0 1 0 /1 0 -1 0 1 0 /-1 0 0 0 0 1 /-1 0 0 0 0 1 /"],
12 | ['lrOrder', "pzprv3/slalom/6/6/. . . . . . /w # . # w4 # /w # . # w # /. . . . . . /. # # w1 # . /. . . o . . /1 1 1 1 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 1 0 /0 0 0 0 0 /1 1 1 0 0 /1 0 0 0 1 0 /1 0 0 0 1 0 /1 0 0 0 1 0 /1 0 0 1 0 0 /1 0 0 1 0 0 /"],
13 | ['lnDeadEnd',"pzprv3/slalom/6/6/. . . . . . /w # . # w4 # /w # . # w # /. . . . . . /. # # w1 # . /. . . o . . /1 1 1 1 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /1 1 1 0 0 /1 0 0 0 1 0 /1 0 0 0 1 0 /1 0 0 0 1 0 /0 0 0 1 0 0 /0 0 0 1 0 0 /"],
14 | ['lnPlLoop', "pzprv3/slalom/6/6/. . . . . . /w # . # w4 # /w # . # w # /. . . . . . /. # # w1 # . /. . . o . . /1 1 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /1 1 0 1 1 /0 0 0 0 0 /0 0 0 1 1 /1 0 1 0 0 0 /1 0 1 0 0 0 /1 0 1 0 0 0 /0 0 0 1 0 1 /0 0 0 1 0 1 /"],
15 | ['gateUnpass',"pzprv3/slalom/6/6/. . . . . . /w # . # w4 # /w # . # w # /. . . . . . /. # # w1 # . /. . . o . . /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /1 1 1 1 1 /0 0 0 0 0 /1 1 1 1 1 /0 0 0 0 0 0 /0 0 0 0 0 0 /0 0 0 0 0 0 /1 0 0 0 0 1 /1 0 0 0 0 1 /"],
16 | [null, "pzprv3.1/slalom/6/6/. . . . . . /- # . 4 - 4 /- # . # - # /. . . . . . /. # 1 - 1 . /. . . o . . /1 1 1 1 0 /0 0 0 0 0 /0 0 0 0 0 /1 1 1 0 1 /0 0 0 0 0 /-1 -1 -1 1 1 /1 0 -1 0 1 0 /1 0 -1 0 1 0 /1 0 -1 0 1 0 /-1 0 0 1 0 1 /-1 0 0 1 0 1 /"]
17 | ]
18 | });
19 |
--------------------------------------------------------------------------------
/test/script/test_stostone.js:
--------------------------------------------------------------------------------
1 | /* test_stostone.js */
2 |
3 | ui.debug.addDebugData('stostone', {
4 | url : '6/6/433aaqv064p03g433h',
5 | failcheck : [
6 | ['cbShade', "pzprv3/stostone/6/6/7/0 0 0 1 1 1 /2 2 2 2 3 1 /2 2 2 2 3 1 /4 4 2 2 3 3 /4 4 5 5 3 3 /6 4 5 5 3 3 /3 . . . . . /4 . . . 3 . /. . . . . . /3 . . . . . /. . . . . . /. . . . . . /# . . . . . /# . . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /"],
7 | ['bkShadeDivide',"pzprv3/stostone/6/6/7/0 0 0 1 1 1 /2 2 2 2 3 1 /2 2 2 2 3 1 /4 4 2 2 3 3 /4 4 5 5 3 3 /6 4 5 5 3 3 /3 . . . . . /4 . . . 3 . /. . . . . . /3 . . . . . /. . . . . . /. . . . . . /# . # . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /"],
8 | ['csUpper', "pzprv3/stostone/6/6/7/0 0 0 1 1 1 /2 2 2 2 3 1 /2 2 2 2 3 1 /4 4 2 2 3 3 /4 4 5 5 3 3 /6 4 5 5 3 3 /3 . . . . . /4 . . . 3 . /. . . . . . /3 . . . . . /. . . . . . /. . . . . . /# # # + . . /+ + + . . . /. . # . . . /# . # . . . /+ . . . . . /# + # . . . /"],
9 | ['bkShadeNe', "pzprv3/stostone/6/6/7/0 0 0 1 1 1 /2 2 2 2 3 1 /2 2 2 2 3 1 /4 4 2 2 3 3 /4 4 5 5 3 3 /6 4 5 5 3 3 /3 . . . . . /4 . . . 3 . /. . . . . . /3 . . . . . /. . . . . . /. . . . . . /# # # + . . /+ + + . . . /+ + # # . . /# # + . . . /+ # + . . . /# + . . . . /"],
10 | ['cuLower', "pzprv3/stostone/6/6/7/0 0 0 1 1 1 /2 2 2 2 3 1 /2 2 2 2 3 1 /4 4 2 2 3 3 /4 4 5 5 3 3 /6 4 5 5 3 3 /3 . . . . . /4 . . . 3 . /. . . . . . /3 . . . . . /. . . . . . /. . . . . . /# # # + . . /+ + + # . . /+ + # # . . /# # + # . . /+ # + . # . /# + . . # # /"],
11 | ['bkNoShade', "pzprv3/stostone/6/6/8/0 0 0 1 1 1 /2 2 2 2 3 1 /2 2 2 2 3 1 /4 4 2 2 3 3 /4 4 5 6 3 3 /7 4 5 6 3 3 /3 . . . . . /4 . . . 3 . /. . . . . . /3 . . . . . /. . . . . . /. . . . . . /# # # + # # /+ + + # . # /+ + # # . . /# # + # . . /+ # + + # . /# + # + # # /"],
12 | [null, "pzprv3/stostone/6/6/7/0 0 0 1 1 1 /2 2 2 2 3 1 /2 2 2 2 3 1 /4 4 2 2 3 3 /4 4 5 5 3 3 /6 4 5 5 3 3 /3 . . . . . /4 . . . 3 . /. . . . . . /3 . . . . . /. . . . . . /. . . . . . /# # # + # # /+ + + # . # /+ + # # . . /# # + # . . /+ # + + # . /# + # + # # /"]
13 | ],
14 | inputs : [
15 | /* 問題・回答入力はshimaguniと同じなので省略 */
16 | ]
17 | });
18 |
--------------------------------------------------------------------------------
/test/script/test_sudoku.js:
--------------------------------------------------------------------------------
1 | /* test_sudoku.js */
2 |
3 | ui.debug.addDebugData('sudoku', {
4 | url : '4/4/g1k23k3g',
5 | failcheck : [
6 | ['bkDupNum',"pzprv3/sudoku/4/. 1 . . /. . . 2 /3 . . . /. . 3 . /. . . . /1 . . . /. . . . /. . . . /"],
7 | ['nmDupRow',"pzprv3/sudoku/4/. 1 . . /. . . 2 /3 . . . /. . 3 . /. . . . /. . . . /. . . . /. 1 . . /"],
8 | ['ceNoNum', "pzprv3/sudoku/4/. 1 . . /. . . 2 /3 . . . /. . 3 . /2 . . . /. . . . /. 4 2 . /1 2 . . /"],
9 | [null, "pzprv3/sudoku/4/. 1 . . /. . . 2 /3 . . . /. . 3 . /2 . 4 3 /4 3 1 . /. 4 2 1 /1 2 . 4 /"]
10 | ],
11 | inputs : [
12 | /* 問題入力はhitoriと同じなので省略 */
13 | /* 回答入力はminarismと同じなので省略 */
14 | ]
15 | });
16 |
--------------------------------------------------------------------------------
/test/script/test_sukoro.js:
--------------------------------------------------------------------------------
1 | /* test_sukoro.js */
2 |
3 | ui.debug.addDebugData('sukoro', {
4 | url : '5/5/2a2c4a2g2a4c2a2',
5 | failcheck : [
6 | ['brNoValidNum',"pzprv3/sukoro/5/5"],
7 | ['nmAdjacent',"pzprv3/sukoro/5/5/2 . 2 . . /. 4 . 2 . /. . . . . /. 2 . 4 . /. . 2 . 2 /. 3 . . . /3 . 3 . . /2 3 . . . /. . 3 . . /. 2 . . . /"],
8 | ['nmNumberNe',"pzprv3/sukoro/5/5/2 . 2 . . /. 4 . 2 . /. . . . . /. 2 . 4 . /. . 2 . 2 /. 3 . . . /3 . 3 . . /2 3 . . . /. . 3 . . /. . . . . /"],
9 | ['nmDivide', "pzprv3/sukoro/5/5/. . 1 . . /. 1 . . . /. . . . . /. 2 . . . /. . 2 . . /1 3 . . . /. . . . . /. . 1 . . /. . 4 1 . /1 3 . . . /"],
10 | [null, "pzprv3/sukoro/5/5/2 . 2 . . /. 4 . 2 . /. . . . . /. 2 . 4 . /. . 2 . 2 /. 3 . - - /3 . 3 . - /2 3 - 3 2 /- . 3 . 3 /. - . 3 . /"]
11 | ],
12 | inputs : [
13 | /* 問題入力テスト */
14 | { input:["newboard,5,1", "playmode", "cursor,5,1", "key,1", "editmode"] },
15 | { input:["cursor,1,1", "key,0", "key,right", "key,1", "key,right", "key,2", "key,right", "key,3", "key,right", "key,1,0" ],
16 | result:"pzprv3/sukoro/1/5/. 1 2 3 1 /. . . . . /" },
17 | { input:["cursor,3,1", "key,-", "key,right,-,-", "key,right, " ],
18 | result:"pzprv3/sukoro/1/5/. - . . 1 /. . . . . /" },
19 | { input:["newboard,5,2", "editmode"] },
20 | { input:["cursor,0,0", "mouse,leftx2, 1,1", "mouse,leftx3, 3,1", "mouse,leftx4, 5,1", "mouse,leftx6, 7,1", "mouse,leftx7, 9,1",
21 | "mouse,rightx2, 1,3", "mouse,rightx3, 3,3", "mouse,rightx4, 5,3", "mouse,rightx6, 7,3", "mouse,rightx7, 9,3"],
22 | result:"pzprv3/sukoro/2/5/- 1 2 4 . /4 3 2 - . /. . . . . /. . . . . /" },
23 | /* 回答入力テスト */
24 | { input:["newboard,5,1", "editmode", "cursor,5,1", "key,-", "playmode"] },
25 | { input:["cursor,1,1", "key,0", "key,right", "key,1", "key,right", "key,2", "key,right", "key,3", "key,right", "key,1,0" ],
26 | result:"pzprv3/sukoro/1/5/. . - . . /. 1 . 3 1 /" },
27 | { input:["cursor,3,1", "key,-", "key,right,-,-", "key,right, " ],
28 | result:"pzprv3/sukoro/1/5/. . - . . /. . . . 1 /" },
29 | { input:["newboard,6,2", "playmode"] },
30 | { input:["cursor,0,0", "mouse,leftx2, 1,1", "mouse,leftx3, 3,1", "mouse,leftx5, 5,1", "mouse,leftx6, 7,1", "mouse,leftx7, 9,1", "mouse,leftx8, 11,1",
31 | "mouse,rightx2, 1,3", "mouse,rightx3, 3,3", "mouse,rightx4, 5,3", "mouse,rightx6, 7,3", "mouse,rightx7, 9,3", "mouse,rightx8, 11,3"],
32 | result:"pzprv3/sukoro/2/6/. . . . . . /. . . . . . /1 2 4 + - . /- + 4 2 1 . /" }
33 | ]
34 | });
35 |
--------------------------------------------------------------------------------
/test/script/test_sukororoom.js:
--------------------------------------------------------------------------------
1 | /* test_sukororoom.js */
2 |
3 | ui.debug.addDebugData('sukororoom', {
4 | url : '5/5/4vjbtnfpb3i2i3b',
5 | failcheck : [
6 | ['brNoValidNum',"pzprv3/sukororoom/5/5"],
7 | ['bkDupNum', "pzprv3/sukororoom/5/5/0 0 1 0 /0 1 1 1 /1 1 1 0 /0 1 1 0 /1 0 1 1 /1 1 1 0 1 /1 0 1 1 1 /0 1 1 1 1 /1 1 0 0 1 /. . 3 . . /. . . . . /. . 2 . . /. . . . . /. . 3 . . /3 . . . . /. . . . . /. . . . . /. . . . . /. . . . . /"],
8 | ['bkMixed', "pzprv3/sukororoom/5/5/0 0 1 0 /0 1 1 1 /1 1 1 0 /0 1 1 0 /1 0 1 1 /1 1 1 0 1 /1 0 1 1 1 /0 1 1 1 1 /1 1 0 0 1 /. . 3 . . /. . . . . /. . 2 . . /. . . . . /. . 3 . . /. . . . . /. . . . . /. . . . . /. . . . . /. . . . . /"],
9 | ['nmNumberNe',"pzprv3/sukororoom/5/5/0 0 1 0 /0 1 1 1 /1 1 1 0 /0 1 1 0 /1 0 1 1 /1 1 1 0 1 /1 0 1 1 1 /0 1 1 1 1 /1 1 0 0 1 /. . 3 . . /. . . . . /. . 2 . . /. . . . . /. . 3 . . /1 4 . . . /. . . . . /. . . . . /. . + . . /. + . . . /"],
10 | ['nmDivide', "pzprv3/sukororoom/5/5/0 0 1 0 /0 1 1 1 /1 1 1 0 /0 1 1 0 /1 0 1 1 /1 1 1 0 1 /1 0 1 1 1 /0 1 1 1 1 /1 1 0 0 1 /. . 3 . . /. . . . . /. . . . . /. . . . . /. . 3 . . /1 2 . + + /- - + + . /. - . . . /. . + + + /. + . + . /"],
11 | ['ceSuspend', "pzprv3/sukororoom/5/5/0 0 1 0 /0 1 1 1 /1 1 1 0 /0 1 1 0 /1 0 1 1 /1 1 1 0 1 /1 0 1 1 1 /0 1 1 1 1 /1 1 0 0 1 /. . 3 . . /. . . . . /. . 2 . . /. . . . . /. . 3 . . /1 2 . + + /- - + + . /. - . . . /. . + + + /. + . + . /"],
12 | [null, "pzprv3/sukororoom/5/5/0 0 1 0 /0 1 1 1 /1 1 1 0 /0 1 1 0 /1 0 1 1 /1 1 1 0 1 /1 0 1 1 1 /0 1 1 1 1 /1 1 0 0 1 /. . 3 . . /. . . . . /. . 2 . . /. . . . . /. . 3 . . /1 2 . 3 1 /- - 3 2 - /1 - . - - /2 3 4 3 1 /- 2 . 2 - /"]
13 | ],
14 | inputs : [
15 | /* 問題入力はsukoro, heyawakeと同じなので省略 */
16 | /* 回答入力はsukoroと同じなので省略 */
17 | ]
18 | });
19 |
--------------------------------------------------------------------------------
/test/script/test_tasquare.js:
--------------------------------------------------------------------------------
1 | /* test_tasquare.js */
2 |
3 | ui.debug.addDebugData('tasquare', {
4 | url : '6/6/1g.i4j1i3j5i5j.i2g1',
5 | failcheck : [
6 | ['brNoShade', "pzprv3/tasquare/6/6"],
7 | ['csNotSquare', "pzprv3/tasquare/6/6/1 # - . . . /4 # # . . 1 /. . . 3 . . /. . 5 . . . /5 . . . . - /. . . 2 . 1 /"],
8 | ['cuDivide', "pzprv3/tasquare/6/6/1 . - # . . /4 . # . . 1 /. # . 3 . . /# . 5 . . . /5 . . . . - /. . . 2 . 1 /"],
9 | ['nmSumSizeNe', "pzprv3/tasquare/6/6/1 # - . . . /4 . . . . 1 /# # . 3 . . /# # 5 . . . /5 . . . . - /. . . 2 . 1 /"],
10 | ['nmNoSideShade', "pzprv3/tasquare/6/6/1 # - . . # /4 . . # . 1 /# # . 3 # . /# # 5 # . . /5 . . . . - /# . # 2 # 1 /"],
11 | [null, "pzprv3/tasquare/6/6/1 # - + + # /4 + + # + 1 /# # + 3 # + /# # 5 # + # /5 . + + + - /# . # 2 # 1 /"]
12 | ],
13 | inputs : [] /* nurikabeと同じなので省略 */
14 | });
15 |
--------------------------------------------------------------------------------
/test/script/test_tatamibari.js:
--------------------------------------------------------------------------------
1 | /* test_tatamibari.js */
2 |
3 | ui.debug.addDebugData('tatamibari', {
4 | url : '5/5/m3g11i2g31h13g3g',
5 | failcheck : [
6 | ['bdCross', "pzprv3/tatamibari/5/5/. . . . . /. . c . a /a . . . b /. c a . . /a c . c . /0 0 0 0 /0 0 0 0 /0 0 0 0 /1 1 0 0 /1 1 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 1 0 0 0 /1 1 0 0 0 /"],
7 | ['bkNoNum', "pzprv3/tatamibari/5/5/. . . . . /. . c . a /a . . . b /. c a . . /a c . c . /1 1 0 0 /1 1 0 0 /1 1 0 0 /1 1 0 0 /1 1 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 1 0 0 0 /0 1 0 0 0 /"],
8 | ['bkNotSquare',"pzprv3/tatamibari/5/5/. . . . . /. . c . a /a . . . b /. c a . . /a c . c . /1 0 0 1 /1 0 0 1 /0 0 0 0 /1 1 0 0 /1 1 0 0 /0 0 0 0 0 /0 1 1 1 0 /0 1 0 0 0 /0 1 0 0 0 /"],
9 | ['bkNotHRect', "pzprv3/tatamibari/5/5/. . . . . /. . c . a /a . . . b /. c a . . /a c . c . /0 0 0 0 /0 0 0 0 /0 0 0 1 /1 1 0 1 /1 1 0 1 /0 0 0 0 0 /0 0 0 0 1 /0 1 0 0 0 /0 1 0 0 0 /"],
10 | ['bkNotVRect', "pzprv3/tatamibari/5/5/. . . . . /. . c . a /a . . . b /. c a . . /a c . c . /0 0 1 0 /0 0 1 0 /0 0 0 0 /1 1 0 0 /1 1 0 0 /0 0 0 0 0 /0 0 0 1 1 /0 1 0 0 0 /0 1 0 0 0 /"],
11 | ['bkNumGe2', "pzprv3/tatamibari/5/5/. . . . . /. . c . a /a . . . b /. c a . . /a c . c . /0 0 0 0 /0 0 0 0 /0 0 0 0 /1 1 0 0 /1 1 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 1 0 0 0 /0 1 0 0 0 /"],
12 | ['bkNotRect', "pzprv3/tatamibari/5/5/. . . . . /. . c . a /a . . . b /. c a . . /a c . c . /0 1 0 1 /0 1 0 1 /0 1 1 0 /1 1 1 1 /1 1 1 0 /0 0 0 0 0 /0 0 1 1 1 /1 1 0 1 0 /0 1 0 0 1 /"],
13 | ['bdDeadEnd', "pzprv3/tatamibari/5/5/. . . . . /. . c . a /a . . . b /. c a . . /a c . c . /0 1 0 1 /0 1 0 1 /0 1 1 0 /1 1 1 1 /1 1 1 0 /0 0 0 0 0 /0 0 1 1 1 /1 1 0 1 1 /0 1 0 0 0 /"],
14 | [null, "pzprv3/tatamibari/5/5/. . . . . /. . c . a /a . . . b /. c a . . /a c . c . /-1 1 0 1 /0 1 0 1 /-1 1 1 0 /1 1 1 0 /1 1 1 0 /-1 -1 0 0 0 /-1 -1 1 1 1 /1 1 -1 1 1 /0 1 -1 0 0 /"]
15 | ],
16 | inputs : [
17 | /* 問題入力テスト */
18 | { input:["newboard,4,2", "editmode"] },
19 | { input:["cursor,1,1", "key,q", "key,right", "key,w", "key,right", "key,e", "key,right", "key,q,r",
20 | "cursor,1,3", "key,1", "key,right", "key,2", "key,right", "key,3", "key,right", "key,1,4" ],
21 | result:"pzprv3/tatamibari/2/4/c a b . /c a b . /0 0 0 /0 0 0 /0 0 0 0 /" },
22 | { input:["newboard,5,2", "editmode"] },
23 | { input:["cursor,0,0", "mouse,leftx2, 1,1", "mouse,leftx3, 3,1", "mouse,leftx4, 5,1", "mouse,leftx5, 7,1", "mouse,leftx6, 9,1",
24 | "cursor,0,0", "mouse,rightx2, 1,3", "mouse,rightx3, 3,3", "mouse,rightx4, 5,3", "mouse,rightx5, 7,3", "mouse,rightx6, 9,3"],
25 | result:"pzprv3/tatamibari/2/5/- c a b . /b a c - . /0 0 0 0 /0 0 0 0 /0 0 0 0 0 /" }
26 | /* 回答入力はshikakuと同じなので省略 */
27 | ]
28 | });
29 |
--------------------------------------------------------------------------------
/test/script/test_tateyoko.js:
--------------------------------------------------------------------------------
1 | /* test_tateyoko.js */
2 |
3 | ui.debug.addDebugData('tateyoko', {
4 | url : '5/5/i23i3ono2i25i22pnqi33i2',
5 | failcheck : [
6 | ['nmConnBarGt',"pzprv3/tateyoko/5/5/. . 3 . . /. e . e 2 /. . 5 . . /2 a . b . /. . 3 . . /0 0 0 0 0 /2 . 2 . 2 /0 0 0 0 0 /0 . 0 . 0 /0 0 0 0 0 /"],
7 | ['baPlNum', "pzprv3/tateyoko/5/5/. . 3 . . /. e . e 2 /. . 5 . . /2 a . b . /. . 3 . . /0 0 1 0 0 /0 . 1 . 0 /0 0 1 0 0 /0 . 1 . 0 /0 0 1 0 0 /"],
8 | ['bkSizeNe', "pzprv3/tateyoko/5/5/. . 3 . . /. e . e 2 /. . 5 . . /2 a . b . /. . 3 . . /0 0 0 0 0 /0 . 0 . 0 /0 2 2 2 2 /0 . 0 . 0 /0 0 0 0 0 /"],
9 | ['nmConnBarLt',"pzprv3/tateyoko/5/5/. . 3 . . /. e . e 2 /. . 5 . . /2 a . b . /. . 3 . . /0 0 0 0 0 /0 . 0 . 0 /2 2 2 2 2 /0 . 0 . 0 /0 0 0 0 0 /"],
10 | ['ceNoBar', "pzprv3/tateyoko/5/5/. . 3 . . /. e . e 2 /. . 5 . . /2 a . b . /. . 3 . . /1 2 2 2 1 /1 . 1 . 1 /2 2 2 2 2 /1 . 2 . 2 /1 2 2 2 0 /"],
11 | [null, "pzprv3/tateyoko/5/5/. . 3 . . /. e . e 2 /. . 5 . . /2 a . b . /. . 3 . . /1 2 2 2 1 /1 . 1 . 1 /2 2 2 2 2 /1 . 2 . 2 /1 2 2 2 1 /"]
12 | ],
13 | inputs : [
14 | /* 問題入力テスト */
15 | /* 背景数字入力はhitoriと同じ */
16 | { input:["newboard,5,1", "editmode"] },
17 | { input:["cursor,1,1", "key,q,0", "key,right,q,1", "key,right,2,q", "key,right,5,q"],
18 | result:"pzprv3/tateyoko/1/5/e a b f . /. . . . 0 /" },
19 | { input:["cursor,1,1", "key,q", "key,right,-", "key,right,-,-", "key,right, "],
20 | result:"pzprv3/tateyoko/1/5/0 f f f . /0 . . . 0 /" },
21 | { input:["newboard,5,2", "editmode"] },
22 | { input:["cursor,1,1", "key,q,right,q,right,q,right,q,right,q",
23 | "cursor,1,3", "key,q,right,q,right,q,right,q,right,q"] },
24 | { input:["cursor,0,0", "mouse,leftx2, 1,1", "mouse,leftx3, 3,1", "mouse,leftx6, 5,1", "mouse,leftx7, 7,1", "mouse,leftx8, 9,1",
25 | "cursor,0,0", "mouse,rightx2, 1,3", "mouse,rightx3, 3,3", "mouse,rightx6, 5,3", "mouse,rightx7, 7,3", "mouse,rightx8, 9,3"],
26 | result:"pzprv3/tateyoko/2/5/f e c d f /d c e f f /. . . . . /. . . . . /" },
27 | /* 回答入力テスト */
28 | { input:["newboard,5,2", "playmode"] },
29 | { input:["anslear", "mouse,left, 1,1, 3,1, 3,3, 5,3"],
30 | result:"pzprv3/tateyoko/2/5/. . . . . /. . . . . /2 2 0 0 0 /0 1 2 0 0 /" },
31 | { input:["mouse,right, 2,1, 4,3"],
32 | result:"pzprv3/tateyoko/2/5/. . . . . /. . . . . /2 1 0 0 0 /0 1 2 0 0 /" },
33 | { input:["mouse,left, 3,1, 3,2", "mouse,left, 2,3, 4,3"],
34 | result:"pzprv3/tateyoko/2/5/. . . . . /. . . . . /2 0 0 0 0 /0 2 2 0 0 /" },
35 | { input:["mouse,left, 1,1, 3,1, 3,3, 5,3"],
36 | result:"pzprv3/tateyoko/2/5/. . . . . /. . . . . /0 0 0 0 0 /0 0 0 0 0 /" },
37 | { input:["newboard,5,1", "editmode", "cursor,5,1", "key,q", "playmode"] },
38 | { input:["mouse,left, 1,1, 9,1"],
39 | result:"pzprv3/tateyoko/1/5/. . f . . /2 2 . 2 2 /" }
40 | ]
41 | });
42 |
--------------------------------------------------------------------------------
/test/script/test_tentaisho.js:
--------------------------------------------------------------------------------
1 | /* test_tentaisho.js */
2 |
3 | ui.debug.addDebugData('tentaisho', {
4 | url : '5/5/67eh94fi65en8dbf',
5 | failcheck : [
6 | ['bdPassStar',"pzprv3/tentaisho/5/5/1...2...1/........./2....1..2/........./.1...2..1/........./......1../..2....../2.....2../1 0 0 0 /1 0 0 0 /1 0 0 0 /1 0 0 0 /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 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /"],
7 | ['bkNoStar', "pzprv3/tentaisho/5/5/1...2...1/........./2....1..2/........./.1...2..1/........./......1../..2....../2.....2../1 1 0 0 /1 1 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 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 0 0 0 0 /0 0 0 0 0 /"],
8 | ['bkNotSymSt',"pzprv3/tentaisho/5/5/1...2...1/........./2....1..2/........./.1...2..1/........./......1../..2....../2.....2../1 0 0 0 /1 1 0 0 /0 1 0 0 /0 0 0 0 /0 0 0 0 /1 1 0 0 0 /1 0 0 0 0 /1 1 0 0 0 /0 0 0 0 0 /1 0 0 0 0 /2 1 0 0 0 /1 1 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /"],
9 | ['bkPlStar', "pzprv3/tentaisho/5/5/1...2...1/........./2....1..2/........./.1...2..1/........./......1../..2....../2.....2../1 0 0 0 /1 1 0 0 /0 1 0 0 /1 1 0 0 /1 1 0 0 /1 1 0 0 0 /1 0 0 0 0 /0 1 0 0 0 /1 0 0 0 0 /1 0 0 0 0 /2 1 0 0 0 /1 1 0 0 0 /1 2 0 0 0 /2 2 0 0 0 /"],
10 | [null, "pzprv3/tentaisho/5/5/1...2...1/........./2....1..2/........./.1...2..1/........./......1../..2....../2.....2../1 0 0 1 /1 1 0 1 /0 1 0 1 /1 1 0 0 /1 1 0 0 /1 1 1 1 1 /1 0 1 1 1 /0 1 1 1 1 /1 0 1 1 1 /1 2 2 2 1 /2 1 1 1 2 /1 1 2 2 1 /1 2 1 1 1 /2 2 2 2 2 /"]
11 | ],
12 | inputs : [
13 | /* 問題入力テスト */
14 | { input:["newboard,5,1", "editmode"] },
15 | { input:["mouse,right, 1,1, 7,1" ],
16 | result:"pzprv3/tentaisho/1/5/........./0 0 0 0 /3 3 3 3 0 /" },
17 | { input:["mouse,right, 1,1, 5,1" ],
18 | result:"pzprv3/tentaisho/1/5/........./0 0 0 0 /0 0 0 3 0 /" },
19 | { input:["newboard,2,2", "editmode"] },
20 | { input:["cursor,1,1", "key,1", "key,right,2", "key,right,3", "cursor,1,2", "key,2", "key,right,1" ],
21 | result:"pzprv3/tentaisho/2/2/12./21./.../0 /0 /0 0 /0 0 /0 0 /" },
22 | { input:["cursor,1,2", "key,3", "key,right, " ],
23 | result:"pzprv3/tentaisho/2/2/12./.../.../0 /0 /0 0 /0 0 /0 0 /" },
24 | { input:["newboard,2,2", "editmode"] },
25 | { input:["cursor,0,0", "mouse,left, 1,2", "mouse,leftx2, 2,2", "mouse,leftx3, 3,2" ],
26 | result:"pzprv3/tentaisho/2/2/.../12./.../0 /0 /0 0 /0 0 /0 0 /" }
27 | /* 回答入力はpaintareaと同じなので省略 */
28 | ]
29 | });
30 |
--------------------------------------------------------------------------------
/test/script/test_tilepaint.js:
--------------------------------------------------------------------------------
1 | /* test_tilepaint.js */
2 |
3 | ui.debug.addDebugData('tilepaint', {
4 | url : '6/6/mfttf5ovqrrvzv234232243331',
5 | failcheck : [
6 | ['brNoShade',"pzprv3/tilepaint/6/6"],
7 | ['bkMixed', "pzprv3/tilepaint/6/6/19/0 1 1 2 3 3 /4 4 1 2 3 5 /6 7 1 8 8 9 /6 10 1 11 11 9 /12 12 13 14 11 15 /16 16 16 17 17 18 /0 2 3 4 2 3 2 /2 . . . . . . /4 . . . . . . /3 . . . . . . /3 . . . . . . /3 . . . . . . /1 . . . . . . /. # # . . . /. . # . . . /. . + . . . /. . + . . . /. . . . . . /. . . . . . /"],
8 | ['asShadeNe',"pzprv3/tilepaint/6/6/20/0 1 1 2 3 3 /4 4 1 2 3 5 /6 7 8 9 9 10 /6 11 8 12 12 10 /13 13 14 15 12 16 /17 17 17 18 18 19 /0 2 3 4 2 3 2 /2 . . . . . . /4 . . . . . . /3 . . . . . . /3 . . . . . . /3 . . . . . . /1 . . . . . . /. # # . . . /. . # . . . /. . + . . . /. . + . . . /. . . . . . /. . . . . . /"],
9 | [null, "pzprv3/tilepaint/6/6/20/0 1 1 2 3 3 /4 4 1 2 3 5 /6 7 8 9 9 10 /6 11 8 12 12 10 /13 13 14 15 12 16 /17 17 17 18 18 19 /0 2 3 4 2 3 2 /2 . . . . . . /4 . . . . . . /3 . . . . . . /3 . . . . . . /3 . . . . . . /1 . . . . . . /+ # # + + + /# # # + + # /+ + # # # + /+ + # # # + /# # + + # + /+ + + + + # /"]
10 | ],
11 | inputs : [
12 | /* 回答入力はpaintareaと同じなので省略 */
13 | { input:["editmode", "newboard,5,2"] },
14 | { input:["cursor,1,-1", "key,-", "key,right", "key,0", "key,right", "key,1", "key,right", "key,2", "key,right", "key,1", "key,0" ],
15 | result:"pzprv3/tilepaint/2/5/1/0 0 0 0 0 /0 0 0 0 0 /0 0 0 1 2 0 /0 . . . . . /0 . . . . . /. . . . . /. . . . . /" },
16 | { input:["cursor,1,-1", "key,-", "key,right", "key,-", "key,right", "key,-", "key,-" ],
17 | result:"pzprv3/tilepaint/2/5/1/0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 2 0 /0 . . . . . /0 . . . . . /. . . . . /. . . . . /" },
18 | { input:["newboard,2,2"] },
19 | { input:["cursor,0,0", "mouse,leftx2, 1,1", "key,1", "mouse,left, 1,1", "key,0", "mouse,left, 1,1"],
20 | result:"pzprv3/tilepaint/2/2/1/. 0 /0 0 /0 0 0 /0 1,0 . /0 . . /. . /. . /" },
21 | { input:["newboard,2,2"] },
22 | { input:["cursor,1,1", "key,q,0,shift,1,shift"],
23 | result:"pzprv3/tilepaint/2/2/1/. 0 /0 0 /0 0 0 /0 0,1 . /0 . . /. . /. . /" }
24 | ]
25 | });
26 |
--------------------------------------------------------------------------------
/test/script/test_toichika.js:
--------------------------------------------------------------------------------
1 | /* test_toichika.js */
2 |
3 | ui.debug.addDebugData('toichika', {
4 | url : '4/4/n70kt84j',
5 | failcheck : [
6 | ['bkNumGe2', "pzprv3/toichika/4/4/6/0 1 1 2 /3 1 2 2 /3 3 4 5 /3 4 4 4 /4 . . . /. . . . /. . . . /. . . . /. . . . /2 . . . /. . . . /4 . . . /"],
7 | ['arAdjPair',"pzprv3/toichika/4/4/6/0 1 1 2 /3 1 2 2 /3 3 4 5 /3 4 4 4 /4 . . . /. . . . /. . . . /. . . . /. + 3 . /. + . . /. . . . /. . . . /"],
8 | ['arAlone', "pzprv3/toichika/4/4/6/0 1 1 2 /3 1 2 2 /3 3 4 5 /3 4 4 4 /4 . . . /. . . . /. . . . /. . . . /. + + 3 /. 2 + + /. . . . /. . . . /"],
9 | ['bkNoNum', "pzprv3/toichika/4/4/6/0 1 1 2 /3 1 2 2 /3 3 4 5 /3 4 4 4 /4 . . . /. . . . /. . . . /. . . . /. + + 3 /. 2 + + /. + . . /. 1 . . /"],
10 | [null, "pzprv3/toichika/4/4/6/0 1 1 2 /3 1 2 2 /3 3 4 5 /3 4 4 4 /4 . . . /. . . . /. . . . /. . . . /. + + 3 /+ 2 + + /4 + + 3 /+ 1 + + /"]
11 | ],
12 | inputs : [
13 | /* 問題入力はromaと同じなので省略 */
14 | /* 回答入力テスト */
15 | /* 矢印の入力はromaと同じ */
16 | { input:["newboard,5,2", "playmode"] },
17 | { input:["cursor,1,1", "key,1", "key,right,2", "key,right,3", "key,right,4"] },
18 | { input:["cursor,0,0", "mouse,right, 1,1, 3,1", "mouse,right, 1,3, 5,3", "mouse,right, 3,3, 7,3, 7,1"],
19 | result:"pzprv3/toichika/2/5/1/0 0 0 0 0 /0 0 0 0 0 /. . . . . /. . . . . /+ + 2 . . /+ . . . . /" }
20 | ]
21 | });
22 |
--------------------------------------------------------------------------------
/test/script/test_triplace.js:
--------------------------------------------------------------------------------
1 | /* test_triplace.js */
2 |
3 | ui.debug.addDebugData('triplace', {
4 | url : '5/5/%2m_m%1m_.0.1....11',
5 | failcheck : [
6 | ['bkSizeLt3', "pzprv3/triplace/5/5/0 -1 0 -1 1 -1 /-1 -1,2 . . . . /-1 . . . -1,-1 . /-1 . . . . . /1 . -1,1 . . . /1 . . . . -1,-1 /0 0 0 0 /1 0 0 0 /1 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 /0 0 0 0 0 /. . . . . /. . . . . /. . . . . /. . . . . /. . . . . /"],
7 | ['asLblockNe',"pzprv3/triplace/5/5/0 -1 0 -1 1 -1 /-1 -1,2 . . . . /-1 . . . -1,-1 . /-1 . . . . . /1 . -1,1 . . . /1 . . . . -1,-1 /0 0 0 0 /1 0 0 0 /1 0 0 0 /0 0 0 0 /-1 -1 1 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 1 0 /1 0 1 -1 0 /. - . . . /+ - . . . /+ - . . . /+ . . - . /+ + + - . /"],
8 | ['bkSizeGt3', "pzprv3/triplace/5/5/0 -1 0 -1 1 -1 /-1 -1,2 . . . . /-1 . . . -1,-1 . /-1 . . . . . /1 . -1,1 . . . /1 . . . . -1,-1 /0 1 0 0 /1 0 0 0 /1 0 0 0 /0 0 0 0 /-1 -1 1 0 /0 0 1 0 1 /0 0 0 0 0 /0 0 0 1 0 /1 0 1 -1 0 /. - . . . /+ - . . . /+ - . . . /+ . . - . /+ + + - . /"],
9 | [null, "pzprv3/triplace/5/5/0 -1 0 -1 1 -1 /-1 -1,2 . . . . /-1 . . . -1,-1 . /-1 . . . . . /1 . -1,1 . . . /1 . . . . -1,-1 /0 1 0 0 /1 0 0 0 /1 0 1 0 /0 0 1 0 /-1 -1 1 0 /0 0 1 0 1 /0 1 1 0 0 /0 0 -1 1 1 /1 0 1 -1 0 /. - + + + /+ - - . . /+ - - . . /+ . - - - /+ + + - . /"]
10 | ],
11 | inputs : [
12 | /* 問題入力はtilepaintと同じなので省略 */
13 | /* 回答入力はsashigane, kaeroでカバーしているので省略 */
14 | ]
15 | });
16 |
--------------------------------------------------------------------------------
/test/script/test_usotatami.js:
--------------------------------------------------------------------------------
1 | /* test_usotatami.js */
2 |
3 | ui.debug.addDebugData('usotatami', {
4 | url : '5/5/1a13a2d1a1a3a121b3b2',
5 | failcheck : [
6 | ['bdCross', "pzprv3/usotatami/5/5/1 . 1 3 . /2 . . . . /1 . 1 . 3 /. 1 2 1 . /. 3 . . 2 /1 0 0 0 /1 0 0 0 /1 0 0 0 /1 0 0 0 /1 0 0 0 /1 1 1 1 1 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /"],
7 | ['bkNoNum', "pzprv3/usotatami/5/5/1 . 1 3 . /2 . . . . /1 . 1 . 3 /. 1 2 1 . /. 3 . . 2 /0 0 0 0 /1 0 0 0 /1 0 0 0 /1 0 0 0 /1 0 0 0 /1 1 1 1 1 /0 1 1 1 1 /0 0 0 0 0 /0 0 0 0 0 /"],
8 | ['bkNumGe2', "pzprv3/usotatami/5/5/1 . 1 3 . /2 . . . . /1 . 1 . 3 /. 1 2 1 . /. 3 . . 2 /0 0 0 0 /1 0 0 0 /1 0 0 0 /1 0 0 0 /1 0 0 0 /1 1 1 1 1 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /"],
9 | ['bkSizeEq', "pzprv3/usotatami/5/5/1 . 1 3 . /2 . . . . /1 . 1 . 3 /. 1 2 1 . /. 3 . . 2 /0 1 1 1 /1 1 1 1 /1 1 0 1 /1 1 1 1 /0 0 1 1 /1 1 0 0 0 /1 0 1 1 0 /0 0 1 1 0 /1 1 1 0 1 /"],
10 | ['bdDeadEnd', "pzprv3/usotatami/5/5/1 . 1 3 . /2 . . . . /1 . 1 . 3 /. 1 2 1 . /. 3 . . 2 /0 1 1 0 /1 1 1 0 /1 1 0 1 /1 1 1 1 /1 0 1 1 /1 1 0 0 1 /1 0 1 1 1 /0 0 1 1 0 /0 1 1 0 1 /"],
11 | ['bkWidthGt1',"pzprv3/usotatami/5/5/1 . 1 3 . /2 . . . . /1 . 1 . 3 /. 1 2 1 . /. 3 . . 2 /0 1 1 0 /1 1 1 0 /1 1 0 1 /1 1 1 1 /1 0 1 1 /1 1 0 0 0 /1 0 1 1 1 /0 0 1 1 0 /0 1 1 0 1 /"],
12 | [null, "pzprv3/usotatami/5/5/1 . 1 3 . /2 . . . . /1 . 1 . 3 /. 1 2 1 . /. 3 . . 2 /-1 1 1 1 /1 1 1 1 /1 1 0 1 /1 1 1 1 /1 0 1 1 /1 1 0 0 -1 /1 -1 1 1 -1 /0 -1 1 1 -1 /0 1 1 0 1 /"]
13 | ],
14 | inputs : [
15 | /* 問題入力, 回答入力はshikaku等と同じなので省略 */
16 | ]
17 | });
18 |
--------------------------------------------------------------------------------
/test/script/test_view.js:
--------------------------------------------------------------------------------
1 | /* test_view.js */
2 |
3 | ui.debug.addDebugData('view', {
4 | url : '5/5/m401g3g2g101m',
5 | failcheck : [
6 | ['brNoValidNum',"pzprv3/view/5/5"],
7 | ['nmAdjacent', "pzprv3/view/5/5/. . . . . /. . 4 0 1 /. 3 . 2 . /1 0 1 . . /. . . . . /- - - . . /- - . . . /. . - . . /. . . . . /. 0 . . . /"],
8 | ['nmSumViewNe',"pzprv3/view/5/5/. . . . . /. . 4 0 1 /. 3 . 2 . /1 0 1 . . /. . . . . /- - - . + /- - . . . /+ . - . - /. . . + + /- + + . . /"],
9 | ['nmDivide', "pzprv3/view/5/5/. . . . . /. . 4 0 1 /. 3 . 4 . /1 0 2 . . /. . . . . /- - - + + /- - . . . /+ . - . - /. . . . + /- + + . . /"],
10 | ['ceSuspend', "pzprv3/view/5/5/. . . . . /. . 4 0 1 /. 3 . 2 . /1 0 1 . . /. . . . . /- - - + + /- - . . . /2 . - . - /. . . 0 + /- + + + . /"],
11 | [null, "pzprv3/view/5/5/. . . . . /. . 4 0 1 /. 3 . 2 . /1 0 1 . . /. . . . . /- - - 3 0 /- - . . . /2 . - . - /. . . 0 2 /- 1 0 1 . /"]
12 | ],
13 | inputs : [
14 | /* 問題入力, 回答入力はsukoroとほぼ同じなので省略 */
15 | ]
16 | });
17 |
--------------------------------------------------------------------------------
/test/script/test_wagiri.js:
--------------------------------------------------------------------------------
1 | /* test_wagiri.js */
2 |
3 | ui.debug.addDebugData('wagiri', {
4 | url : '4/4/lebcacja1d2b1d1a',
5 | failcheck : [
6 | ['slLoopGiri', "pzprv3/wagiri/4/4/. . . . . /. 4 . . 1 /. . 2 . . /0 . . 2 . /. . . . . /. 1 . . /. . 2 . /. 1 . . /. . 1 . /1 2 1 . /2 1 2 . /. . . . /. . . . /"],
7 | ['crConnSlNe', "pzprv3/wagiri/4/4/. . . . . /. 4 . . 1 /. . 2 . . /0 . . 2 . /. . . . . /. 1 . . /. . 2 . /. 1 . . /. . 1 . /1 2 1 1 /2 1 1 2 /. . . . /. . . . /"],
8 | ['slNotLoopWa',"pzprv3/wagiri/4/4/. . . . . /. 4 . . 1 /. . 2 . . /0 . . 2 . /. . . . . /. 1 . . /. . 2 . /. 1 . . /. . 1 . /1 2 1 1 /2 1 1 1 /1 2 2 . /2 1 2 1 /"],
9 | ['ceNoSlash', "pzprv3/wagiri/4/4/. . . . . /. 4 . . 1 /. . 2 . . /0 . . 2 . /. . . . . /. 1 . . /. . 2 . /. 1 . . /. . 1 . /1 2 1 1 /2 1 1 1 /1 2 2 2 /. 1 2 2 /"],
10 | [null, "pzprv3/wagiri/4/4/. . . . . /. 4 . . 1 /. . 2 . . /0 . . 2 . /. . . . . /. 1 . . /. . 2 . /. 1 . . /. . 1 . /1 2 1 1 /2 1 1 1 /1 2 2 2 /2 1 2 2 /"]
11 | ],
12 | inputs : [
13 | /* 問題入力テスト(輪切のみ) */
14 | { input:["newboard,4,2", "editmode", "cursor,0,0"] },
15 | { input:["mouse,leftx2, 1,1", "mouse,leftx3, 3,1", "mouse,leftx4, 5,1", "mouse,leftx5, 7,1",
16 | "mouse,rightx2, 1,3", "mouse,rightx3, 3,3", "mouse,rightx4, 5,3", "mouse,rightx5, 7,3"],
17 | result:"pzprv3/wagiri/2/4/. . . . . /. . . . . /. . . . . /1 2 - . /- 2 1 . /. . . . /. . . . /" }
18 | /* 回答入力はgokigenでやっているので省略 */
19 | ]
20 | });
21 |
--------------------------------------------------------------------------------
/test/script/test_walllogic.js:
--------------------------------------------------------------------------------
1 | /* test_walllogic.js */
2 |
3 | ui.debug.addDebugData('walllogic', {
4 | url : '5/5/h1k2g2i5g5k4h',
5 | failcheck : [
6 | ['brNoLine', "pzprv3/walllogic/5/5/. . 1 . . /. . . 2 . /2 . . . 5 /. 5 . . . /. . 4 . . /. . . . . /. . . . . /. . . . . /. . . . . /. . . . . /"],
7 | ['nmConnWallGt',"pzprv3/walllogic/5/5/. . 1 . . /. . . 2 . /2 . . . 5 /. 5 . . . /. . 4 . . /. . . . . /3 3 3 . . /. . . . . /. . . . . /. . . . . /"],
8 | ['nmConnWallLt',"pzprv3/walllogic/5/5/. . 1 . . /. . . 2 . /2 . . . 5 /. 5 . . . /. . 4 . . /. . . . . /. . 3 . . /. . . . . /. . . . . /. . . . . /"],
9 | ['nmConnNoWall',"pzprv3/walllogic/5/5/. . 1 . . /. . . 2 . /2 . . . 5 /. 5 . . . /. . 4 . . /. . . . . /. 3 3 . . /. . . . . /. . . . . /. . . . . /"],
10 | ['lbIsolate', "pzprv3/walllogic/5/5/. . 1 . . /. . . 2 . /2 . . . 5 /. 5 . . . /. . 3 . . /1 3 . 1 1 /1 1 3 . 1 /. 1 3 3 . /3 . 4 4 2 /1 3 . 4 4 /"],
11 | [null, "pzprv3/walllogic/5/5/. . 1 . . /. . . 2 . /2 . . . 5 /. 5 . . . /. . 4 . . /1 3 . 1 1 /1 1 3 . 1 /. 1 3 3 . /3 . 4 4 2 /3 3 . 4 4 /"]
12 | ],
13 | inputs : [
14 | /* 問題入力テスト */
15 | /* 回答入力テスト */
16 | { input:["newboard,3,3", "playmode"] },
17 | { input:["anslear", "mouse,left, 1,1, 3,1, 3,3, 5,3"],
18 | result:"pzprv3/walllogic/3/3/. . . /. . . /. . . /4 4 . /. 2 4 /. . . /"},
19 | { input:["anslear", "mouse,left, 5,3, 3,3, 3,1, 1,1"],
20 | result:"pzprv3/walllogic/3/3/. . . /. . . /. . . /3 1 . /. 3 3 /. . . /"},
21 | { input:["anslear", "mouse,left, 2,3, 1,3, 1,1, 5,1"],
22 | result:"pzprv3/walllogic/3/3/. . . /. . . /. . . /3 1 4 /3 3 3 /. . . /"},
23 | { input:["anslear", "mouse,left, 2,3, 1,3, 1,1, 5,1"],
24 | result:"pzprv3/walllogic/3/3/. . . /. . . /. . . /. . . /. 3 3 /. . . /"}
25 | ]
26 | });
27 |
--------------------------------------------------------------------------------
/test/script/test_wblink.js:
--------------------------------------------------------------------------------
1 | /* test_wblink.js */
2 |
3 | ui.debug.addDebugData('wblink', {
4 | url : '5/5/ci6a2ln1i',
5 | failcheck : [
6 | ['brNoLine', "pzprv3/wblink/5/5"],
7 | ['lnCross', "pzprv3/wblink/5/5/1 1 . 2 . /. . 2 . 1 /. 1 . . 2 /2 1 . 2 1 /2 . . 1 2 /0 0 0 0 /0 0 0 0 /0 1 1 1 /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 0 0 /"],
8 | ['lcTripleNum',"pzprv3/wblink/5/5/1 1 . 2 . /. . 2 . 1 /. 1 . . 2 /2 1 . 2 1 /2 . . 1 2 /0 0 0 0 /0 0 0 0 /0 0 0 0 /1 1 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 /"],
9 | ['lcInvWhite', "pzprv3/wblink/5/5/1 1 . 2 . /. . 2 . 1 /. 1 . . 2 /2 1 . 2 1 /2 . . 1 2 /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 0 0 0 0 /0 0 0 0 0 /"],
10 | ['lcInvBlack', "pzprv3/wblink/5/5/1 1 . 2 . /. . 2 . 1 /. 1 . . 2 /2 1 . 2 1 /2 . . 1 2 /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 0 0 /"],
11 | ['nmNoLine', "pzprv3/wblink/5/5/1 1 . 2 . /. . 2 . 1 /. 1 . . 2 /2 1 . 2 1 /2 . . 1 2 /-1 1 1 0 /0 0 1 1 /0 0 0 0 /0 1 1 0 /1 1 1 0 /1 -1 0 0 0 /1 -1 0 0 0 /1 -1 0 0 0 /0 0 0 0 0 /"],
12 | [null, "pzprv3/wblink/5/5/1 1 . 2 . /. . 2 . 1 /. 1 . . 2 /2 1 . 2 1 /2 . . 1 2 /-1 1 1 0 /0 0 1 1 /0 1 1 1 /0 1 1 0 /1 1 1 0 /1 -1 0 0 0 /1 -1 0 0 0 /1 -1 0 0 0 /0 0 0 -1 1 /"]
13 | ],
14 | inputs : [
15 | /* 問題入力はmashuと同じなので省略 */
16 | /* 回答入力テスト */
17 | { input:["newboard,4,4", "editmode"] },
18 | { input:["cursor,1,1", "key,1", "cursor,1,7", "key,1", "cursor,3,3", "key,2", "cursor,3,7", "key,2", "cursor,7,1", "key,1", "cursor,7,5", "key,1", "playmode"] },
19 | { input:["mouse,left, 1,1, 1,3", "mouse,left, 7,1, 5,1", "mouse,left, 5,5, 7,5", "mouse,left, 3,7, 3,5"],
20 | result:"pzprv3/wblink/4/4/1 . . 1 /. 2 . . /. . . 1 /1 2 . . /1 1 1 /0 0 0 /0 0 0 /0 0 0 /1 0 0 0 /1 1 0 0 /1 1 0 0 /"},
21 | { input:["mouse,right, 1,2, 2,1, 6,1"],
22 | result:"pzprv3/wblink/4/4/1 . . 1 /. 2 . . /. . . 1 /1 2 . . /-1 -1 -1 /0 0 0 /0 0 0 /0 0 0 /-1 0 0 0 /0 1 0 0 /0 1 0 0 /"},
23 | { input:["mouse,left, 3,1, 5,1"],
24 | result:"pzprv3/wblink/4/4/1 . . 1 /. 2 . . /. . . 1 /1 2 . . /1 1 1 /0 0 0 /0 0 0 /0 0 0 /-1 0 0 0 /0 1 0 0 /0 1 0 0 /"}
25 | ]
26 | });
27 |
--------------------------------------------------------------------------------
/test/script/test_yajikazu.js:
--------------------------------------------------------------------------------
1 | /* test_yajikazu.js */
2 |
3 | ui.debug.addDebugData('yajikazu', {
4 | url : '6/6/40d23663i32h12b32a12a11c',
5 | failcheck : [
6 | ['brNoShade', "pzprv3/yajikazu/6/6"],
7 | ['csAdjacent',"pzprv3/yajikazu/6/6/4,0 . . . . 2,3 /1,99 . . . . . /. . . . 3,2 . /. . . . . . /. 1,2 . . 3,2 . /1,2 . 1,1 . . . /+ + . . . . /# + . . . . /# . . . . . /. . . . . . /. . . . . . /. . . . . . /"],
8 | ['cuDivideRB',"pzprv3/yajikazu/6/6/4,0 . . . . 2,3 /1,99 . . . . . /. . . . 3,2 . /. . . . . . /. 1,2 . . 3,2 . /1,2 . 1,1 . . . /+ + + + + + /# + . . + # /+ # . . + + /. . # . + # /. . . # + + /. . # . + # /"],
9 | ['anShadeNe', "pzprv3/yajikazu/6/6/4,0 . . . . 2,3 /1,99 . . . . . /. . . . 3,2 . /. . . . . . /. 1,2 . . 3,2 . /1,2 . 1,1 . . . /+ + + + + + /# + . + + # /+ # . # + + /+ + . . + # /. + . . + + /. . . . + # /"],
10 | [null, "pzprv3/yajikazu/6/6/4,0 . . . . 2,3 /1,99 . . . . . /. . . . 3,2 . /. . . . . . /. 1,2 . . 3,2 . /1,2 . 1,1 . . . /+ + + + + + /# + # + + # /+ # + # + + /+ + + . + # /+ # + # + + /# + + . + # /"]
11 | ],
12 | inputs : [
13 | /* 回答はhitoriと同じなので省略 */
14 | /* 問題入力テスト */
15 | { input:["editmode", "newboard,5,1"] },
16 | { input:["cursor,1,1", "key,-,shift+up", "key,right", "key,0,shift+down", "key,right", "key,1,shift+left", "key,right", "key,2,shift+right", "key,right", "key,1,0" ],
17 | result:"pzprv3/yajikazu/1/5/1,- 2,0 3,1 4,2 0,10 /. . . . . /" },
18 | { input:["cursor,1,1", "key,-", "key,right", "key,-", "key,right", "key,-,-", "key,right", "key,shift+right" ],
19 | result:"pzprv3/yajikazu/1/5/. 2,- . 0,2 0,10 /. . . . . /" },
20 | { input:["newboard,6,1"] },
21 | { input:["cursor,0,0",
22 | "mouse,leftx2, 1,1", "mouse,left, 1,1, 1,-1",
23 | "mouse,leftx3, 3,1", "mouse,left, 3,1, 3,3",
24 | "mouse,leftx4, 5,1", "mouse,left, 5,1, 3,1",
25 | "mouse,leftx5, 7,1", "mouse,left, 7,1, 9,1",
26 | "mouse,leftx6, 9,1", "mouse,rightx2, 11,1"],
27 | result:"pzprv3/yajikazu/1/6/1,- 2,0 3,1 4,2 0,3 0,999 /. . . . . . /" }
28 | ]
29 | });
30 |
--------------------------------------------------------------------------------
/test/script/test_yajirin.js:
--------------------------------------------------------------------------------
1 | /* test_yajirin.js */
2 |
3 | ui.debug.addDebugData('yajirin', {
4 | url : '5/5/m32j10',
5 | failcheck : [
6 | ['lnBranch', "pzprv3/yajirin/5/5/. . . . . /. . . . . /. . . 3,2 . /. . . . . /. . . . 1,0 /. . . . . /. . . . . /. . . . . /. . . . . /. . . . . /1 1 1 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 0 0 0 0 /"],
7 | ['lnCross', "pzprv3/yajirin/5/5/. . . . . /. . . . . /. . . 3,2 . /. . . . . /. . . . 1,0 /. . . . . /. . . . . /. . . . . /. . . . . /. . . . . /0 0 1 0 /1 1 0 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /0 1 1 0 0 /0 1 0 0 0 /0 1 0 0 0 /0 0 0 0 0 /"],
8 | ['lnOnShade', "pzprv3/yajirin/5/5/. . . . . /. . . . . /. . . 3,2 . /. . . . . /. . . . 1,0 /. . . # . /. . . . . /# . # . . /. . . . . /. . . . . /1 1 0 1 /1 0 1 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /1 0 1 1 0 /0 1 0 0 0 /0 1 0 0 0 /0 0 0 0 0 /"],
9 | ['csAdjacent',"pzprv3/yajirin/5/5/. . . . . /. . . . . /. . . 3,2 . /. . . . . /. . . . 1,0 /. . . . . /. . . . . /# . # . . /. . # . . /. . . . . /1 1 0 1 /1 0 1 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /1 0 1 1 0 /0 1 0 0 0 /0 1 0 0 0 /0 0 0 0 0 /"],
10 | ['anShadeNe', "pzprv3/yajirin/5/5/. . . . . /. . . . . /. . . 3,2 . /. . . . . /. . . . 1,0 /. . . . . /. . . . + /# . . . + /. . + . + /. . . # . /1 1 -1 1 /1 -1 1 -1 /0 0 0 -1 /1 -1 1 1 /1 1 0 0 /1 -1 1 1 1 /0 1 0 0 1 /0 1 0 0 1 /1 -1 1 0 0 /"],
11 | ['lnDeadEnd', "pzprv3/yajirin/5/5/. . . . . /. . . . . /. . . 3,2 . /. . . . . /. . . . 1,0 /. . . . . /. . . . + /# . # . + /. . + . + /. . . . . /1 1 0 1 /1 0 1 0 /0 0 0 0 /0 0 0 0 /0 0 0 0 /1 0 1 1 0 /0 1 0 0 0 /0 1 0 0 0 /0 0 0 0 0 /"],
12 | ['lnPlLoop', "pzprv3/yajirin/5/5/. . . . . /. . . . . /. . . 3,2 . /. . . . . /. . . . 1,0 /. . . . . /. . . . + /# . # . + /. . + . + /. . . . . /1 1 0 1 /1 1 0 1 /0 0 0 0 /0 0 1 0 /0 0 1 0 /1 0 1 1 1 /0 0 0 0 0 /0 0 0 0 0 /0 0 1 1 0 /"],
13 | ['ceEmpty', "pzprv3/yajirin/5/5/. . . . . /. . . . . /. . . 3,2 . /. . . . . /. . . . 1,0 /. . . . . /. . . . + /# . # . + /. . + . + /. . . . . /1 1 0 1 /1 0 1 0 /0 0 0 0 /0 1 0 1 /0 0 1 0 /1 0 1 1 1 /0 1 0 0 1 /0 1 0 0 1 /0 0 1 1 0 /"],
14 | [null, "pzprv3/yajirin/5/5/. . . . . /. . . . . /. . . 3,2 . /. . . . . /. . . . 1,0 /. . . . . /. . . . + /# . # . + /. . + . + /. . . # . /1 1 -1 1 /1 -1 1 -1 /0 0 0 -1 /1 -1 1 1 /1 1 0 0 /1 -1 1 1 1 /0 1 0 0 1 /0 1 0 0 1 /1 -1 1 0 0 /"]
15 | ],
16 | inputs : [
17 | /* 回答入力テスト */
18 | { input:["newboard,5,2", "playmode"] },
19 | { input:["mouse,left, 5,1", "mouse,left, 1,1, 9,1, 9,3, 1,3, 1,1"],
20 | result:"pzprv3/yajirin/2/5/. . . . . /. . . . . /. . # . . /. . . . . /1 0 0 1 /1 1 1 1 /1 0 0 0 1 /"},
21 | { input:["mouse,left, 1,3", "mouse,right, 3,1, 7,1"],
22 | result:"pzprv3/yajirin/2/5/. . . . . /. . . . . /. + + + . /# . . . . /1 0 0 1 /1 1 1 1 /1 0 0 0 1 /"}
23 | /* 問題入力はyajikazuと同じなので省略 */
24 | ]
25 | });
26 |
--------------------------------------------------------------------------------
/test/script/test_yajitatami.js:
--------------------------------------------------------------------------------
1 | /* test_yajitatami.js */
2 |
3 | ui.debug.addDebugData('yajitatami', {
4 | url : '5/5/b3233a2222p1233',
5 | failcheck : [
6 | ['bdCross', "pzprv3/yajitatami/5/5/. . 3,2 3,3 . /2,2 2,2 . . . /. . . . . /. . . . . /. . . 1,2 3,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 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /1 1 0 0 /1 1 0 0 /1 0 0 0 /0 0 0 0 /0 0 0 0 /-1 -1 0 0 0 /1 1 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /"],
7 | ['anNoAdjBd', "pzprv3/yajitatami/5/5/. . 3,2 3,3 . /2,2 2,2 . . . /. . . . . /. . . . . /. . . 1,2 3,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 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /1 1 0 0 /1 1 0 0 /-1 0 0 0 /0 0 0 0 /0 0 0 0 /-1 -1 0 0 0 /1 1 0 0 0 /1 1 0 0 0 /0 0 0 0 0 /"],
8 | ['bkSize1', "pzprv3/yajitatami/5/5/. . 3,2 3,3 . /2,2 2,2 . . . /. . . . . /. . . . . /. . . 1,2 3,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 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /1 1 1 0 /1 1 1 0 /-1 0 0 0 /1 1 1 0 /1 1 0 1 /-1 -1 -1 0 0 /1 1 1 0 0 /1 1 1 0 0 /-1 0 1 1 0 /"],
9 | ['anTatamiNe',"pzprv3/yajitatami/5/5/. . 3,2 3,3 . /2,2 2,2 . . . /. . . . . /. . . . . /. . . 1,2 3,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 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /1 1 1 0 /1 1 1 0 /-1 0 0 1 /1 1 0 1 /1 1 0 1 /-1 -1 -1 0 0 /1 1 1 0 1 /1 1 0 0 -1 /-1 0 1 1 -1 /"],
10 | ['bkSizeNe', "pzprv3/yajitatami/5/5/. . 3,2 3,3 . /2,2 2,2 . . . /. . . . . /. . . . . /. . . 1,2 3,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 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /1 1 1 0 /1 1 1 0 /-1 0 0 1 /1 1 0 1 /1 1 0 1 /-1 -1 -1 1 1 /1 1 1 0 1 /1 1 0 0 -1 /-1 0 1 1 -1 /"],
11 | ['bkWidthGt1',"pzprv3/yajitatami/5/5/. . 3,2 3,3 . /2,2 2,2 . . . /. . . . . /. . . . . /. . . 1,2 3,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 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /1 1 1 1 /1 1 1 1 /-1 0 1 1 /1 1 0 1 /1 1 0 1 /-1 -1 -1 -1 0 /1 1 1 -1 1 /1 1 0 1 -1 /-1 0 1 1 -1 /"],
12 | [null, "pzprv3/yajitatami/5/5/. . 3,2 3,3 . /2,2 2,2 . . . /. . . . . /. . . . . /. . . 1,2 3,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 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /1 1 1 1 /1 1 1 1 /-1 0 1 1 /1 1 0 1 /1 1 0 1 /-1 -1 -1 -1 0 /1 1 1 -1 1 /1 1 1 1 -1 /-1 0 1 1 -1 /"]
13 | ],
14 | inputs : [
15 | /* 問題入力はyajilin, heyawakeと同じなので省略 */
16 | /* 回答入力はshikakuと同じなので省略 */
17 | ]
18 | });
19 |
--------------------------------------------------------------------------------
/test/script/test_yinyang.js:
--------------------------------------------------------------------------------
1 | /* test_yinyang.js */
2 |
3 | ui.debug.addDebugData('yinyang', {
4 | url : '5/5/016612300',
5 | failcheck : [
6 | ['ms2x2', "pzprv3/yinyang/5/5/. . . . . /1 . 2 . . /2 . . . 1 /. . 2 . 1 /. . . . . /. . . . . /. 2 . . . /. 2 2 . . /. . . . . /. . . . . /"],
7 | ['mu2x2', "pzprv3/yinyang/5/5/. . . . . /1 . 2 . . /2 . . . 1 /. . 2 . 1 /. . . . . /1 1 1 1 1 /. 1 . . 1 /. . . . . /. . . . . /. . . . . /"],
8 | ['msDivide',"pzprv3/yinyang/5/5/. . . . . /1 . 2 . . /2 . . . 1 /. . 2 . 1 /. . . . . /1 1 1 1 1 /. . . . 1 /. . . . . /. . . . . /. . . . . /"],
9 | ['muDivide',"pzprv3/yinyang/5/5/. . . . . /1 . 2 . . /2 . . . 1 /. . 2 . 1 /. . . . . /1 1 1 1 1 /. 2 . 2 1 /. 2 1 1 . /1 2 . . . /. . . . . /"],
10 | ['ceNoNum', "pzprv3/yinyang/5/5/. . . . . /1 . 2 . . /2 . . . 1 /. . 2 . 1 /. . . . . /1 1 1 1 1 /. 2 . 2 1 /. 2 1 1 . /1 2 . . . /1 1 1 1 1 /"],
11 | [null, "pzprv3/yinyang/5/5/. . . . . /1 . 2 . . /2 . . . 1 /. . 2 . 1 /. . . . . /1 1 1 1 1 /. 2 . 2 1 /. 2 1 1 . /1 2 . 2 . /1 1 1 1 1 /"]
12 | ],
13 | inputs : [
14 | /* 問題入力テスト */
15 | { input:["newboard,5,1", "editmode"] },
16 | { input:["cursor,1,1", "key,-", "key,right", "key,0", "key,right", "key,1", "key,right", "key,2", "key,right", "key,1,0" ],
17 | result:"pzprv3/yinyang/1/5/. . 1 2 1 /. . . . . /"},
18 | { input:["cursor,1,1", "key,-", "key,right", "key,-", "key,right", "key,-", "key,-" ],
19 | result:"pzprv3/yinyang/1/5/. . . 2 1 /. . . . . /"},
20 | { input:["newboard,4,2", "editmode"] },
21 | { input:["cursor,0,0", "mouse,leftx2, 1,1", "mouse,leftx3, 3,1", "mouse,leftx4, 5,1", "mouse,leftx5, 7,1",
22 | "cursor,0,0", "mouse,rightx2, 1,3", "mouse,rightx3, 3,3", "mouse,rightx4, 5,3", "mouse,rightx5, 7,3"],
23 | result:"pzprv3/yinyang/2/4/1 2 . 1 /2 1 . 2 /. . . . /. . . . /"},
24 | { input:["mouse,left, 3,1, 5,1, 5,3"],
25 | result:"pzprv3/yinyang/2/4/1 2 2 1 /2 1 2 2 /. . . . /. . . . /" },
26 | /* 回答入力テスト */
27 | { input:["newboard,4,4", "editmode"] },
28 | { input:["cursor,1,1", "key,1", "cursor,7,7", "key,2" ] },
29 | { input:["playmode", "cursor,1,1", "key,1", "cursor,1,7", "key,1", "cursor,7,1", "key,2" ],
30 | result:"pzprv3/yinyang/4/4/1 . . . /. . . . /. . . . /. . . 2 /. . . 2 /. . . . /. . . . /1 . . . /"},
31 | { input:["mouse,left, 1,1, 1,3, 3,3", "mouse,left, 7,1, 7,3, 5,3", "mouse,left, 1,7, 3,7, 3,5", "mouse,left, 7,7, 5,7, 5,5"],
32 | result:"pzprv3/yinyang/4/4/1 . . . /. . . . /. . . . /. . . 2 /. . . 2 /1 1 2 2 /. 1 2 . /1 1 2 . /"},
33 | { input:["mouse,left, 3,1, 7,1, 7,3, 1,3, 1,7, 7,7"],
34 | result:"pzprv3/yinyang/4/4/1 . . . /. . . . /. . . . /. . . 2 /. . . . /. . . . /. 1 2 . /. . . . /"}
35 | ]
36 | });
37 |
--------------------------------------------------------------------------------
/test/variety/aho_test.js:
--------------------------------------------------------------------------------
1 | // test/variety/aho_test.js
2 |
3 | var assert = require('assert');
4 |
5 | var pzpr = require('../../');
6 |
7 | var puzzle = new pzpr.Puzzle();
8 |
9 | describe('Variety:aho',function(){
10 | it('Check area generating', function(){
11 | puzzle.open('aho/6/6');
12 |
13 | puzzle.setMode('edit');
14 | puzzle.cursor.init(1,1);
15 | puzzle.key.inputKeys('4','down','4');
16 | puzzle.cursor.init(9,1);
17 | puzzle.key.inputKeys('2','right','6');
18 | puzzle.cursor.init(7,5);
19 | puzzle.key.inputKeys('6','down','left','3');
20 | puzzle.cursor.init(1,11);
21 | puzzle.key.inputKeys('2','right','3');
22 | puzzle.cursor.init(11,9);
23 | puzzle.key.inputKeys('2','down','4');
24 |
25 | puzzle.setMode('play');
26 | puzzle.mouse.inputPath('right', 1,1, 7,1);
27 | puzzle.mouse.inputPath(0,2, 8,2, 8,0);
28 | puzzle.mouse.inputPath(10,0, 10,4, 8,4, 8,0);
29 | puzzle.mouse.inputPath('right', 11,1, 11,7, 9,7);
30 | puzzle.mouse.inputPath(8,8, 12,8, 12,10, 8,10, 8,8);
31 | puzzle.mouse.inputPath(4,12, 4,10, 12,10);
32 | puzzle.mouse.inputPath(0,8, 2,8, 2,12);
33 | puzzle.mouse.inputPath(2,8, 6,8, 6,10);
34 | puzzle.mouse.inputPath('right', 7,7, 7,9);
35 | puzzle.mouse.inputPath(8,6, 8,8, 8,4);
36 | puzzle.mouse.inputPath(4,6, 4,8);
37 | puzzle.mouse.inputPath(4,6, 8,6);
38 | puzzle.mouse.inputPath(0,4, 8,4);
39 |
40 | assert.equal(puzzle.board.roommgr.components.length, 10);
41 | assert.equal(puzzle.check().complete, true);
42 | });
43 | });
44 |
--------------------------------------------------------------------------------
/test/variety/amibo_test.js:
--------------------------------------------------------------------------------
1 | // test/variety/amibo_test.js
2 |
3 | var assert = require('assert');
4 |
5 | var pzpr = require('../../');
6 |
7 | var puzzle = new pzpr.Puzzle();
8 |
9 | describe('Variety:amibo',function(){
10 | it('Check area generating', function(){
11 | puzzle.open('amibo/5/5');
12 |
13 | puzzle.setMode('edit');
14 | puzzle.cursor.init(1,1);
15 | puzzle.key.inputKeys('2','down','down','3');
16 |
17 | puzzle.setMode('play');
18 | puzzle.mouse.inputPath(1,1, 6,1);
19 | puzzle.mouse.inputPath('right', 6,1);
20 | puzzle.mouse.inputPath(3,5, 7,5);
21 | puzzle.mouse.inputPath('right', 8,5);
22 |
23 | assert.equal(puzzle.board.bargraph.components.length, 2);
24 | assert.equal(puzzle.board.netgraph.components.length, 2);
25 |
26 | puzzle.setMode('edit');
27 | puzzle.cursor.init(9,1);
28 | puzzle.key.inputKeys('4');
29 |
30 | puzzle.setMode('play');
31 | puzzle.mouse.inputPath(9,1, 9,9);
32 |
33 | assert.equal(puzzle.board.bargraph.components.length, 3);
34 | assert.equal(puzzle.board.netgraph.components.length, 3);
35 |
36 | puzzle.setMode('edit');
37 | puzzle.mouse.inputPath(3,3);
38 | puzzle.mouse.inputPath(3,3);
39 | puzzle.mouse.inputPath(5,7);
40 | puzzle.mouse.inputPath(5,7);
41 | puzzle.mouse.inputPath(7,7);
42 | puzzle.key.inputKeys('3');
43 |
44 | puzzle.setMode('play');
45 | puzzle.mouse.inputPath('right', 6,7, 7,8, 8,7);
46 | puzzle.mouse.inputPath(7,7, 7,0);
47 |
48 | assert.equal(puzzle.board.bargraph.components.length, 4);
49 | assert.equal(puzzle.board.netgraph.components.length, 3);
50 |
51 | puzzle.mouse.inputPath(5,0, 5,4);
52 | puzzle.mouse.inputPath('right', 5,4);
53 | puzzle.mouse.inputPath(5,3, 7,3);
54 | puzzle.mouse.inputPath('right', 3,2, 2,3, 3,4, 3,6, 1,6, 1,4, 1,8);
55 | puzzle.mouse.inputPath('right', 5,6, 5,8);
56 |
57 | assert.equal(puzzle.board.bargraph.components.length, 6);
58 | assert.equal(puzzle.board.netgraph.components.length, 2);
59 |
60 | puzzle.mouse.inputPath(0,7, 4,7);
61 | puzzle.mouse.inputPath(3,7, 3,9);
62 |
63 | assert.equal(puzzle.board.bargraph.components.length, 8);
64 | assert.equal(puzzle.board.netgraph.components.length, 3);
65 |
66 | require('fs').writeFileSync('./amibo.svg', puzzle.toBuffer());
67 | require('fs').unlinkSync('./amibo.svg');
68 |
69 | puzzle.mouse.inputPath(2,9, 9,9);
70 |
71 | assert.equal(puzzle.board.bargraph.components.length, 9);
72 | assert.equal(puzzle.board.netgraph.components.length, 2);
73 |
74 | puzzle.mouse.inputPath(8.5,3, 9.5,3);
75 |
76 | assert.equal(puzzle.board.bargraph.components.length, 9);
77 | assert.equal(puzzle.board.netgraph.components.length, 1);
78 | assert.equal(puzzle.check().complete, true);
79 | });
80 | });
81 |
--------------------------------------------------------------------------------
/test/variety/ayeheya_test.js:
--------------------------------------------------------------------------------
1 | // test/variety/ayeheya_test.js
2 |
3 | var assert = require('assert');
4 |
5 | var pzpr = require('../../');
6 |
7 | var puzzle = new pzpr.Puzzle();
8 |
9 | describe('Variety:ayeheya',function(){
10 | it('Check area generating', function(){
11 | puzzle.open('ayeheya/6/6');
12 |
13 | puzzle.setMode('edit');
14 | puzzle.mouse.inputPath(4,0, 4,12);
15 | puzzle.mouse.inputPath(0,4, 12,4);
16 | puzzle.mouse.inputPath(10,0, 10,2, 12,2, 10,2, 10,4, 12,4);
17 | puzzle.mouse.inputPath(0,6, 4,6);
18 | puzzle.mouse.inputPath(4,8, 12,8, 8,8, 8,4);
19 | puzzle.mouse.inputPath(4,10, 12,10);
20 | puzzle.mouse.inputPath(6,10, 6,12);
21 | puzzle.cursor.init(7,5);
22 | puzzle.key.inputKeys('2');
23 |
24 | assert.equal(puzzle.board.roommgr.components.length, 11);
25 |
26 | puzzle.setMode('play');
27 | puzzle.mouse.inputPath('right', 1,5, 3,5);
28 | puzzle.mouse.inputPath('right', 7,1, 7,3);
29 | puzzle.mouse.inputPath('right', 1,9, 3,9);
30 | puzzle.mouse.inputPath('right', 7,9, 9,9);
31 | puzzle.mouse.inputPath('right', 1,3);
32 | puzzle.mouse.inputPath('right', 3,1);
33 | puzzle.mouse.inputPath(1,7);
34 | puzzle.mouse.inputPath(3,3, 3,1, 1,1);
35 | puzzle.mouse.inputPath('right', 5,1, 5,3, 9,3, 9,1);
36 | puzzle.mouse.inputPath(11,1);
37 | puzzle.mouse.inputPath('right', 11,3);
38 | puzzle.mouse.inputPath(7,5, 11,5, 11,7, 5,7);
39 | puzzle.mouse.inputPath('right', 3,7, 3,9, 11,9, 11,7, 11,9, 7,9, 7,7);
40 | puzzle.mouse.inputPath(3,11, 11,11);
41 |
42 | assert.equal(puzzle.check().complete, true);
43 | });
44 | });
45 |
--------------------------------------------------------------------------------
/test/variety/bag_test.js:
--------------------------------------------------------------------------------
1 | // test/variety/bag_test.js
2 |
3 | var assert = require('assert');
4 |
5 | var pzpr = require('../../');
6 |
7 | var puzzle = new pzpr.Puzzle();
8 |
9 | describe('Variety:bag',function(){
10 | it('Check area generating', function(){
11 | puzzle.open('bag/6/6');
12 |
13 | puzzle.setMode('edit');
14 | puzzle.cursor.init(3,1);
15 | puzzle.key.inputKeys('3','down','down','2');
16 | puzzle.key.inputKeys('right','right','right','3','left','down','1','1');
17 | puzzle.key.inputKeys('left','down','3');
18 | puzzle.cursor.init(1,11);
19 | puzzle.key.inputKeys('3','right','right','right','right','2');
20 |
21 | puzzle.setMode('play');
22 | puzzle.mouse.inputPath('right', 7,7, 7,1, 7,7, 1,7, 11,7, 7,7, 7,11);
23 | puzzle.mouse.inputPath('right', 3,5);
24 | puzzle.mouse.inputPath('right', 1,5);
25 | puzzle.mouse.inputPath('right', 1,5, 1,3, 5,3, 5,5);
26 | puzzle.mouse.inputPath(0,6, 0,8, 0,6, 2,6, 2,4, 4,4, 4,6, 6,6, 6,2);
27 |
28 | assert.equal(puzzle.board.linegraph.components.length, 1);
29 |
30 | puzzle.mouse.inputPath('right', 3,1, 7,1);
31 | puzzle.mouse.inputPath('right', 1,1);
32 | puzzle.mouse.inputPath('right', 1,1);
33 | puzzle.mouse.inputPath('right', 9,1);
34 | puzzle.mouse.inputPath('right', 9,1);
35 | puzzle.mouse.inputPath(6,2, 2,2, 2,0, 8,0, 8,2);
36 |
37 | assert.equal(puzzle.board.linegraph.components.length, 1);
38 |
39 | puzzle.mouse.inputPath('right', 9,5);
40 | puzzle.mouse.inputPath('right', 9,3);
41 | puzzle.mouse.inputPath('right', 9,3, 11,3, 11,5);
42 | puzzle.mouse.inputPath(8,2, 8,4, 10,4, 10,6, 12,6, 12,8);
43 |
44 | assert.equal(puzzle.board.linegraph.components.length, 1);
45 |
46 | puzzle.mouse.inputPath('right', 9,11);
47 | puzzle.mouse.inputPath('right', 9,9);
48 | puzzle.mouse.inputPath('right', 9,9, 11,9, 11,11);
49 | puzzle.mouse.inputPath(12,8, 8,8, 8,10, 10,10, 10,12, 6,12);
50 |
51 | assert.equal(puzzle.board.linegraph.components.length, 1);
52 |
53 | puzzle.mouse.inputPath('right', 5,9);
54 | puzzle.mouse.inputPath('right', 3,9);
55 | puzzle.mouse.inputPath('right', 3,9, 3,11, 5,11);
56 | puzzle.mouse.inputPath('right', 1,11, 1,7);
57 | puzzle.mouse.inputPath(0,8, 0,12, 2,12, 2,8, 4,8, 4,10, 6,10, 6,12);
58 |
59 | assert.equal(puzzle.board.linegraph.components.length, 1);
60 | assert.equal(puzzle.check().complete, true);
61 | });
62 | });
63 |
--------------------------------------------------------------------------------
/test/variety/gokigen_test.js:
--------------------------------------------------------------------------------
1 | // test/variety/gokigen_test.js
2 |
3 | var assert = require('assert');
4 |
5 | var pzpr = require('../../');
6 |
7 | var puzzle = new pzpr.Puzzle();
8 |
9 | describe('Variety:gokigen',function(){
10 | it('Check loop resolving', function(){
11 | puzzle.open('gokigen/3/3');
12 |
13 | puzzle.setMode('play');
14 | puzzle.mouse.inputPath('right', 1,3);
15 | puzzle.mouse.inputPath('left', 1,5);
16 | puzzle.mouse.inputPath('right', 3,5);
17 | puzzle.mouse.inputPath('left', 3,3);
18 | puzzle.mouse.inputPath('right', 5,1);
19 |
20 | assert.equal(puzzle.board.getc(1,3).isloop, true);
21 |
22 | puzzle.mouse.inputPath('right', 3,3);
23 |
24 | assert.equal(puzzle.board.getc(1,3).isloop, false);
25 | });
26 | });
27 |
--------------------------------------------------------------------------------
/test/variety/onsen_test.js:
--------------------------------------------------------------------------------
1 | // test/variety/onsen_test.js
2 |
3 | var assert = require('assert');
4 |
5 | var pzpr = require('../../');
6 |
7 | var puzzle = new pzpr.Puzzle();
8 |
9 | describe('Variety:onsen',function(){
10 | it('Check area generating', function(){
11 | puzzle.open('onsen/5/5');
12 |
13 | puzzle.setMode('edit');
14 | puzzle.mouse.inputPath(0,4, 4,4, 4,0);
15 |
16 | puzzle.setMode('play');
17 | puzzle.mouse.inputPath(5,1, 5,3, 7,3, 7,1);
18 |
19 | assert.equal(puzzle.board.lineblkgraph.components.length, 1);
20 |
21 | puzzle.ansclear();
22 | puzzle.setMode('play');
23 | puzzle.mouse.inputPath(3,1, 3,3, 5,3, 5,1);
24 |
25 | assert.equal(puzzle.board.lineblkgraph.components.length, 2);
26 |
27 | puzzle.ansclear();
28 |
29 | puzzle.setMode('play');
30 | puzzle.mouse.inputPath(5,1, 5,3, 7,3, 7,1);
31 |
32 | puzzle.setMode('edit');
33 | puzzle.mouse.inputPath(6,0, 6,4);
34 |
35 | assert.equal(puzzle.board.lineblkgraph.components.length, 2);
36 |
37 | puzzle.setMode('edit');
38 | puzzle.mouse.inputPath(6,0, 6,4);
39 |
40 | assert.equal(puzzle.board.lineblkgraph.components.length, 1);
41 | });
42 | });
43 |
--------------------------------------------------------------------------------
/test/variety/pipelink_test.js:
--------------------------------------------------------------------------------
1 | // test/variety/pipelink_test.js
2 |
3 | var assert = require('assert');
4 |
5 | var pzpr = require('../../');
6 |
7 | var puzzle = new pzpr.Puzzle();
8 |
9 | describe('Variety:pipelink',function(){
10 | it('Check line under question marks is connected', function(){
11 | puzzle.open('pipelink/3/2');
12 |
13 | puzzle.setMode('edit');
14 | puzzle.cursor.moveTo(1,1);
15 | puzzle.key.inputKeys('f','right','e');
16 | puzzle.cursor.moveTo(3,3);
17 | puzzle.key.inputKeys('e','right','s');
18 |
19 | assert.equal(puzzle.board.getc(1,1).lcnt, 1);
20 | assert.equal(puzzle.board.getc(3,1).lcnt, 1);
21 |
22 | puzzle.setMode('play');
23 | puzzle.mouse.inputPath(1,1, 1,3, 3,3);
24 | puzzle.mouse.inputPath(3,1, 5,1, 5,3);
25 |
26 | assert.equal(puzzle.board.linegraph.components.length, 1);
27 | assert.equal(puzzle.check().complete, true);
28 | });
29 | });
30 |
--------------------------------------------------------------------------------
/test/variety/tapa_test.js:
--------------------------------------------------------------------------------
1 | // test/variety/tapa_test.js
2 |
3 | var assert = require('assert');
4 |
5 | var pzpr = require('../../');
6 |
7 | var puzzle = new pzpr.Puzzle();
8 |
9 | describe('Variety:tapa',function(){
10 | it('Check shaded cell length around numbers', function(){
11 | puzzle.open('tapa/3/3');
12 | puzzle.setMode('edit');
13 | puzzle.cursor.init(3,3);
14 | puzzle.key.inputKeys('1','-','2');
15 |
16 | // shaded cells = [1,1,3]
17 | puzzle.setMode('play');
18 | puzzle.ansclear();
19 | puzzle.mouse.inputPath(1,1, 5,1);
20 | puzzle.mouse.inputPath(1,5);
21 | puzzle.mouse.inputPath(5,5);
22 | assert.equal(puzzle.check(true)[0], 'ceTapaNe');
23 |
24 | // shaded cells = [1,2,2]
25 | puzzle.setMode('play');
26 | puzzle.ansclear();
27 | puzzle.mouse.inputPath(1,1, 3,1);
28 | puzzle.mouse.inputPath(1,5);
29 | puzzle.mouse.inputPath(5,3, 5,5);
30 | assert.notEqual(puzzle.check(true)[0], 'ceTapaNe');
31 | });
32 | });
33 |
--------------------------------------------------------------------------------