fen-queue-processor
Version:
Process and analyzes queue of chess positions in FEN format
25 lines (19 loc) • 1.19 kB
Markdown
[](https://travis-ci.org/Scorpibear/fen-queue-processor)
[](https://codecov.io/gh/Scorpibear/fen-queue-processor)
[](https://www.npmjs.com/package/fen-queue-processor)
Process and analyzes queue of chess positions in FEN format
```
npm install fen-queue-processor --save
```
```javascript
const Processor = require('fen-queue-processor');
const processor = new Processor({queue, evaluation, analyzer, strategy, evaluationSources});
await processor.process(); // call queue.getAllItems, clarifies with strategy is it interesting for analysis, checks for answer in evaluation sources and calls for interesting not analyzed positions analyzer.analyze
//...
processor.registerEvaluation({fen, depth, score, bestMove}); // calls evaluation.save and queue.delete for all analyzed enough positions
```
[](./spec/processor.spec.js)