@miketmoore/maze-generator
v2.0.3
Published
This is a javascript library, written in TypeScript that generates a maze data structure.
Downloads
26
Readme
Maze Generator
This is a javascript library, written in TypeScript that generates a maze data structure.
Install
yarn add maze-generator --dev
Usage
import { mazeGenerator } from 'maze-generator'
const grid = mazeGenerator({
rows: 10,
columns: 10
})
Tests
yarn test
Publishing a Release
- Checkout the commit that is ready to release.
- Check this out as a branch named
release-X.X.X
- Compile
yarn build
(this will also clean the build directory first) - the TypeScript is compiled to JavaScript into thedist
directory. - Publish with
yarn publish --access=public
. The CLI will prompt for the version number and npm credentials. - Navigate to https://www.npmjs.com/package/@miketmoore/maze-generator and smile :)
Benchmark
yarn && yarn build && yarn benchmark
Example output after benchmark test runs:
recursive x 117 ops/sec ±2.39% (66 runs sampled)
iterative x 125 ops/sec ±1.16% (71 runs sampled)
Fastest is iterative