@scrabble-solver/types 2.8.2 → 2.8.3

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.
package/build/Board.js CHANGED
@@ -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;
package/build/Bonus.js CHANGED
@@ -1,20 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var Bonus = /** @class */ (function () {
4
- function Bonus(_a) {
5
- var multiplier = _a.multiplier, score = _a.score, x = _a.x, y = _a.y;
3
+ class Bonus {
4
+ constructor({ multiplier, score, x, y }) {
6
5
  this.multiplier = multiplier;
7
6
  this.score = score;
8
7
  this.x = x;
9
8
  this.y = y;
10
9
  }
11
- Bonus.prototype.canApply = function (_config, cell) {
10
+ canApply(_config, cell) {
12
11
  return cell.isEmpty && this.matchesCellCoordinates(cell);
13
- };
14
- Bonus.prototype.matchesCellCoordinates = function (cell) {
12
+ }
13
+ matchesCellCoordinates(cell) {
15
14
  return this.x === cell.x && this.y === cell.y;
16
- };
17
- Bonus.prototype.toJson = function () {
15
+ }
16
+ toJson() {
18
17
  return {
19
18
  multiplier: this.multiplier,
20
19
  score: this.score,
@@ -22,17 +21,12 @@ var Bonus = /** @class */ (function () {
22
21
  x: this.x,
23
22
  y: this.y,
24
23
  };
25
- };
26
- Object.defineProperty(Bonus.prototype, "value", {
27
- get: function () {
28
- return {
29
- characterMultiplier: 1,
30
- wordMultiplier: 1,
31
- };
32
- },
33
- enumerable: false,
34
- configurable: true
35
- });
36
- return Bonus;
37
- }());
24
+ }
25
+ get value() {
26
+ return {
27
+ characterMultiplier: 1,
28
+ wordMultiplier: 1,
29
+ };
30
+ }
31
+ }
38
32
  exports.default = Bonus;
package/build/Cell.js CHANGED
@@ -3,17 +3,16 @@ 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 Tile_1 = __importDefault(require("./Tile"));
7
- var Cell = /** @class */ (function () {
6
+ const Tile_1 = __importDefault(require("./Tile"));
7
+ class Cell {
8
8
  // eslint-disable-next-line no-undef
9
- function Cell(_a) {
10
- var _b = _a.isEmpty, isEmpty = _b === void 0 ? true : _b, _c = _a.tile, tile = _c === void 0 ? Tile_1.default.Null : _c, x = _a.x, y = _a.y;
9
+ constructor({ isEmpty = true, tile = Tile_1.default.Null, x, y }) {
11
10
  this.isEmpty = isEmpty;
12
11
  this.tile = tile;
13
12
  this.x = x;
14
13
  this.y = y;
15
14
  }
16
- Cell.fromJson = function (json) {
15
+ static fromJson(json) {
17
16
  if (!json) {
18
17
  return Cell.Null;
19
18
  }
@@ -23,47 +22,46 @@ var Cell = /** @class */ (function () {
23
22
  x: json.x,
24
23
  y: json.y,
25
24
  });
26
- };
27
- Cell.prototype.clone = function () {
25
+ }
26
+ clone() {
28
27
  return new Cell({
29
28
  isEmpty: this.isEmpty,
30
29
  tile: this.tile.clone(),
31
30
  x: this.x,
32
31
  y: this.y,
33
32
  });
34
- };
35
- Cell.prototype.equals = function (other) {
33
+ }
34
+ equals(other) {
36
35
  return this.x === other.x && this.y === other.y && this.isEmpty === other.isEmpty && this.tile.equals(other.tile);
37
- };
38
- Cell.prototype.hasTile = function () {
36
+ }
37
+ hasTile() {
39
38
  return this.tile !== Tile_1.default.Null;
40
- };
41
- Cell.prototype.isCandidate = function () {
39
+ }
40
+ isCandidate() {
42
41
  return this.isEmpty && this.hasTile();
43
- };
44
- Cell.prototype.toJson = function () {
42
+ }
43
+ toJson() {
45
44
  return {
46
45
  isEmpty: this.isEmpty,
47
46
  tile: this.tile.toJson(),
48
47
  x: this.x,
49
48
  y: this.y,
50
49
  };
51
- };
52
- Cell.prototype.toString = function () {
50
+ }
51
+ toString() {
53
52
  return String(this.tile);
54
- };
55
- Cell.Null = Object.freeze({
56
- isEmpty: true,
57
- tile: Tile_1.default.Null,
58
- x: 0,
59
- y: 0,
60
- clone: function () { return Cell.Null; },
61
- equals: function (other) { return other === Cell.Null; },
62
- hasTile: function () { return false; },
63
- isCandidate: function () { return false; },
64
- toString: function () { return ''; },
65
- toJson: function () { return null; },
66
- });
67
- return Cell;
68
- }());
53
+ }
54
+ }
55
+ Cell.Null = Object.freeze({
56
+ isEmpty: true,
57
+ tile: Tile_1.default.Null,
58
+ x: 0,
59
+ y: 0,
60
+ clone: () => Cell.Null,
61
+ equals: (other) => other === Cell.Null,
62
+ hasTile: () => false,
63
+ isCandidate: () => false,
64
+ toString: () => '',
65
+ toJson: () => null,
66
+ });
69
67
  exports.default = Cell;
@@ -1,51 +1,29 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
18
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
19
4
  };
20
5
  Object.defineProperty(exports, "__esModule", { value: true });
21
- var constants_1 = require("@scrabble-solver/constants");
22
- var Bonus_1 = __importDefault(require("./Bonus"));
23
- var CharacterBonus = /** @class */ (function (_super) {
24
- __extends(CharacterBonus, _super);
25
- function CharacterBonus() {
26
- var _this = _super !== null && _super.apply(this, arguments) || this;
27
- _this.type = constants_1.BONUS_CHARACTER;
28
- return _this;
6
+ const constants_1 = require("@scrabble-solver/constants");
7
+ const Bonus_1 = __importDefault(require("./Bonus"));
8
+ class CharacterBonus extends Bonus_1.default {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.type = constants_1.BONUS_CHARACTER;
29
12
  }
30
- CharacterBonus.prototype.canApply = function (config, cell) {
31
- return _super.prototype.canApply.call(this, config, cell) && this.matchesCellTileScore(config, cell);
32
- };
33
- CharacterBonus.prototype.matchesCellTileScore = function (config, cell) {
13
+ canApply(config, cell) {
14
+ return super.canApply(config, cell) && this.matchesCellTileScore(config, cell);
15
+ }
16
+ matchesCellTileScore(config, cell) {
34
17
  if (typeof this.score === 'undefined') {
35
18
  return true;
36
19
  }
37
20
  return this.score === config.pointsMap[cell.tile.character];
38
- };
39
- Object.defineProperty(CharacterBonus.prototype, "value", {
40
- get: function () {
41
- return {
42
- characterMultiplier: this.multiplier,
43
- wordMultiplier: 1,
44
- };
45
- },
46
- enumerable: false,
47
- configurable: true
48
- });
49
- return CharacterBonus;
50
- }(Bonus_1.default));
21
+ }
22
+ get value() {
23
+ return {
24
+ characterMultiplier: this.multiplier,
25
+ wordMultiplier: 1,
26
+ };
27
+ }
28
+ }
51
29
  exports.default = CharacterBonus;
package/build/Config.js CHANGED
@@ -1,81 +1,45 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
14
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
4
  };
16
5
  Object.defineProperty(exports, "__esModule", { value: true });
17
- var constants_1 = require("@scrabble-solver/constants");
18
- var CharacterBonus_1 = __importDefault(require("./CharacterBonus"));
19
- var WordBonus_1 = __importDefault(require("./WordBonus"));
20
- var Config = /** @class */ (function () {
21
- function Config(config) {
6
+ const constants_1 = require("@scrabble-solver/constants");
7
+ const CharacterBonus_1 = __importDefault(require("./CharacterBonus"));
8
+ const WordBonus_1 = __importDefault(require("./WordBonus"));
9
+ class Config {
10
+ constructor(config) {
22
11
  this.bonuses = getBonuses(config);
23
12
  this.config = config;
24
13
  this.pointsMap = getPointsMap(this.config);
25
14
  }
26
- Config.fromJson = function (json) {
15
+ static fromJson(json) {
27
16
  return new Config(json);
28
- };
29
- Object.defineProperty(Config.prototype, "allTilesBonusScore", {
30
- get: function () {
31
- return this.config.allTilesBonusScore;
32
- },
33
- enumerable: false,
34
- configurable: true
35
- });
36
- Object.defineProperty(Config.prototype, "alphabet", {
37
- get: function () {
38
- return getAlphabet(this.config);
39
- },
40
- enumerable: false,
41
- configurable: true
42
- });
43
- Object.defineProperty(Config.prototype, "blankScore", {
44
- get: function () {
45
- return this.config.blankScore;
46
- },
47
- enumerable: false,
48
- configurable: true
49
- });
50
- Object.defineProperty(Config.prototype, "boardHeight", {
51
- get: function () {
52
- return this.config.boardHeight;
53
- },
54
- enumerable: false,
55
- configurable: true
56
- });
57
- Object.defineProperty(Config.prototype, "boardWidth", {
58
- get: function () {
59
- return this.config.boardWidth;
60
- },
61
- enumerable: false,
62
- configurable: true
63
- });
64
- Object.defineProperty(Config.prototype, "twoCharacterTiles", {
65
- get: function () {
66
- return this.config.tiles.filter(function (tile) { return tile.character.length === 2; }).map(function (tile) { return tile.character; });
67
- },
68
- enumerable: false,
69
- configurable: true
70
- });
71
- Config.prototype.getCellBonus = function (cell) {
72
- return this.bonuses.find(function (bonus) { return bonus.matchesCellCoordinates(cell); });
73
- };
74
- Config.prototype.getCellBonusValue = function (cell) {
75
- var _a;
76
- return ((_a = this.getCellBonus(cell)) === null || _a === void 0 ? void 0 : _a.value) || constants_1.NO_BONUS;
77
- };
78
- Config.prototype.getCharacterPoints = function (character) {
17
+ }
18
+ get allTilesBonusScore() {
19
+ return this.config.allTilesBonusScore;
20
+ }
21
+ get alphabet() {
22
+ return getAlphabet(this.config);
23
+ }
24
+ get blankScore() {
25
+ return this.config.blankScore;
26
+ }
27
+ get boardHeight() {
28
+ return this.config.boardHeight;
29
+ }
30
+ get boardWidth() {
31
+ return this.config.boardWidth;
32
+ }
33
+ get twoCharacterTiles() {
34
+ return this.config.tiles.filter((tile) => tile.character.length === 2).map((tile) => tile.character);
35
+ }
36
+ getCellBonus(cell) {
37
+ return this.bonuses.find((bonus) => bonus.matchesCellCoordinates(cell));
38
+ }
39
+ getCellBonusValue(cell) {
40
+ return this.getCellBonus(cell)?.value || constants_1.NO_BONUS;
41
+ }
42
+ getCharacterPoints(character) {
79
43
  if (character === null) {
80
44
  return undefined;
81
45
  }
@@ -83,71 +47,52 @@ var Config = /** @class */ (function () {
83
47
  return this.blankScore;
84
48
  }
85
49
  return this.pointsMap[character];
86
- };
87
- Config.prototype.getTwoCharacterTileByPrefix = function (character) {
50
+ }
51
+ getTwoCharacterTileByPrefix(character) {
88
52
  if (character.length !== 1) {
89
53
  return undefined;
90
54
  }
91
- return this.twoCharacterTiles.find(function (characters) { return characters.startsWith(character); });
92
- };
93
- Config.prototype.getTilePoints = function (tile) {
55
+ return this.twoCharacterTiles.find((characters) => characters.startsWith(character));
56
+ }
57
+ getTilePoints(tile) {
94
58
  if (tile === null) {
95
59
  return undefined;
96
60
  }
97
61
  return tile.isBlank ? this.blankScore : this.getCharacterPoints(tile.character);
98
- };
99
- Config.prototype.hasCharacter = function (character) {
62
+ }
63
+ hasCharacter(character) {
100
64
  return this.alphabet.includes(character);
101
- };
102
- Config.prototype.isTwoCharacterTilePrefix = function (character) {
65
+ }
66
+ isTwoCharacterTilePrefix(character) {
103
67
  return typeof this.getTwoCharacterTileByPrefix(character) !== 'undefined';
104
- };
105
- Object.defineProperty(Config.prototype, "maximumNumberOfCharacters", {
106
- get: function () {
107
- return this.config.maximumNumberOfCharacters;
108
- },
109
- enumerable: false,
110
- configurable: true
111
- });
112
- Object.defineProperty(Config.prototype, "numberOfBlanks", {
113
- get: function () {
114
- return this.config.numberOfBlanks;
115
- },
116
- enumerable: false,
117
- configurable: true
118
- });
119
- Object.defineProperty(Config.prototype, "tiles", {
120
- get: function () {
121
- return this.config.tiles;
122
- },
123
- enumerable: false,
124
- configurable: true
125
- });
126
- Config.prototype.toJson = function () {
68
+ }
69
+ get maximumNumberOfCharacters() {
70
+ return this.config.maximumNumberOfCharacters;
71
+ }
72
+ get numberOfBlanks() {
73
+ return this.config.numberOfBlanks;
74
+ }
75
+ get tiles() {
76
+ return this.config.tiles;
77
+ }
78
+ toJson() {
127
79
  return this.config;
128
- };
129
- return Config;
130
- }());
131
- var getBonuses = function (config) {
132
- return config.bonuses.map(function (bonus) {
80
+ }
81
+ }
82
+ const getBonuses = (config) => {
83
+ return config.bonuses.map((bonus) => {
133
84
  if (bonus.type === constants_1.BONUS_CHARACTER) {
134
85
  return new CharacterBonus_1.default(bonus);
135
86
  }
136
87
  if (bonus.type === constants_1.BONUS_WORD) {
137
88
  return new WordBonus_1.default(bonus);
138
89
  }
139
- throw new Error("Unsupported Bonus type: \"".concat(bonus.type, "\""));
90
+ throw new Error(`Unsupported Bonus type: "${bonus.type}"`);
140
91
  });
141
92
  };
142
- var getAlphabet = function (config) { return config.tiles.map(function (_a) {
143
- var character = _a.character;
144
- return character;
145
- }); };
146
- var getPointsMap = function (config) {
147
- return config.tiles.reduce(function (pointsMap, _a) {
148
- var _b;
149
- var character = _a.character, score = _a.score;
150
- return (__assign(__assign({}, pointsMap), (_b = {}, _b[character] = score, _b)));
151
- }, {});
152
- };
93
+ const getAlphabet = (config) => config.tiles.map(({ character }) => character);
94
+ const getPointsMap = (config) => config.tiles.reduce((pointsMap, { character, score }) => ({
95
+ ...pointsMap,
96
+ [character]: score,
97
+ }), {});
153
98
  exports.default = Config;
@@ -1,85 +1,39 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __read = (this && this.__read) || function (o, n) {
18
- var m = typeof Symbol === "function" && o[Symbol.iterator];
19
- if (!m) return o;
20
- var i = m.call(o), r, ar = [], e;
21
- try {
22
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
23
- }
24
- catch (error) { e = { error: error }; }
25
- finally {
26
- try {
27
- if (r && !r.done && (m = i["return"])) m.call(i);
28
- }
29
- finally { if (e) throw e.error; }
30
- }
31
- return ar;
32
- };
33
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
34
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
35
- if (ar || !(i in from)) {
36
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
37
- ar[i] = from[i];
38
- }
39
- }
40
- return to.concat(ar || Array.prototype.slice.call(from));
41
- };
42
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
43
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
44
4
  };
45
5
  Object.defineProperty(exports, "__esModule", { value: true });
46
- var Pattern_1 = __importDefault(require("./Pattern"));
47
- var HorizontalPattern = /** @class */ (function (_super) {
48
- __extends(HorizontalPattern, _super);
49
- function HorizontalPattern() {
50
- return _super !== null && _super.apply(this, arguments) || this;
51
- }
52
- HorizontalPattern.prototype.clone = function () {
6
+ const Pattern_1 = __importDefault(require("./Pattern"));
7
+ class HorizontalPattern extends Pattern_1.default {
8
+ clone() {
53
9
  return new HorizontalPattern({
54
10
  board: this.board,
55
- cells: this.cells.map(function (cell) { return cell.clone(); }),
11
+ cells: this.cells.map((cell) => cell.clone()),
56
12
  });
57
- };
58
- HorizontalPattern.prototype.getCollisions = function () {
59
- var _this = this;
60
- var collisions = [];
13
+ }
14
+ getCollisions() {
15
+ const collisions = [];
61
16
  this.cells
62
- .filter(function (cell) { return cell.isEmpty && (_this.board.collidesUp(cell) || _this.board.collidesDown(cell)); })
63
- .forEach(function (cell) {
64
- var column = _this.board.getColumn(cell.x);
65
- var y = cell.y - 1;
17
+ .filter((cell) => cell.isEmpty && (this.board.collidesUp(cell) || this.board.collidesDown(cell)))
18
+ .forEach((cell) => {
19
+ const column = this.board.getColumn(cell.x);
20
+ let y = cell.y - 1;
66
21
  while (y >= 0 && column[y].hasTile()) {
67
22
  --y;
68
23
  }
69
- var previousCells = column.slice(y + 1, cell.y);
24
+ const previousCells = column.slice(y + 1, cell.y);
70
25
  y = cell.y + 1;
71
26
  while (y < column.length && column[y].hasTile()) {
72
27
  ++y;
73
28
  }
74
- var nextCells = column.slice(cell.y + 1, y);
75
- var cells = __spreadArray(__spreadArray(__spreadArray([], __read(previousCells), false), [cell], false), __read(nextCells), false);
29
+ const nextCells = column.slice(cell.y + 1, y);
30
+ const cells = [...previousCells, cell, ...nextCells];
76
31
  if (cells.length > 1) {
77
- var pattern = new Pattern_1.default({ board: _this.board, cells: cells });
32
+ const pattern = new Pattern_1.default({ board: this.board, cells });
78
33
  collisions.push(pattern);
79
34
  }
80
35
  });
81
36
  return collisions;
82
- };
83
- return HorizontalPattern;
84
- }(Pattern_1.default));
37
+ }
38
+ }
85
39
  exports.default = HorizontalPattern;
package/build/Pattern.js CHANGED
@@ -1,56 +1,52 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var Pattern = /** @class */ (function () {
4
- function Pattern(_a) {
5
- var board = _a.board, cells = _a.cells;
3
+ class Pattern {
4
+ constructor({ board, cells }) {
6
5
  this.board = board;
7
6
  this.cells = cells;
8
7
  }
9
- Pattern.prototype.canBePlaced = function (config) {
10
- var numberOfEmptyCells = this.getNumberOfEmptyCells();
11
- var isNumberOfUsedCellsInRange = numberOfEmptyCells >= 1 && numberOfEmptyCells <= config.maximumNumberOfCharacters;
8
+ canBePlaced(config) {
9
+ const numberOfEmptyCells = this.getNumberOfEmptyCells();
10
+ const isNumberOfUsedCellsInRange = numberOfEmptyCells >= 1 && numberOfEmptyCells <= config.maximumNumberOfCharacters;
12
11
  return (isNumberOfUsedCellsInRange &&
13
12
  (this.hasAtLeast1NonEmptyCell() || this.collides() || (this.goesThroughBoardCenter() && this.board.isEmpty())));
14
- };
15
- Pattern.prototype.clone = function () {
13
+ }
14
+ clone() {
16
15
  return new Pattern({
17
16
  board: this.board,
18
- cells: this.cells.map(function (cell) { return cell.clone(); }),
17
+ cells: this.cells.map((cell) => cell.clone()),
19
18
  });
20
- };
21
- Pattern.prototype.collides = function () {
22
- var _this = this;
23
- return this.cells.some(function (cell) { return cell.isEmpty && _this.board.collides(cell); });
24
- };
25
- Pattern.prototype.getIndexOfFirstCellWithoutTile = function () {
26
- return this.cells.findIndex(function (cell) { return !cell.hasTile(); });
27
- };
28
- Pattern.prototype.getNumberOfEmptyCells = function () {
29
- return this.cells.filter(function (cell) { return cell.isEmpty; }).length;
30
- };
31
- Pattern.prototype.goesThroughBoardCenter = function () {
32
- var _this = this;
33
- return this.cells.some(function (cell) { return cell.x === _this.board.center.x && cell.y === _this.board.center.y && cell.isEmpty; });
34
- };
35
- Pattern.prototype.hasAtLeast1EmptyCell = function () {
36
- return this.cells.some(function (cell) { return cell.isEmpty; });
37
- };
38
- Pattern.prototype.hasAtLeast1NonEmptyCell = function () {
39
- return this.cells.some(function (cell) { return !cell.isEmpty; });
40
- };
41
- Pattern.prototype.getCollisions = function () {
19
+ }
20
+ collides() {
21
+ return this.cells.some((cell) => cell.isEmpty && this.board.collides(cell));
22
+ }
23
+ getIndexOfFirstCellWithoutTile() {
24
+ return this.cells.findIndex((cell) => !cell.hasTile());
25
+ }
26
+ getNumberOfEmptyCells() {
27
+ return this.cells.filter((cell) => cell.isEmpty).length;
28
+ }
29
+ goesThroughBoardCenter() {
30
+ return this.cells.some((cell) => cell.x === this.board.center.x && cell.y === this.board.center.y && cell.isEmpty);
31
+ }
32
+ hasAtLeast1EmptyCell() {
33
+ return this.cells.some((cell) => cell.isEmpty);
34
+ }
35
+ hasAtLeast1NonEmptyCell() {
36
+ return this.cells.some((cell) => !cell.isEmpty);
37
+ }
38
+ getCollisions() {
42
39
  return [];
43
- };
44
- Pattern.prototype.toJson = function () {
40
+ }
41
+ toJson() {
45
42
  return {
46
- cells: this.cells.map(function (cell) { return cell.toJson(); }),
47
- collisions: this.getCollisions().map(function (collision) { return collision.toJson(); }),
43
+ cells: this.cells.map((cell) => cell.toJson()),
44
+ collisions: this.getCollisions().map((collision) => collision.toJson()),
48
45
  word: this.toString(),
49
46
  };
50
- };
51
- Pattern.prototype.toString = function () {
47
+ }
48
+ toString() {
52
49
  return this.cells.map(String).join('');
53
- };
54
- return Pattern;
55
- }());
50
+ }
51
+ }
56
52
  exports.default = Pattern;
package/build/Result.js CHANGED
@@ -3,12 +3,11 @@ 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 Result = /** @class */ (function () {
9
- function Result(_a) {
10
- var cells = _a.cells, id = _a.id, numberOfCollisions = _a.numberOfCollisions, points = _a.points;
11
- var tiles = getTiles(cells);
6
+ const constants_1 = require("@scrabble-solver/constants");
7
+ const Cell_1 = __importDefault(require("./Cell"));
8
+ class Result {
9
+ constructor({ cells, id, numberOfCollisions, points, }) {
10
+ const tiles = getTiles(cells);
12
11
  this.cells = cells;
13
12
  this.id = id;
14
13
  this.length = cells.length;
@@ -24,55 +23,33 @@ var Result = /** @class */ (function () {
24
23
  this.tilesCharacters = getTilesCharacters(tiles);
25
24
  this.word = getWord(cells);
26
25
  }
27
- Result.fromJson = function (json) {
26
+ static fromJson(json) {
28
27
  return new Result({
29
28
  cells: json.cells.map(Cell_1.default.fromJson),
30
29
  id: json.id,
31
30
  numberOfCollisions: json.numberOfCollisions,
32
31
  points: json.points,
33
32
  });
34
- };
35
- Result.prototype.toJson = function () {
33
+ }
34
+ toJson() {
36
35
  return {
37
- cells: this.cells.map(function (cell) { return cell.toJson(); }),
36
+ cells: this.cells.map((cell) => cell.toJson()),
38
37
  id: this.id,
39
38
  numberOfCollisions: this.numberOfCollisions,
40
39
  points: this.points,
41
40
  };
42
- };
43
- return Result;
44
- }());
45
- var charactersComparator = function (a, b) { return a.localeCompare(b); };
46
- var getBlanks = function (tiles) { return tiles.filter(function (_a) {
47
- var isBlank = _a.isBlank;
48
- return isBlank;
49
- }); };
50
- var getConsonants = function (tiles) { return tiles.filter(isConsonant); };
51
- var getVowels = function (tiles) { return tiles.filter(isVowel); };
52
- var getNonBlankCharacters = function (tiles) { return getNonBlanks(tiles).map(function (_a) {
53
- var character = _a.character;
54
- return character;
55
- }); };
56
- var getNonBlanks = function (tiles) { return tiles.filter(function (_a) {
57
- var isBlank = _a.isBlank;
58
- return !isBlank;
59
- }); };
60
- var getPointsRatio = function (tiles, points) { return points / tiles.length; };
61
- var getTiles = function (cells) { return cells.filter(function (_a) {
62
- var isEmpty = _a.isEmpty;
63
- return isEmpty;
64
- }).map(function (_a) {
65
- var tile = _a.tile;
66
- return tile;
67
- }); };
68
- var getTilesCharacters = function (tiles) { return getNonBlankCharacters(tiles).sort(charactersComparator).join(''); };
69
- var getWord = function (cells) { return cells.map(String).join(''); };
70
- var isConsonant = function (_a) {
71
- var character = _a.character, isBlank = _a.isBlank;
72
- return constants_1.CONSONANTS.includes(character) && !isBlank;
73
- };
74
- var isVowel = function (_a) {
75
- var character = _a.character, isBlank = _a.isBlank;
76
- return constants_1.VOWELS.includes(character) && !isBlank;
77
- };
41
+ }
42
+ }
43
+ const charactersComparator = (a, b) => a.localeCompare(b);
44
+ const getBlanks = (tiles) => tiles.filter(({ isBlank }) => isBlank);
45
+ const getConsonants = (tiles) => tiles.filter(isConsonant);
46
+ const getVowels = (tiles) => tiles.filter(isVowel);
47
+ const getNonBlankCharacters = (tiles) => getNonBlanks(tiles).map(({ character }) => character);
48
+ const getNonBlanks = (tiles) => tiles.filter(({ isBlank }) => !isBlank);
49
+ const getPointsRatio = (tiles, points) => points / tiles.length;
50
+ const getTiles = (cells) => cells.filter(({ isEmpty }) => isEmpty).map(({ tile }) => tile);
51
+ const getTilesCharacters = (tiles) => getNonBlankCharacters(tiles).sort(charactersComparator).join('');
52
+ const getWord = (cells) => cells.map(String).join('');
53
+ const isConsonant = ({ character, isBlank }) => constants_1.CONSONANTS.includes(character) && !isBlank;
54
+ const isVowel = ({ character, isBlank }) => constants_1.VOWELS.includes(character) && !isBlank;
78
55
  exports.default = Result;
package/build/Tile.js CHANGED
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var constants_1 = require("@scrabble-solver/constants");
4
- var Tile = /** @class */ (function () {
5
- function Tile(_a) {
6
- var character = _a.character, _b = _a.isBlank, isBlank = _b === void 0 ? false : _b;
3
+ const constants_1 = require("@scrabble-solver/constants");
4
+ class Tile {
5
+ constructor({ character, isBlank = false }) {
7
6
  this.character = character;
8
7
  this.isBlank = isBlank;
9
8
  }
10
- Tile.fromJson = function (json) {
9
+ static fromJson(json) {
11
10
  if (!json) {
12
11
  return Tile.Null;
13
12
  }
@@ -15,33 +14,32 @@ var Tile = /** @class */ (function () {
15
14
  character: json.character,
16
15
  isBlank: json.isBlank,
17
16
  });
18
- };
19
- Tile.prototype.clone = function () {
17
+ }
18
+ clone() {
20
19
  return new Tile({
21
20
  character: this.character,
22
21
  isBlank: this.isBlank,
23
22
  });
24
- };
25
- Tile.prototype.equals = function (other) {
23
+ }
24
+ equals(other) {
26
25
  return this.character === other.character && this.isBlank === other.isBlank;
27
- };
28
- Tile.prototype.toJson = function () {
26
+ }
27
+ toJson() {
29
28
  return {
30
29
  character: this.character,
31
30
  isBlank: this.isBlank,
32
31
  };
33
- };
34
- Tile.prototype.toString = function () {
32
+ }
33
+ toString() {
35
34
  return this.character;
36
- };
37
- Tile.Null = Object.freeze({
38
- character: constants_1.EMPTY_CELL,
39
- isBlank: false,
40
- clone: function () { return Tile.Null; },
41
- equals: function (other) { return other === Tile.Null; },
42
- toJson: function () { return null; },
43
- toString: function () { return constants_1.EMPTY_CELL; },
44
- });
45
- return Tile;
46
- }());
35
+ }
36
+ }
37
+ Tile.Null = Object.freeze({
38
+ character: constants_1.EMPTY_CELL,
39
+ isBlank: false,
40
+ clone: () => Tile.Null,
41
+ equals: (other) => other === Tile.Null,
42
+ toJson: () => null,
43
+ toString: () => constants_1.EMPTY_CELL,
44
+ });
47
45
  exports.default = Tile;
@@ -1,85 +1,39 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __read = (this && this.__read) || function (o, n) {
18
- var m = typeof Symbol === "function" && o[Symbol.iterator];
19
- if (!m) return o;
20
- var i = m.call(o), r, ar = [], e;
21
- try {
22
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
23
- }
24
- catch (error) { e = { error: error }; }
25
- finally {
26
- try {
27
- if (r && !r.done && (m = i["return"])) m.call(i);
28
- }
29
- finally { if (e) throw e.error; }
30
- }
31
- return ar;
32
- };
33
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
34
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
35
- if (ar || !(i in from)) {
36
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
37
- ar[i] = from[i];
38
- }
39
- }
40
- return to.concat(ar || Array.prototype.slice.call(from));
41
- };
42
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
43
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
44
4
  };
45
5
  Object.defineProperty(exports, "__esModule", { value: true });
46
- var Pattern_1 = __importDefault(require("./Pattern"));
47
- var VerticalPattern = /** @class */ (function (_super) {
48
- __extends(VerticalPattern, _super);
49
- function VerticalPattern() {
50
- return _super !== null && _super.apply(this, arguments) || this;
51
- }
52
- VerticalPattern.prototype.clone = function () {
6
+ const Pattern_1 = __importDefault(require("./Pattern"));
7
+ class VerticalPattern extends Pattern_1.default {
8
+ clone() {
53
9
  return new VerticalPattern({
54
10
  board: this.board,
55
- cells: this.cells.map(function (cell) { return cell.clone(); }),
11
+ cells: this.cells.map((cell) => cell.clone()),
56
12
  });
57
- };
58
- VerticalPattern.prototype.getCollisions = function () {
59
- var _this = this;
60
- var collisions = [];
13
+ }
14
+ getCollisions() {
15
+ const collisions = [];
61
16
  this.cells
62
- .filter(function (cell) { return cell.isEmpty && (_this.board.collidesLeft(cell) || _this.board.collidesRight(cell)); })
63
- .forEach(function (cell) {
64
- var row = _this.board.getRow(cell.y);
65
- var x = cell.x - 1;
17
+ .filter((cell) => cell.isEmpty && (this.board.collidesLeft(cell) || this.board.collidesRight(cell)))
18
+ .forEach((cell) => {
19
+ const row = this.board.getRow(cell.y);
20
+ let x = cell.x - 1;
66
21
  while (x >= 0 && row[x].hasTile()) {
67
22
  --x;
68
23
  }
69
- var previousCells = row.slice(x + 1, cell.x);
24
+ const previousCells = row.slice(x + 1, cell.x);
70
25
  x = cell.x + 1;
71
26
  while (x < row.length && row[x].hasTile()) {
72
27
  ++x;
73
28
  }
74
- var nextCells = row.slice(cell.x + 1, x);
75
- var cells = __spreadArray(__spreadArray(__spreadArray([], __read(previousCells), false), [cell], false), __read(nextCells), false);
29
+ const nextCells = row.slice(cell.x + 1, x);
30
+ const cells = [...previousCells, cell, ...nextCells];
76
31
  if (cells.length > 1) {
77
- var pattern = new Pattern_1.default({ board: _this.board, cells: cells });
32
+ const pattern = new Pattern_1.default({ board: this.board, cells });
78
33
  collisions.push(pattern);
79
34
  }
80
35
  });
81
36
  return collisions;
82
- };
83
- return VerticalPattern;
84
- }(Pattern_1.default));
37
+ }
38
+ }
85
39
  exports.default = VerticalPattern;
@@ -1,42 +1,20 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
18
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
19
4
  };
20
5
  Object.defineProperty(exports, "__esModule", { value: true });
21
- var constants_1 = require("@scrabble-solver/constants");
22
- var Bonus_1 = __importDefault(require("./Bonus"));
23
- var WordBonus = /** @class */ (function (_super) {
24
- __extends(WordBonus, _super);
25
- function WordBonus() {
26
- var _this = _super !== null && _super.apply(this, arguments) || this;
27
- _this.type = constants_1.BONUS_WORD;
28
- return _this;
6
+ const constants_1 = require("@scrabble-solver/constants");
7
+ const Bonus_1 = __importDefault(require("./Bonus"));
8
+ class WordBonus extends Bonus_1.default {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.type = constants_1.BONUS_WORD;
29
12
  }
30
- Object.defineProperty(WordBonus.prototype, "value", {
31
- get: function () {
32
- return {
33
- characterMultiplier: 1,
34
- wordMultiplier: this.multiplier,
35
- };
36
- },
37
- enumerable: false,
38
- configurable: true
39
- });
40
- return WordBonus;
41
- }(Bonus_1.default));
13
+ get value() {
14
+ return {
15
+ characterMultiplier: 1,
16
+ wordMultiplier: this.multiplier,
17
+ };
18
+ }
19
+ }
42
20
  exports.default = WordBonus;
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var WordDefinition = /** @class */ (function () {
4
- function WordDefinition(_a) {
5
- var definitions = _a.definitions, isAllowed = _a.isAllowed, word = _a.word;
3
+ class WordDefinition {
4
+ constructor({ definitions, isAllowed, word }) {
6
5
  this.definitions = definitions;
7
6
  this.isAllowed = isAllowed;
8
7
  this.word = word;
9
8
  }
10
- WordDefinition.fromJson = function (json) {
9
+ static fromJson(json) {
11
10
  if (!json) {
12
11
  return WordDefinition.Null;
13
12
  }
@@ -16,20 +15,19 @@ var WordDefinition = /** @class */ (function () {
16
15
  isAllowed: json.isAllowed,
17
16
  word: json.word,
18
17
  });
19
- };
20
- WordDefinition.prototype.toJson = function () {
18
+ }
19
+ toJson() {
21
20
  return {
22
21
  definitions: this.definitions,
23
22
  isAllowed: this.isAllowed,
24
23
  word: this.word,
25
24
  };
26
- };
27
- WordDefinition.Null = Object.freeze({
28
- definitions: [],
29
- isAllowed: false,
30
- word: '',
31
- toJson: function () { return null; },
32
- });
33
- return WordDefinition;
34
- }());
25
+ }
26
+ }
27
+ WordDefinition.Null = Object.freeze({
28
+ definitions: [],
29
+ isAllowed: false,
30
+ word: '',
31
+ toJson: () => null,
32
+ });
35
33
  exports.default = WordDefinition;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrabble-solver/types",
3
- "version": "2.8.2",
3
+ "version": "2.8.3",
4
4
  "description": "Scrabble Solver 2 - Types",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -24,7 +24,7 @@
24
24
  "clean:force": "npm run clean && rimraf package-lock.json"
25
25
  },
26
26
  "dependencies": {
27
- "@scrabble-solver/constants": "^2.8.2"
27
+ "@scrabble-solver/constants": "^2.8.3"
28
28
  },
29
- "gitHead": "bf360562a79572dd4640ac7cd7f26199f1ba6899"
29
+ "gitHead": "116f214733e7ad071044f556bcf67e867da3d9ca"
30
30
  }