Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chinesedfan/traces-solver
Solver for the iOS game `logic traces`
https://github.com/chinesedfan/traces-solver
backtracking-algorithm game solver traces
Last synced: 2 days ago
JSON representation
Solver for the iOS game `logic traces`
- Host: GitHub
- URL: https://github.com/chinesedfan/traces-solver
- Owner: chinesedfan
- License: mit
- Created: 2017-04-07T09:49:09.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-19T04:06:02.000Z (about 6 years ago)
- Last Synced: 2024-05-28T13:23:27.285Z (4 months ago)
- Topics: backtracking-algorithm, game, solver, traces
- Language: JavaScript
- Size: 30.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## traces-solver [![npm version](https://badge.fury.io/js/traces-solver.svg)](https://badge.fury.io/js/traces-solver) [![Build Status](https://travis-ci.org/chinesedfan/traces-solver.svg?branch=master)](https://travis-ci.org/chinesedfan/traces-solver) [![Coverage Status](https://coveralls.io/repos/github/chinesedfan/traces-solver/badge.svg?branch=master)](https://coveralls.io/github/chinesedfan/traces-solver?branch=master) [![License](https://img.shields.io/github/license/chinesedfan/traces-solver.svg)][license]
Simple solver for the iOS game [logic traces](https://itunes.apple.com/us/app/logic-track-traces-puzzles/id1081609724).
The main idea is backtracking algorithm with little optimization. Please check test files for usage.
Hope a web page can be set up in the future!
```
var Grid = require('traces-solver').Grid;var input = [
[0, 0, 0, 0, 0, 0, 0, 4],
[2, 0, 2, 0, 0, 0, 3, 0],
[0, 0, 0, 0, 3, 0, 0, 0],
[0, 9, 0, 0, 0, 3, 0, 0],
[2, 0, 0, 0, 0, 6, 0, 0],
[0, 0, 3, 0, 0, 0, 0, 0],
[0, 0, 0, 1, 0, 0, 0, 5],
[0, 0, 0, 0, 5, 0, 2, 0]
];var grid = new Grid(input);
// grid.debug = true;
grid.solve();
grid.print();
```## License
[MIT][license]
[license]: https://github.com/chinesedfan/traces-solver/blob/master/LICENSE