├── .editorconfig ├── .gitattributes ├── .gitignore ├── CHANGELOG.md ├── LICENSE.md ├── README.md ├── docs ├── index.html └── nonogram.min.js ├── package.json ├── rollup.config.js ├── src ├── Editor.ts ├── Game.ts ├── Nonogram.ts ├── Solver.ts ├── colors.ts ├── global.d.ts ├── index.ts ├── status.ts └── worker.ts ├── test ├── benchmark.html └── index.html └── tsconfig.json /.editorconfig: -------------------------------------------------------------------------------- 1 | ; http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | indent_style = space 7 | indent_size = 2 8 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | 13 | [*.md] 14 | indent_size = 4 15 | 16 | [node_modules/**.js] 17 | codepaint = false 18 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | docs/*.js binary 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.log 3 | .DS_Store 4 | .vscode 5 | docs/nonogram.js 6 | yarn.lock 7 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change log 2 | 3 | ### 0.1.0 4 | 5 | - start using babel and webpack 6 | 7 | ### 0.2.0 8 | 9 | - constructors are using namespace `nonogram` 10 | - use truthy and falsy values to setting `Editor`s grid 11 | 12 | ### 0.3.0 13 | 14 | - removed custom event, using callbacks instead 15 | 16 | ### 0.4.0 17 | 18 | - canvas in constructors goes optional 19 | - some configurable items wrapped in key `theme` 20 | 21 | ### 0.5.0 22 | 23 | - now using TypeScript 24 | 25 | ### 0.6.0 26 | 27 | - now using `WebWorker` 28 | 29 | ### 0.7.0 30 | 31 | - enhance `worker.ts` 32 | - remove `demoMode`, `!!delay` now has the same meaning 33 | 34 | ### 0.8.0 35 | 36 | - use rollup instead of webpack 37 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Zhou Qi 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 all 13 | 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 THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Nonogram 2 | 3 | [](https://handsomeone.github.io/Nonogram) 4 | 5 | ## Usage 6 | 7 | [**Check the live demo and find out how to build your own nonogram application.**](https://handsomeone.github.io/Nonogram) 8 | 9 | You just need to attach 10 | 11 | ```html 12 | 13 | ``` 14 | 15 | to `
`. A `