- Simple API.
- Written in object-oriented way make it easy to develop.
- Easy to use and customize.
Byakugan-js main features:
Node.js
Install the following dependency:
npm install --save byakugan-js
Web
Choose one of the following CDNs:
Minified build:
<script src="https://cdn.jsdelivr.net/gh/rockmanvnx6/byakugan-js@master/dist/byakugan.min.js"></script>
Development build
<script src="https://cdn.jsdelivr.net/gh/rockmanvnx6/byakugan-js@master/dist/byakugan.js"></script>
Usage
const Byakugan = require('byakugan-js'); // ignore if using CDN
const settings = {
grid: [
[1, 0, 0, 0],
[1, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 1, 0],
[1, 0, 0, 0],
],
all: true,
diagonal: false,
}
const byakugan = new Byakugan(settings)
const paths = byakugan.search(0,1,3,3); // Find path from grid[0][1] to grid[3][3]
console.log(paths) // [ [1,1], [2,1], [2,2], [3,2], [3,3] ]
For a full contributions guide and API usage, please visit Github.