fen-queue
Version:
FEN queue with priorities
26 lines (22 loc) • 902 B
Markdown
//travis-ci.org/Scorpibear/fen-queue.svg?branch=master)](https://travis-ci.org/Scorpibear/fen-queue)
[](https://codecov.io/gh/Scorpibear/fen-queue)
[](https://www.npmjs.com/package/fen-queue)
FEN queue with priorities
```
npm install fen-queue --save
```
```javascript
const Queue = require('fen-queue');
const maxPriorities = 4;
const queue = new Queue(maxPriorities);
// or queue = new Queue() with 4 by default
const fen = 'rnbqkbnr/ppp1pppp/8/3p4/4P3/8/PPPP1PPP/RNBQKBNR w KQkq d6 0 2';
const depth = 50
const priority = 2;
queue.add({fen, depth}, priority);
// or queue.add({fen, depth}) with priority = 0 by default
[ ](./spec/queue.js)
[![Build Status](https: