@scrabble-solver/types 2.7.1 → 2.8.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.
- package/build/CharacterBonus.js +2 -0
- package/build/Config.js +1 -1
- package/build/HorizontalPattern.js +11 -4
- package/build/VerticalPattern.js +11 -4
- package/build/WordBonus.js +2 -0
- package/package.json +3 -3
package/build/CharacterBonus.js
CHANGED
|
@@ -7,6 +7,8 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
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");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
package/build/Config.js
CHANGED
|
@@ -136,7 +136,7 @@ var getBonuses = function (config) {
|
|
|
136
136
|
if (bonus.type === constants_1.BONUS_WORD) {
|
|
137
137
|
return new WordBonus_1.default(bonus);
|
|
138
138
|
}
|
|
139
|
-
throw new Error("Unsupported Bonus type: \""
|
|
139
|
+
throw new Error("Unsupported Bonus type: \"".concat(bonus.type, "\""));
|
|
140
140
|
});
|
|
141
141
|
};
|
|
142
142
|
var getAlphabet = function (config) { return config.tiles.map(function (_a) {
|
|
@@ -7,6 +7,8 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
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");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -28,9 +30,14 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
28
30
|
}
|
|
29
31
|
return ar;
|
|
30
32
|
};
|
|
31
|
-
var
|
|
32
|
-
for (var
|
|
33
|
-
|
|
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));
|
|
34
41
|
};
|
|
35
42
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
43
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -65,7 +72,7 @@ var HorizontalPattern = /** @class */ (function (_super) {
|
|
|
65
72
|
++y;
|
|
66
73
|
}
|
|
67
74
|
var nextCells = column.slice(cell.y + 1, y);
|
|
68
|
-
var cells =
|
|
75
|
+
var cells = __spreadArray(__spreadArray(__spreadArray([], __read(previousCells), false), [cell], false), __read(nextCells), false);
|
|
69
76
|
if (cells.length > 1) {
|
|
70
77
|
var pattern = new Pattern_1.default({ board: _this.board, cells: cells });
|
|
71
78
|
collisions.push(pattern);
|
package/build/VerticalPattern.js
CHANGED
|
@@ -7,6 +7,8 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
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");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -28,9 +30,14 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
28
30
|
}
|
|
29
31
|
return ar;
|
|
30
32
|
};
|
|
31
|
-
var
|
|
32
|
-
for (var
|
|
33
|
-
|
|
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));
|
|
34
41
|
};
|
|
35
42
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
43
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -65,7 +72,7 @@ var VerticalPattern = /** @class */ (function (_super) {
|
|
|
65
72
|
++x;
|
|
66
73
|
}
|
|
67
74
|
var nextCells = row.slice(cell.x + 1, x);
|
|
68
|
-
var cells =
|
|
75
|
+
var cells = __spreadArray(__spreadArray(__spreadArray([], __read(previousCells), false), [cell], false), __read(nextCells), false);
|
|
69
76
|
if (cells.length > 1) {
|
|
70
77
|
var pattern = new Pattern_1.default({ board: _this.board, cells: cells });
|
|
71
78
|
collisions.push(pattern);
|
package/build/WordBonus.js
CHANGED
|
@@ -7,6 +7,8 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
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");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scrabble-solver/types",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
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.
|
|
27
|
+
"@scrabble-solver/constants": "^2.8.0"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "be53b4e8c12e092b9fc180775e700fc0c771f298"
|
|
30
30
|
}
|