chess-moments 0.12.1 → 0.14.0

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,4 +1,3 @@
1
- const brush = require('./brush');
2
1
  const fen = require('./fen');
3
2
  const flat = require('./flat');
4
3
  const lines = require('./lines');
@@ -13,7 +12,6 @@ const train = require('./train');
13
12
  const tree = require('./tree');
14
13
 
15
14
  module.exports = {
16
- brush,
17
15
  fen,
18
16
  flat,
19
17
  lines,
@@ -1,4 +1,4 @@
1
- const brush = require('./brush');
1
+ const { getBrushColor } = require('./helpers');
2
2
 
3
3
  module.exports = (comment) => {
4
4
  try {
@@ -16,7 +16,7 @@ module.exports = (comment) => {
16
16
 
17
17
  for (const target of shapes.join('').split(',')) {
18
18
  draw.push({
19
- brush: brush(target.substr(0, 1)),
19
+ brush: getBrushColor(target.substr(0, 1)),
20
20
  orig: target.substr(1, 2),
21
21
  dest: target.substr(3, 2),
22
22
  });
package/index.js CHANGED
@@ -1,4 +1,9 @@
1
1
  const { fen, pgn, flat, train, tree } = require('./functions');
2
+ const {
3
+ getNextMoments,
4
+ getPrevMoment,
5
+ momentsToPgn,
6
+ } = require('./functions/extras');
2
7
 
3
8
  module.exports = {
4
9
  fen,
@@ -6,4 +11,7 @@ module.exports = {
6
11
  flat,
7
12
  train,
8
13
  tree,
14
+ getNextMoments,
15
+ getPrevMoment,
16
+ momentsToPgn,
9
17
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chess-moments",
3
- "version": "0.12.1",
3
+ "version": "0.14.0",
4
4
  "description": "PGN parser that transforms PGN files into chess \"moments\"",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -1,9 +0,0 @@
1
- module.exports = (letter) => {
2
- const brushes = {
3
- R: 'red',
4
- Y: 'yellow',
5
- G: 'green',
6
- };
7
-
8
- return brushes[letter] || 'green';
9
- };