scrabble-solver 2.8.2 → 2.8.4

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.
Files changed (216) hide show
  1. package/.eslintrc.js +1 -1
  2. package/.gitattributes +2 -0
  3. package/HISTORY.md +17 -0
  4. package/README.md +8 -26
  5. package/lerna.json +1 -1
  6. package/package.json +13 -13
  7. package/packages/configs/build/getConfig.js +6 -12
  8. package/packages/configs/build/getLocaleConfig.js +2 -2
  9. package/packages/configs/build/isConfigId.js +5 -8
  10. package/packages/configs/build/literaki/bonuses.js +2 -2
  11. package/packages/configs/build/literaki/literaki.js +14 -27
  12. package/packages/configs/build/literaki/tiles/tilesDe.js +1 -1
  13. package/packages/configs/build/literaki/tiles/tilesEn.js +1 -1
  14. package/packages/configs/build/literaki/tiles/tilesEs.js +1 -1
  15. package/packages/configs/build/literaki/tiles/tilesFr.js +1 -1
  16. package/packages/configs/build/literaki/tiles/tilesPl.js +1 -1
  17. package/packages/configs/build/scrabble/bonuses.js +2 -2
  18. package/packages/configs/build/scrabble/scrabble.js +14 -27
  19. package/packages/configs/build/scrabble/tiles/tilesDe.js +1 -1
  20. package/packages/configs/build/scrabble/tiles/tilesEn.js +1 -1
  21. package/packages/configs/build/scrabble/tiles/tilesEs.js +1 -1
  22. package/packages/configs/build/scrabble/tiles/tilesFr.js +1 -1
  23. package/packages/configs/build/scrabble/tiles/tilesPl.js +1 -1
  24. package/packages/configs/package.json +3 -3
  25. package/packages/constants/package.json +1 -1
  26. package/packages/dictionaries/build/Dictionaries.js +37 -110
  27. package/packages/dictionaries/build/constants/index.js +2 -2
  28. package/packages/dictionaries/build/index.js +1 -1
  29. package/packages/dictionaries/build/lib/DiskCache.js +29 -91
  30. package/packages/dictionaries/build/lib/LayeredCache.js +37 -101
  31. package/packages/dictionaries/build/lib/MemoryCache.js +16 -17
  32. package/packages/dictionaries/build/lib/createAsyncProxy.js +14 -58
  33. package/packages/dictionaries/build/lib/createCacheTimestampComparator.js +4 -4
  34. package/packages/dictionaries/build/lib/downloadDictionary.js +10 -54
  35. package/packages/dictionaries/build/lib/getDictionaryFilepath.js +4 -4
  36. package/packages/dictionaries/build/lib/index.d.ts +0 -2
  37. package/packages/dictionaries/build/lib/index.js +1 -5
  38. package/packages/dictionaries/package-lock.json +10 -10
  39. package/packages/dictionaries/package.json +5 -5
  40. package/packages/dictionaries/src/lib/DiskCache.ts +2 -4
  41. package/packages/dictionaries/src/lib/LayeredCache.ts +17 -8
  42. package/packages/dictionaries/src/lib/index.ts +0 -2
  43. package/packages/logger/build/constants.js +2 -2
  44. package/packages/logger/build/logger.js +4 -4
  45. package/packages/logger/package-lock.json +2 -2
  46. package/packages/logger/package.json +1 -1
  47. package/packages/scrabble-solver/.next/BUILD_ID +1 -1
  48. package/packages/scrabble-solver/.next/build-manifest.json +10 -10
  49. package/packages/scrabble-solver/.next/cache/.tsbuildinfo +1 -1
  50. package/packages/scrabble-solver/.next/cache/eslint/.cache_8dgz12 +1 -1
  51. package/packages/scrabble-solver/.next/cache/next-server.js.nft.json +1 -1
  52. package/packages/scrabble-solver/.next/cache/webpack/client-production/0.pack +0 -0
  53. package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack +0 -0
  54. package/packages/scrabble-solver/.next/cache/webpack/server-production/0.pack +0 -0
  55. package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack +0 -0
  56. package/packages/scrabble-solver/.next/next-server.js.nft.json +1 -1
  57. package/packages/scrabble-solver/.next/prerender-manifest.json +1 -1
  58. package/packages/scrabble-solver/.next/routes-manifest.json +1 -1
  59. package/packages/scrabble-solver/.next/server/chunks/206.js +98 -97
  60. package/packages/scrabble-solver/.next/server/chunks/413.js +396 -677
  61. package/packages/scrabble-solver/.next/server/chunks/515.js +546 -550
  62. package/packages/scrabble-solver/.next/server/chunks/907.js +399 -681
  63. package/packages/scrabble-solver/.next/server/middleware-build-manifest.js +1 -1
  64. package/packages/scrabble-solver/.next/server/pages/404.html +5 -1
  65. package/packages/scrabble-solver/.next/server/pages/404.js.nft.json +1 -1
  66. package/packages/scrabble-solver/.next/server/pages/500.html +2 -2
  67. package/packages/scrabble-solver/.next/server/pages/_app.js +7 -10
  68. package/packages/scrabble-solver/.next/server/pages/_app.js.nft.json +1 -1
  69. package/packages/scrabble-solver/.next/server/pages/_document.js +0 -3
  70. package/packages/scrabble-solver/.next/server/pages/_error.js.nft.json +1 -1
  71. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale]/[word].js +114 -171
  72. package/packages/scrabble-solver/.next/server/pages/api/solve.js +426 -1206
  73. package/packages/scrabble-solver/.next/server/pages/index.html +17 -1
  74. package/packages/scrabble-solver/.next/server/pages/index.js +7 -14
  75. package/packages/scrabble-solver/.next/server/pages/index.js.nft.json +1 -1
  76. package/packages/scrabble-solver/.next/server/pages/index.json +1 -1
  77. package/packages/scrabble-solver/.next/static/-UOLkxdxU0PlKbXa09-xO/_buildManifest.js +1 -0
  78. package/packages/scrabble-solver/.next/static/{nXSSCVI5pGlS_NxEidxkS → -UOLkxdxU0PlKbXa09-xO}/_ssgManifest.js +0 -0
  79. package/packages/scrabble-solver/.next/static/chunks/56-2d34867599a0ac66.js +1 -0
  80. package/packages/scrabble-solver/.next/static/chunks/pages/{404-02d949d2fe59e960.js → 404-30c06e61d256c5b2.js} +1 -1
  81. package/packages/scrabble-solver/.next/static/chunks/pages/_app-6ffa2ab900772b67.js +1 -0
  82. package/packages/scrabble-solver/.next/static/chunks/pages/{index-75517525489ab316.js → index-13ea7770a65c69ee.js} +1 -1
  83. package/packages/scrabble-solver/.next/static/css/{d676d43c6b9c9a57.css → 551d09cac435debb.css} +1 -1
  84. package/packages/scrabble-solver/.next/static/css/{6a9e5ba3f77c27f2.css → cdbc9e0afcff5473.css} +1 -1
  85. package/packages/scrabble-solver/.next/trace +42 -42
  86. package/packages/scrabble-solver/package-lock.json +85 -85
  87. package/packages/scrabble-solver/package.json +13 -13
  88. package/packages/scrabble-solver/src/components/Board/Board.tsx +1 -1
  89. package/packages/scrabble-solver/src/components/Board/BoardPure.tsx +1 -1
  90. package/packages/scrabble-solver/src/components/Board/components/Cell/Button.tsx +1 -1
  91. package/packages/scrabble-solver/src/components/Board/components/Cell/Cell.tsx +1 -1
  92. package/packages/scrabble-solver/src/components/Board/components/Cell/CellPure.tsx +1 -1
  93. package/packages/scrabble-solver/src/components/Board/hooks/useGrid.ts +9 -0
  94. package/packages/scrabble-solver/src/components/Button/Button.tsx +1 -1
  95. package/packages/scrabble-solver/src/components/Checkbox/Checkbox.tsx +1 -1
  96. package/packages/scrabble-solver/src/components/Dictionary/Dictionary.tsx +1 -1
  97. package/packages/scrabble-solver/src/components/DictionaryInput/DictionaryInput.tsx +1 -1
  98. package/packages/scrabble-solver/src/components/EmptyState/EmptyState.tsx +1 -1
  99. package/packages/scrabble-solver/src/components/Key/Key.tsx +1 -1
  100. package/packages/scrabble-solver/src/components/KeyMap/KeyMap.tsx +2 -2
  101. package/packages/scrabble-solver/src/components/KeyMap/components/Mapping/Mapping.module.scss +4 -0
  102. package/packages/scrabble-solver/src/components/KeyMap/components/Mapping/Mapping.tsx +16 -12
  103. package/packages/scrabble-solver/src/components/Loading/Loading.tsx +1 -1
  104. package/packages/scrabble-solver/src/components/Logo/Logo.tsx +1 -1
  105. package/packages/scrabble-solver/src/components/NavButtons/NavButtons.tsx +1 -1
  106. package/packages/scrabble-solver/src/components/NotFound/NotFound.tsx +1 -1
  107. package/packages/scrabble-solver/src/components/PlainTiles/PlainTiles.tsx +5 -1
  108. package/packages/scrabble-solver/src/components/PlainTiles/Tile.tsx +1 -1
  109. package/packages/scrabble-solver/src/components/Rack/Rack.tsx +1 -1
  110. package/packages/scrabble-solver/src/components/Rack/RackTile.tsx +1 -1
  111. package/packages/scrabble-solver/src/components/Radio/Radio.tsx +1 -1
  112. package/packages/scrabble-solver/src/components/RemainingTiles/Character.tsx +1 -1
  113. package/packages/scrabble-solver/src/components/RemainingTiles/RemainingTiles.tsx +1 -1
  114. package/packages/scrabble-solver/src/components/Results/Cell.tsx +1 -1
  115. package/packages/scrabble-solver/src/components/Results/HeaderButton.tsx +1 -1
  116. package/packages/scrabble-solver/src/components/Results/Result.tsx +1 -1
  117. package/packages/scrabble-solver/src/components/Results/Results.tsx +1 -1
  118. package/packages/scrabble-solver/src/components/Results/SolveButton.tsx +1 -1
  119. package/packages/scrabble-solver/src/components/ResultsInput/ResultsInput.tsx +1 -1
  120. package/packages/scrabble-solver/src/components/Screen/Screen.tsx +1 -1
  121. package/packages/scrabble-solver/src/components/Settings/Settings.tsx +1 -1
  122. package/packages/scrabble-solver/src/components/Settings/components/AutoGroupTilesSetting/AutoGroupTilesSetting.tsx +1 -1
  123. package/packages/scrabble-solver/src/components/Settings/components/ConfigSetting/ConfigSetting.tsx +1 -1
  124. package/packages/scrabble-solver/src/components/Settings/components/LocaleSetting/LocaleSetting.tsx +1 -1
  125. package/packages/scrabble-solver/src/components/Sidebar/Sidebar.tsx +1 -1
  126. package/packages/scrabble-solver/src/components/Sidebar/components/Section/Section.tsx +1 -1
  127. package/packages/scrabble-solver/src/components/Splash/Splash.tsx +1 -1
  128. package/packages/scrabble-solver/src/components/SquareButton/Link.tsx +1 -1
  129. package/packages/scrabble-solver/src/components/SquareButton/SquareButton.tsx +1 -1
  130. package/packages/scrabble-solver/src/components/SvgFontCss/SvgFontCss.tsx +12 -0
  131. package/packages/scrabble-solver/src/components/SvgFontCss/index.ts +1 -0
  132. package/packages/scrabble-solver/src/components/Tile/Tile.tsx +1 -1
  133. package/packages/scrabble-solver/src/components/Tile/TilePure.tsx +2 -2
  134. package/packages/scrabble-solver/src/components/Tooltip/useTooltip.tsx +1 -1
  135. package/packages/scrabble-solver/src/components/Well/Well.tsx +1 -1
  136. package/packages/scrabble-solver/src/components/index.ts +1 -0
  137. package/packages/scrabble-solver/src/hooks/usePortal.tsx +19 -9
  138. package/packages/scrabble-solver/src/lib/createKeyboardNavigation.ts +3 -0
  139. package/packages/scrabble-solver/src/lib/memoize.ts +1 -1
  140. package/packages/scrabble-solver/src/pages/_app.tsx +1 -1
  141. package/packages/scrabble-solver/src/pages/_document.tsx +1 -1
  142. package/packages/scrabble-solver/src/pages/index.tsx +6 -15
  143. package/packages/scrabble-solver/src/styles/global.scss +3 -0
  144. package/packages/solver/build/PatternsFiller.js +38 -72
  145. package/packages/solver/build/PatternsGenerator.js +43 -72
  146. package/packages/solver/build/ScoresCalculator.js +20 -24
  147. package/packages/solver/build/Solver.js +19 -24
  148. package/packages/solver/package-lock.json +17 -17
  149. package/packages/solver/package.json +7 -7
  150. package/packages/solver/src/PatternsFiller.ts +5 -10
  151. package/packages/solver/src/PatternsGenerator.ts +17 -16
  152. package/packages/solver/src/Solver.ts +4 -8
  153. package/packages/types/build/Board.js +68 -85
  154. package/packages/types/build/Bonus.js +15 -21
  155. package/packages/types/build/Cell.js +31 -33
  156. package/packages/types/build/CharacterBonus.js +18 -40
  157. package/packages/types/build/Config.js +62 -117
  158. package/packages/types/build/HorizontalPattern.js +17 -63
  159. package/packages/types/build/Pattern.js +37 -41
  160. package/packages/types/build/Result.js +23 -46
  161. package/packages/types/build/Tile.js +22 -24
  162. package/packages/types/build/VerticalPattern.js +17 -63
  163. package/packages/types/build/WordBonus.js +13 -35
  164. package/packages/types/build/WordDefinition.js +13 -15
  165. package/packages/types/package.json +2 -2
  166. package/packages/types/src/Cell.ts +1 -1
  167. package/packages/types/src/Pattern.ts +1 -1
  168. package/packages/word-definitions/build/crawl/crawl.js +15 -16
  169. package/packages/word-definitions/build/crawl/crawlEnglish.js +3 -3
  170. package/packages/word-definitions/build/crawl/crawlFrench.js +3 -3
  171. package/packages/word-definitions/build/crawl/crawlGerman.js +3 -3
  172. package/packages/word-definitions/build/crawl/crawlPolish.js +3 -3
  173. package/packages/word-definitions/build/crawl/crawlSpanish.js +3 -3
  174. package/packages/word-definitions/build/getWordDefinition.js +9 -52
  175. package/packages/word-definitions/build/lib/normalizeDefinition.js +15 -15
  176. package/packages/word-definitions/build/lib/request.js +8 -20
  177. package/packages/word-definitions/build/lib/unique.js +1 -1
  178. package/packages/word-definitions/build/parse/parse.js +18 -19
  179. package/packages/word-definitions/build/parse/parseEnglish.js +5 -5
  180. package/packages/word-definitions/build/parse/parseFrench.js +5 -5
  181. package/packages/word-definitions/build/parse/parseGerman.js +6 -6
  182. package/packages/word-definitions/build/parse/parsePolish.js +6 -6
  183. package/packages/word-definitions/build/parse/parseSpanish.js +9 -9
  184. package/packages/word-definitions/package-lock.json +8 -8
  185. package/packages/word-definitions/package.json +2 -2
  186. package/packages/word-lists/build/getDeDeWordList.js +5 -43
  187. package/packages/word-lists/build/getEnGbWordList.js +5 -43
  188. package/packages/word-lists/build/getEnUsWordList.js +5 -43
  189. package/packages/word-lists/build/getEsEsWordList.js +7 -50
  190. package/packages/word-lists/build/getFrFrWordList.js +9 -50
  191. package/packages/word-lists/build/getPlPlWordList.js +33 -91
  192. package/packages/word-lists/build/getWordList.js +16 -17
  193. package/packages/word-lists/build/lib/downloadFile.d.ts +1 -2
  194. package/packages/word-lists/build/lib/downloadFile.js +28 -10
  195. package/packages/word-lists/build/lib/downloadHtml.js +8 -8
  196. package/packages/word-lists/build/lib/extractWords.js +5 -5
  197. package/packages/word-lists/build/lib/findFirstWordIndex.js +6 -6
  198. package/packages/word-lists/build/lib/getHash.js +2 -5
  199. package/packages/word-lists/build/lib/getTempFilename.js +3 -3
  200. package/packages/word-lists/build/lib/getTxtWordList.js +10 -56
  201. package/packages/word-lists/package-lock.json +2 -2
  202. package/packages/word-lists/package.json +2 -2
  203. package/packages/word-lists/src/getFrFrWordList.ts +1 -0
  204. package/packages/word-lists/src/getPlPlWordList.ts +2 -3
  205. package/packages/word-lists/src/lib/downloadFile.ts +25 -7
  206. package/packages/word-lists/src/lib/getTxtWordList.ts +2 -4
  207. package/tsconfig.json +1 -1
  208. package/packages/dictionaries/build/lib/readFile.d.ts +0 -2
  209. package/packages/dictionaries/build/lib/readFile.js +0 -57
  210. package/packages/dictionaries/build/lib/writeFile.d.ts +0 -2
  211. package/packages/dictionaries/build/lib/writeFile.js +0 -57
  212. package/packages/dictionaries/src/lib/readFile.ts +0 -15
  213. package/packages/dictionaries/src/lib/writeFile.ts +0 -15
  214. package/packages/scrabble-solver/.next/static/chunks/195-fcadef5c6eed8338.js +0 -1
  215. package/packages/scrabble-solver/.next/static/chunks/pages/_app-f4030148d742bcd2.js +0 -1
  216. package/packages/scrabble-solver/.next/static/nXSSCVI5pGlS_NxEidxkS/_buildManifest.js +0 -1
@@ -1,95 +1,66 @@
1
1
  "use strict";
2
- var __read = (this && this.__read) || function (o, n) {
3
- var m = typeof Symbol === "function" && o[Symbol.iterator];
4
- if (!m) return o;
5
- var i = m.call(o), r, ar = [], e;
6
- try {
7
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
8
- }
9
- catch (error) { e = { error: error }; }
10
- finally {
11
- try {
12
- if (r && !r.done && (m = i["return"])) m.call(i);
13
- }
14
- finally { if (e) throw e.error; }
15
- }
16
- return ar;
17
- };
18
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
19
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
20
- if (ar || !(i in from)) {
21
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
22
- ar[i] = from[i];
23
- }
24
- }
25
- return to.concat(ar || Array.prototype.slice.call(from));
26
- };
27
2
  Object.defineProperty(exports, "__esModule", { value: true });
28
- var types_1 = require("@scrabble-solver/types");
29
- var PatternsGenerator = /** @class */ (function () {
30
- function PatternsGenerator(config) {
3
+ const types_1 = require("@scrabble-solver/types");
4
+ class PatternsGenerator {
5
+ constructor(config) {
31
6
  this.config = config;
32
7
  }
33
- PatternsGenerator.prototype.generate = function (board) {
34
- return __spreadArray(__spreadArray([], __read(this.generateHorizontal(board)), false), __read(this.generateVertical(board)), false);
35
- };
36
- PatternsGenerator.prototype.generateHorizontal = function (board) {
8
+ generate(board) {
9
+ return [...this.generateHorizontal(board), ...this.generateVertical(board)];
10
+ }
11
+ generateHorizontal(board) {
37
12
  return this.generatePatterns({
38
- board: board,
39
- getNthVector: function (index) { return board.getRow(index); },
13
+ board,
14
+ getNthVector: (index) => board.getRow(index),
40
15
  numberOfVectors: this.config.boardHeight,
41
16
  PatternModel: types_1.HorizontalPattern,
42
17
  });
43
- };
44
- PatternsGenerator.prototype.generateVertical = function (board) {
18
+ }
19
+ generateVertical(board) {
45
20
  return this.generatePatterns({
46
- board: board,
47
- getNthVector: function (index) { return board.getColumn(index); },
21
+ board,
22
+ getNthVector: (index) => board.getColumn(index),
48
23
  numberOfVectors: this.config.boardWidth,
49
24
  PatternModel: types_1.VerticalPattern,
50
25
  });
51
- };
52
- PatternsGenerator.prototype.generatePatterns = function (_a) {
53
- var _this = this;
54
- var board = _a.board, getNthVector = _a.getNthVector, numberOfVectors = _a.numberOfVectors, PatternModel = _a.PatternModel;
55
- return this.generateVectors({ getNthVector: getNthVector, numberOfVectors: numberOfVectors }).reduce(function (patterns, cells) {
56
- return patterns.concat(_this.generateCellsPatterns({ board: board, PatternModel: PatternModel, cells: cells }));
26
+ }
27
+ generatePatterns({ board, getNthVector, numberOfVectors, PatternModel, }) {
28
+ return this.generateVectors({ getNthVector, numberOfVectors }).reduce((patterns, cells) => {
29
+ return patterns.concat(this.generateCellsPatterns({ board, PatternModel, cells }));
57
30
  }, []);
58
- };
59
- PatternsGenerator.prototype.generateVectors = function (_a) {
60
- var getNthVector = _a.getNthVector, numberOfVectors = _a.numberOfVectors;
31
+ }
32
+ generateVectors({ getNthVector, numberOfVectors, }) {
61
33
  return Array(numberOfVectors)
62
34
  .fill(0)
63
- .map(function (_, index) { return getNthVector(index); });
64
- };
65
- PatternsGenerator.prototype.generateCellsPatterns = function (_a) {
66
- var _this = this;
67
- var board = _a.board, cells = _a.cells, PatternModel = _a.PatternModel;
68
- return this.generateStartIndices(cells).reduce(function (patterns, startIndex) {
69
- return patterns.concat(_this.generateEndIndices(cells, startIndex).reduce(function (placeablePatterns, endIndex) {
70
- var pattern = new PatternModel({
71
- board: board,
35
+ .map((_, index) => getNthVector(index));
36
+ }
37
+ generateCellsPatterns({ board, cells, PatternModel, }) {
38
+ return this.generateStartIndices(cells).flatMap((startIndex) => {
39
+ const endIndices = this.generateEndIndices(cells, startIndex);
40
+ const patterns = [];
41
+ for (const endIndex of endIndices) {
42
+ const pattern = new PatternModel({
43
+ board,
72
44
  cells: cells.slice(startIndex, endIndex + 1),
73
45
  });
74
- if (pattern.canBePlaced(_this.config)) {
75
- placeablePatterns.push(pattern);
46
+ if (pattern.canBePlaced(this.config)) {
47
+ patterns.push(pattern);
76
48
  }
77
- return placeablePatterns;
78
- }, []));
79
- }, []);
80
- };
81
- PatternsGenerator.prototype.generateStartIndices = function (cells) {
49
+ }
50
+ return patterns;
51
+ });
52
+ }
53
+ generateStartIndices(cells) {
82
54
  return Array(cells.length - 1)
83
55
  .fill(0)
84
- .map(function (_, startIndex) { return startIndex; })
85
- .filter(function (startIndex) { return startIndex === 0 || !cells[startIndex - 1].hasTile(); });
86
- };
87
- PatternsGenerator.prototype.generateEndIndices = function (cells, startIndex) {
56
+ .map((_, startIndex) => startIndex)
57
+ .filter((startIndex) => startIndex === 0 || !cells[startIndex - 1].hasTile());
58
+ }
59
+ generateEndIndices(cells, startIndex) {
88
60
  return Array(cells.length - startIndex - 1)
89
61
  .fill(0)
90
- .map(function (_, endIndex) { return endIndex + startIndex + 1; })
91
- .filter(function (endIndex) { return endIndex >= cells.length - 1 || !cells[endIndex + 1].hasTile(); });
92
- };
93
- return PatternsGenerator;
94
- }());
62
+ .map((_, endIndex) => endIndex + startIndex + 1)
63
+ .filter((endIndex) => endIndex >= cells.length - 1 || !cells[endIndex + 1].hasTile());
64
+ }
65
+ }
95
66
  exports.default = PatternsGenerator;
@@ -1,14 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var constants_1 = require("@scrabble-solver/constants");
4
- var ScoresCalculator = /** @class */ (function () {
5
- function ScoresCalculator(config) {
6
- var _this = this;
7
- this.reduceCellScore = function (_a, cell) {
8
- var multiplier = _a.multiplier, score = _a.score;
9
- var bonus = _this.config.getCellBonus(cell);
10
- var _b = bonus && bonus.canApply(_this.config, cell) ? bonus.value : constants_1.NO_BONUS, characterMultiplier = _b.characterMultiplier, wordMultiplier = _b.wordMultiplier;
11
- var characterScore = cell.tile.isBlank ? _this.config.blankScore : _this.config.pointsMap[cell.tile.character];
3
+ const constants_1 = require("@scrabble-solver/constants");
4
+ class ScoresCalculator {
5
+ constructor(config) {
6
+ this.reduceCellScore = ({ multiplier, score }, cell) => {
7
+ const bonus = this.config.getCellBonus(cell);
8
+ const { characterMultiplier, wordMultiplier } = bonus && bonus.canApply(this.config, cell) ? bonus.value : constants_1.NO_BONUS;
9
+ const characterScore = cell.tile.isBlank ? this.config.blankScore : this.config.pointsMap[cell.tile.character];
12
10
  return {
13
11
  multiplier: multiplier * wordMultiplier,
14
12
  score: score + characterScore * characterMultiplier,
@@ -16,26 +14,24 @@ var ScoresCalculator = /** @class */ (function () {
16
14
  };
17
15
  this.config = config;
18
16
  }
19
- ScoresCalculator.prototype.calculate = function (pattern) {
17
+ calculate(pattern) {
20
18
  return this.calculatePatternScoreWithCollisions(pattern) + this.calculateBonusScore(pattern);
21
- };
22
- ScoresCalculator.prototype.calculateBonusScore = function (pattern) {
23
- var areAllTilesUsed = pattern.getNumberOfEmptyCells() === this.config.maximumNumberOfCharacters;
19
+ }
20
+ calculateBonusScore(pattern) {
21
+ const areAllTilesUsed = pattern.getNumberOfEmptyCells() === this.config.maximumNumberOfCharacters;
24
22
  return areAllTilesUsed ? this.config.allTilesBonusScore : 0;
25
- };
26
- ScoresCalculator.prototype.calculatePatternScoreWithCollisions = function (pattern) {
27
- var _this = this;
23
+ }
24
+ calculatePatternScoreWithCollisions(pattern) {
28
25
  return pattern
29
26
  .getCollisions()
30
- .reduce(function (patternsScore, collisionPattern) { return patternsScore + _this.calculatePatternScore(collisionPattern); }, this.calculatePatternScore(pattern));
31
- };
32
- ScoresCalculator.prototype.calculatePatternScore = function (pattern) {
33
- var _a = pattern.cells.reduce(this.reduceCellScore, {
27
+ .reduce((patternsScore, collisionPattern) => patternsScore + this.calculatePatternScore(collisionPattern), this.calculatePatternScore(pattern));
28
+ }
29
+ calculatePatternScore(pattern) {
30
+ const { multiplier, score } = pattern.cells.reduce(this.reduceCellScore, {
34
31
  multiplier: 1,
35
32
  score: 0,
36
- }), multiplier = _a.multiplier, score = _a.score;
33
+ });
37
34
  return score * multiplier;
38
- };
39
- return ScoresCalculator;
40
- }());
35
+ }
36
+ }
41
37
  exports.default = ScoresCalculator;
@@ -3,33 +3,28 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- var types_1 = require("@scrabble-solver/types");
7
- var uniqBy_1 = __importDefault(require("lodash/uniqBy"));
8
- var PatternsFiller_1 = __importDefault(require("./PatternsFiller"));
9
- var PatternsGenerator_1 = __importDefault(require("./PatternsGenerator"));
10
- var ScoresCalculator_1 = __importDefault(require("./ScoresCalculator"));
11
- var Solver = /** @class */ (function () {
12
- function Solver(config, trie) {
6
+ const types_1 = require("@scrabble-solver/types");
7
+ const uniqBy_1 = __importDefault(require("lodash/uniqBy"));
8
+ const PatternsFiller_1 = __importDefault(require("./PatternsFiller"));
9
+ const PatternsGenerator_1 = __importDefault(require("./PatternsGenerator"));
10
+ const ScoresCalculator_1 = __importDefault(require("./ScoresCalculator"));
11
+ class Solver {
12
+ constructor(config, trie) {
13
13
  this.patternsFiller = new PatternsFiller_1.default(config, trie);
14
14
  this.patternsGenerator = new PatternsGenerator_1.default(config);
15
15
  this.scoresCalculator = new ScoresCalculator_1.default(config);
16
16
  }
17
- Solver.prototype.solve = function (board, tiles) {
18
- var _this = this;
19
- var patterns = this.patternsGenerator
20
- .generate(board)
21
- .reduce(function (filledPatterns, pattern) { return filledPatterns.concat(_this.patternsFiller.fill(pattern, tiles)); }, []);
22
- var uniquePatterns = (0, uniqBy_1.default)(patterns, function (pattern) { return JSON.stringify(pattern.toJson()); });
23
- var results = uniquePatterns.map(function (pattern, index) {
24
- return new types_1.Result({
25
- cells: pattern.cells,
26
- id: index,
27
- numberOfCollisions: pattern.getCollisions().length,
28
- points: _this.scoresCalculator.calculate(pattern),
29
- });
30
- });
17
+ solve(board, tiles) {
18
+ const patterns = this.patternsGenerator.generate(board);
19
+ const filledPatterns = patterns.flatMap((pattern) => this.patternsFiller.fill(pattern, tiles));
20
+ const uniquePatterns = (0, uniqBy_1.default)(filledPatterns, (pattern) => JSON.stringify(pattern.toJson()));
21
+ const results = uniquePatterns.map((pattern, index) => new types_1.Result({
22
+ cells: pattern.cells,
23
+ id: index,
24
+ numberOfCollisions: pattern.getCollisions().length,
25
+ points: this.scoresCalculator.calculate(pattern),
26
+ }));
31
27
  return results;
32
- };
33
- return Solver;
34
- }());
28
+ }
29
+ }
35
30
  exports.default = Solver;
@@ -1,33 +1,33 @@
1
1
  {
2
2
  "name": "@scrabble-solver/solver",
3
- "version": "2.8.2",
3
+ "version": "2.8.4",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@scrabble-solver/solver",
9
- "version": "2.8.2",
9
+ "version": "2.8.4",
10
10
  "license": "CC-BY-NC-ND-4.0",
11
11
  "dependencies": {
12
- "@kamilmielnik/trie": "^1.0.3",
12
+ "@kamilmielnik/trie": "^2.0.0",
13
13
  "lodash": "^4.17.21"
14
14
  },
15
15
  "devDependencies": {
16
- "@types/lodash": "^4.14.185"
16
+ "@types/lodash": "^4.14.186"
17
17
  }
18
18
  },
19
19
  "node_modules/@kamilmielnik/trie": {
20
- "version": "1.0.3",
21
- "resolved": "https://registry.npmjs.org/@kamilmielnik/trie/-/trie-1.0.3.tgz",
22
- "integrity": "sha512-xIGglzz91BwfudrsNoxX0nRlfUrGu7Y9QxJ5RnrapLGZAer02CiVayBP00gndpkP3xjmueI9l49xb4W3JgcLXA==",
20
+ "version": "2.0.0",
21
+ "resolved": "https://registry.npmjs.org/@kamilmielnik/trie/-/trie-2.0.0.tgz",
22
+ "integrity": "sha512-YWTYtrV97bQ5hRifG1FImP47PI400a56O8+oQClQOtDjY3tioxab4sOgFHckiDdswciN1RwngCZ9Kv3phJfSuA==",
23
23
  "engines": {
24
- "node": ">=10"
24
+ "node": ">=16"
25
25
  }
26
26
  },
27
27
  "node_modules/@types/lodash": {
28
- "version": "4.14.185",
29
- "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.185.tgz",
30
- "integrity": "sha512-evMDG1bC4rgQg4ku9tKpuMh5iBNEwNa3tf9zRHdP1qlv+1WUg44xat4IxCE14gIpZRGUUWAx2VhItCZc25NfMA==",
28
+ "version": "4.14.186",
29
+ "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.186.tgz",
30
+ "integrity": "sha512-eHcVlLXP0c2FlMPm56ITode2AgLMSa6aJ05JTTbYbI+7EMkCEE5qk2E41d5g2lCVTqRe0GnnRFurmlCsDODrPw==",
31
31
  "dev": true
32
32
  },
33
33
  "node_modules/lodash": {
@@ -38,14 +38,14 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@kamilmielnik/trie": {
41
- "version": "1.0.3",
42
- "resolved": "https://registry.npmjs.org/@kamilmielnik/trie/-/trie-1.0.3.tgz",
43
- "integrity": "sha512-xIGglzz91BwfudrsNoxX0nRlfUrGu7Y9QxJ5RnrapLGZAer02CiVayBP00gndpkP3xjmueI9l49xb4W3JgcLXA=="
41
+ "version": "2.0.0",
42
+ "resolved": "https://registry.npmjs.org/@kamilmielnik/trie/-/trie-2.0.0.tgz",
43
+ "integrity": "sha512-YWTYtrV97bQ5hRifG1FImP47PI400a56O8+oQClQOtDjY3tioxab4sOgFHckiDdswciN1RwngCZ9Kv3phJfSuA=="
44
44
  },
45
45
  "@types/lodash": {
46
- "version": "4.14.185",
47
- "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.185.tgz",
48
- "integrity": "sha512-evMDG1bC4rgQg4ku9tKpuMh5iBNEwNa3tf9zRHdP1qlv+1WUg44xat4IxCE14gIpZRGUUWAx2VhItCZc25NfMA==",
46
+ "version": "4.14.186",
47
+ "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.186.tgz",
48
+ "integrity": "sha512-eHcVlLXP0c2FlMPm56ITode2AgLMSa6aJ05JTTbYbI+7EMkCEE5qk2E41d5g2lCVTqRe0GnnRFurmlCsDODrPw==",
49
49
  "dev": true
50
50
  },
51
51
  "lodash": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrabble-solver/solver",
3
- "version": "2.8.2",
3
+ "version": "2.8.4",
4
4
  "description": "Scrabble Solver 2 - Solver",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -24,15 +24,15 @@
24
24
  "clean:force": "npm run clean && rimraf package-lock.json"
25
25
  },
26
26
  "dependencies": {
27
- "@kamilmielnik/trie": "^1.0.3",
28
- "@scrabble-solver/types": "^2.8.2",
27
+ "@kamilmielnik/trie": "^2.0.0",
28
+ "@scrabble-solver/types": "^2.8.4",
29
29
  "lodash": "^4.17.21"
30
30
  },
31
31
  "devDependencies": {
32
- "@scrabble-solver/configs": "^2.8.2",
33
- "@scrabble-solver/constants": "^2.8.2",
34
- "@scrabble-solver/dictionaries": "^2.8.2",
35
- "@types/lodash": "^4.14.185"
32
+ "@scrabble-solver/configs": "^2.8.4",
33
+ "@scrabble-solver/constants": "^2.8.4",
34
+ "@scrabble-solver/dictionaries": "^2.8.4",
35
+ "@types/lodash": "^4.14.186"
36
36
  },
37
37
  "gitHead": "1e2d1ad49a288d4a44196d8e3336740da132c637"
38
38
  }
@@ -24,7 +24,7 @@ class PatternsFiller {
24
24
 
25
25
  for (let index = 0; index < tilesPermutations.length; ++index) {
26
26
  const tilesPermutation = tilesPermutations[index];
27
- this.fillPattern(pattern, String(pattern), tilesPermutation, onPatternFound);
27
+ this.fillPattern(pattern, pattern.toString(), tilesPermutation, onPatternFound);
28
28
  }
29
29
 
30
30
  return patterns;
@@ -45,7 +45,6 @@ class PatternsFiller {
45
45
  } else {
46
46
  for (let index = 0; index < tiles.length; ++index) {
47
47
  const tile = tiles[index];
48
- const remainingTiles = tiles.slice(0, index).concat(tiles.slice(index + 1));
49
48
  const previousTile = pattern.cells[indexOfFirstCellWithoutTile].tile;
50
49
  pattern.cells[indexOfFirstCellWithoutTile].tile = tile;
51
50
  const indexOfNextCellWithoutTile = pattern.getIndexOfFirstCellWithoutTile();
@@ -57,7 +56,9 @@ class PatternsFiller {
57
56
  onPatternFound(pattern.clone());
58
57
  }
59
58
  } else if (this.trie.hasPrefix(newWordPrefix)) {
60
- this.fillPattern(pattern, newWord, remainingTiles, onPatternFound);
59
+ tiles.splice(index, 1);
60
+ this.fillPattern(pattern, newWord, tiles, onPatternFound);
61
+ tiles.splice(index, 0, tile);
61
62
  }
62
63
  pattern.cells[indexOfFirstCellWithoutTile].tile = previousTile;
63
64
  }
@@ -65,13 +66,7 @@ class PatternsFiller {
65
66
  }
66
67
 
67
68
  public canAddPattern(pattern: Pattern, word: string): boolean {
68
- return (
69
- this.trie.has(word) &&
70
- pattern
71
- .getCollisions()
72
- .map(String)
73
- .every((collision) => this.trie.has(collision))
74
- );
69
+ return this.trie.has(word) && pattern.getCollisions().every((collision) => this.trie.has(collision.toString()));
75
70
  }
76
71
 
77
72
  public generateBlankTilesPermutations(tiles: Tile[]): Tile[][] {
@@ -66,22 +66,23 @@ class PatternsGenerator {
66
66
  cells: Cell[];
67
67
  PatternModel: new (parameters: { board: Board; cells: Cell[] }) => P;
68
68
  }): P[] {
69
- return this.generateStartIndices(cells).reduce<P[]>(
70
- (patterns, startIndex) =>
71
- patterns.concat(
72
- this.generateEndIndices(cells, startIndex).reduce<P[]>((placeablePatterns, endIndex) => {
73
- const pattern = new PatternModel({
74
- board,
75
- cells: cells.slice(startIndex, endIndex + 1),
76
- });
77
- if (pattern.canBePlaced(this.config)) {
78
- placeablePatterns.push(pattern);
79
- }
80
- return placeablePatterns;
81
- }, []),
82
- ),
83
- [],
84
- );
69
+ return this.generateStartIndices(cells).flatMap((startIndex) => {
70
+ const endIndices = this.generateEndIndices(cells, startIndex);
71
+ const patterns: P[] = [];
72
+
73
+ for (const endIndex of endIndices) {
74
+ const pattern = new PatternModel({
75
+ board,
76
+ cells: cells.slice(startIndex, endIndex + 1),
77
+ });
78
+
79
+ if (pattern.canBePlaced(this.config)) {
80
+ patterns.push(pattern);
81
+ }
82
+ }
83
+
84
+ return patterns;
85
+ });
85
86
  }
86
87
 
87
88
  public generateStartIndices(cells: Cell[]): number[] {
@@ -1,5 +1,5 @@
1
1
  import { Trie } from '@kamilmielnik/trie';
2
- import { Board, Config, Pattern, Result, Tile } from '@scrabble-solver/types';
2
+ import { Board, Config, Result, Tile } from '@scrabble-solver/types';
3
3
  import uniqBy from 'lodash/uniqBy';
4
4
 
5
5
  import PatternsFiller from './PatternsFiller';
@@ -20,13 +20,9 @@ class Solver {
20
20
  }
21
21
 
22
22
  public solve(board: Board, tiles: Tile[]): Result[] {
23
- const patterns = this.patternsGenerator
24
- .generate(board)
25
- .reduce<Pattern[]>(
26
- (filledPatterns, pattern) => filledPatterns.concat(this.patternsFiller.fill(pattern, tiles)),
27
- [],
28
- );
29
- const uniquePatterns = uniqBy(patterns, (pattern) => JSON.stringify(pattern.toJson()));
23
+ const patterns = this.patternsGenerator.generate(board);
24
+ const filledPatterns = patterns.flatMap((pattern) => this.patternsFiller.fill(pattern, tiles));
25
+ const uniquePatterns = uniqBy(filledPatterns, (pattern) => JSON.stringify(pattern.toJson()));
30
26
  const results = uniquePatterns.map(
31
27
  (pattern, index) =>
32
28
  new Result({
@@ -3,113 +3,96 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- var constants_1 = require("@scrabble-solver/constants");
7
- var Cell_1 = __importDefault(require("./Cell"));
8
- var Tile_1 = __importDefault(require("./Tile"));
9
- var Board = /** @class */ (function () {
10
- function Board(_a) {
11
- var rows = _a.rows;
6
+ const constants_1 = require("@scrabble-solver/constants");
7
+ const Cell_1 = __importDefault(require("./Cell"));
8
+ const Tile_1 = __importDefault(require("./Tile"));
9
+ class Board {
10
+ constructor({ rows }) {
12
11
  this.rows = rows;
13
12
  this.numberOfColumns = rows[0].length;
14
13
  this.numberOfRows = rows.length;
15
14
  }
16
- Board.create = function (width, height) {
15
+ static create(width, height) {
17
16
  return Board.fromStringArray(Array(height).fill(Array(width).fill(' ').join('')));
18
- };
19
- Board.fromJson = function (json) {
17
+ }
18
+ static fromJson(json) {
20
19
  return new Board({
21
- rows: json.map(function (row) { return row.map(Cell_1.default.fromJson); }),
20
+ rows: json.map((row) => row.map(Cell_1.default.fromJson)),
22
21
  });
23
- };
24
- Board.fromStringArray = function (stringArray) {
22
+ }
23
+ static fromStringArray(stringArray) {
25
24
  return new Board({
26
- rows: stringArray.map(function (row, y) {
27
- return row.split('').map(function (character, x) {
28
- return new Cell_1.default({
29
- isEmpty: !character || character === constants_1.EMPTY_CELL,
30
- tile: character === constants_1.EMPTY_CELL ? Tile_1.default.Null : new Tile_1.default({ character: character }),
31
- x: x,
32
- y: y,
33
- });
34
- });
35
- }),
25
+ rows: stringArray.map((row, y) => row.split('').map((character, x) => new Cell_1.default({
26
+ isEmpty: !character || character === constants_1.EMPTY_CELL,
27
+ tile: character === constants_1.EMPTY_CELL ? Tile_1.default.Null : new Tile_1.default({ character }),
28
+ x,
29
+ y,
30
+ }))),
36
31
  });
37
- };
38
- Object.defineProperty(Board.prototype, "center", {
39
- get: function () {
40
- var x = Math.floor(this.numberOfColumns / 2);
41
- var y = Math.floor(this.numberOfRows / 2);
42
- return this.rows[y][x];
43
- },
44
- enumerable: false,
45
- configurable: true
46
- });
47
- Board.prototype.clone = function () {
48
- var rows = this.rows.map(function (row) { return row.map(function (cell) { return cell.clone(); }); });
49
- return new Board({ rows: rows });
50
- };
51
- Board.prototype.collides = function (cell) {
32
+ }
33
+ get center() {
34
+ const x = Math.floor(this.numberOfColumns / 2);
35
+ const y = Math.floor(this.numberOfRows / 2);
36
+ return this.rows[y][x];
37
+ }
38
+ clone() {
39
+ const rows = this.rows.map((row) => row.map((cell) => cell.clone()));
40
+ return new Board({ rows });
41
+ }
42
+ collides(cell) {
52
43
  return this.collidesUp(cell) || this.collidesDown(cell) || this.collidesLeft(cell) || this.collidesRight(cell);
53
- };
54
- Board.prototype.collidesDown = function (_a) {
55
- var x = _a.x, y = _a.y;
44
+ }
45
+ collidesDown({ x, y }) {
56
46
  return y < this.numberOfRows - 1 && !this.rows[y + 1][x].isEmpty;
57
- };
58
- Board.prototype.collidesLeft = function (_a) {
59
- var x = _a.x, y = _a.y;
47
+ }
48
+ collidesLeft({ x, y }) {
60
49
  return x > 0 && !this.rows[y][x - 1].isEmpty;
61
- };
62
- Board.prototype.collidesRight = function (_a) {
63
- var x = _a.x, y = _a.y;
50
+ }
51
+ collidesRight({ x, y }) {
64
52
  return x < this.numberOfColumns - 1 && !this.rows[y][x + 1].isEmpty;
65
- };
66
- Board.prototype.collidesUp = function (_a) {
67
- var x = _a.x, y = _a.y;
53
+ }
54
+ collidesUp({ x, y }) {
68
55
  return y > 0 && !this.rows[y - 1][x].isEmpty;
69
- };
70
- Board.prototype.equals = function (other) {
56
+ }
57
+ equals(other) {
71
58
  return (this.numberOfColumns === other.numberOfColumns &&
72
59
  this.numberOfRows === other.numberOfRows &&
73
- this.rows.every(function (row, rowIndex) {
74
- return row.every(function (cell, cellIndex) {
60
+ this.rows.every((row, rowIndex) => {
61
+ return row.every((cell, cellIndex) => {
75
62
  return cell.equals(other.rows[rowIndex][cellIndex]);
76
63
  });
77
64
  }));
78
- };
79
- Board.prototype.getBlanksCount = function () {
80
- return this.rows.reduce(function (count, row) {
81
- return count + row.reduce(function (rowCount, cell) { return (cell.tile.isBlank ? rowCount + 1 : rowCount); }, 0);
65
+ }
66
+ getBlanksCount() {
67
+ return this.rows.reduce((count, row) => {
68
+ return count + row.reduce((rowCount, cell) => (cell.tile.isBlank ? rowCount + 1 : rowCount), 0);
82
69
  }, 0);
83
- };
84
- Board.prototype.getColumn = function (index) {
85
- return this.rows.map(function (row) { return row[index]; });
86
- };
87
- Board.prototype.getRow = function (index) {
70
+ }
71
+ getColumn(index) {
72
+ return this.rows.map((row) => row[index]);
73
+ }
74
+ getRow(index) {
88
75
  return this.rows[index];
89
- };
90
- Board.prototype.getTilesCount = function () {
91
- return this.rows.reduce(function (count, row) {
92
- return count + row.reduce(function (rowCount, cell) { return (cell.hasTile() ? rowCount + 1 : rowCount); }, 0);
76
+ }
77
+ getTilesCount() {
78
+ return this.rows.reduce((count, row) => {
79
+ return count + row.reduce((rowCount, cell) => (cell.hasTile() ? rowCount + 1 : rowCount), 0);
93
80
  }, 0);
94
- };
95
- Board.prototype.isEmpty = function () {
96
- return this.rows.every(function (row) { return row.every(function (_a) {
97
- var isEmpty = _a.isEmpty;
98
- return isEmpty;
99
- }); });
100
- };
101
- Board.prototype.toJson = function () {
102
- return this.rows.map(function (row) { return row.map(function (cell) { return cell.toJson(); }); });
103
- };
104
- Board.prototype.toString = function () {
105
- return this.rows.map(function (row) { return row.map(String); }).join('\n');
106
- };
107
- Board.prototype.updateCell = function (x, y, updateCell) {
81
+ }
82
+ isEmpty() {
83
+ return this.rows.every((row) => row.every(({ isEmpty }) => isEmpty));
84
+ }
85
+ toJson() {
86
+ return this.rows.map((row) => row.map((cell) => cell.toJson()));
87
+ }
88
+ toString() {
89
+ return this.rows.map((row) => row.map(String)).join('\n');
90
+ }
91
+ updateCell(x, y, updateCell) {
108
92
  this.rows[y][x] = updateCell(this.rows[y][x]);
109
- };
110
- Board.prototype.updateRow = function (y, updateRow) {
93
+ }
94
+ updateRow(y, updateRow) {
111
95
  this.rows[y] = updateRow(this.rows[y]);
112
- };
113
- return Board;
114
- }());
96
+ }
97
+ }
115
98
  exports.default = Board;