chess-moments 0.14.1 → 0.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
const getNextMoments = require('./get-next-moments');
|
|
2
2
|
const getPrevMoment = require('./get-prev-moment');
|
|
3
3
|
const momentsToPgn = require('./moments-to-pgn');
|
|
4
|
+
const moveTrainer = require('./move-trainer');
|
|
4
5
|
|
|
5
6
|
module.exports = {
|
|
6
7
|
getNextMoments,
|
|
7
8
|
getPrevMoment,
|
|
8
9
|
momentsToPgn,
|
|
10
|
+
moveTrainer,
|
|
9
11
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const { flatten } = require('lodash');
|
|
2
|
-
const splitByMoveIndex = require('
|
|
3
|
-
const tree = require('
|
|
2
|
+
const splitByMoveIndex = require('../split-by-move');
|
|
3
|
+
const tree = require('../tree');
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const moveTrainer = (sloppyPgn, fen) => {
|
|
6
6
|
// Tree is an array of array depths
|
|
7
7
|
const moments = tree(sloppyPgn);
|
|
8
8
|
|
|
@@ -52,4 +52,4 @@ const train = (sloppyPgn, fen) => {
|
|
|
52
52
|
return training;
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
module.exports =
|
|
55
|
+
module.exports = moveTrainer;
|
package/functions/index.js
CHANGED
|
@@ -8,7 +8,6 @@ const prepare = require('./prepare');
|
|
|
8
8
|
const prettify = require('./prettify');
|
|
9
9
|
const shape = require('./shape');
|
|
10
10
|
const split = require('./split');
|
|
11
|
-
const train = require('./train');
|
|
12
11
|
const tree = require('./tree');
|
|
13
12
|
|
|
14
13
|
module.exports = {
|
|
@@ -22,6 +21,5 @@ module.exports = {
|
|
|
22
21
|
prettify,
|
|
23
22
|
shape,
|
|
24
23
|
split,
|
|
25
|
-
train,
|
|
26
24
|
tree,
|
|
27
25
|
};
|
package/index.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
const { fen, pgn, flat,
|
|
1
|
+
const { fen, pgn, flat, tree } = require('./functions');
|
|
2
2
|
const {
|
|
3
3
|
getNextMoments,
|
|
4
4
|
getPrevMoment,
|
|
5
5
|
momentsToPgn,
|
|
6
|
+
moveTrainer,
|
|
6
7
|
} = require('./functions/extras');
|
|
7
8
|
|
|
8
9
|
module.exports = {
|
|
9
10
|
fen,
|
|
10
11
|
pgn,
|
|
11
12
|
flat,
|
|
12
|
-
train,
|
|
13
13
|
tree,
|
|
14
14
|
getNextMoments,
|
|
15
15
|
getPrevMoment,
|
|
16
16
|
momentsToPgn,
|
|
17
|
+
moveTrainer,
|
|
17
18
|
};
|