bestmovedb
Version:
database of chess best moves
26 lines (22 loc) • 901 B
Markdown
[](https://travis-ci.org/Scorpibear/bestmovedb)
[](https://codecov.io/gh/Scorpibear/bestmovedb)
[](https://www.npmjs.com/package/bestmovedb)
Database of chess best moves with FEN as a key. Stores FENs in normalized state, removing en passant note if en-passant is not allowed.
```
npm install bestmovedb --save
```
```javascript
const DB = require('bestmovedb');
const db = new DB();
db.add({fen, bestMove, score, depth});
db.getFen({fen, depth});
const json = db.toJSON();
//...
const db2 = new DB();
db2.load(json); // db2 is in the same state as db now
```
[](./spec/db.spec.js)