@scrabble-solver/types 2.15.11 → 2.15.13
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.d.ts +1 -1
- package/build/Board.js +40 -14
- package/build/BoardJson.d.ts +1 -1
- package/build/Bonus.d.ts +4 -4
- package/build/Cell.d.ts +1 -1
- package/build/CellJson.d.ts +1 -1
- package/build/CharacterBonus.d.ts +2 -2
- package/build/Collision.d.ts +1 -1
- package/build/CollisionJson.d.ts +1 -1
- package/build/Config.d.ts +9 -9
- package/build/ConfigJson.d.ts +5 -5
- package/build/Dictionary.d.ts +1 -1
- package/build/Pattern.d.ts +4 -4
- package/build/PatternJson.d.ts +1 -1
- package/build/Result.d.ts +4 -2
- package/build/Result.js +6 -0
- package/build/ResultJson.d.ts +2 -2
- package/build/Tile.d.ts +1 -1
- package/build/WordBonus.d.ts +1 -1
- package/build/WordDefinition.d.ts +1 -1
- package/package.json +3 -3
- package/src/Board.ts +49 -20
- package/src/BoardJson.ts +1 -1
- package/src/Bonus.ts +4 -4
- package/src/Cell.ts +1 -1
- package/src/CellJson.ts +1 -1
- package/src/CharacterBonus.ts +2 -2
- package/src/Collision.ts +1 -1
- package/src/CollisionJson.ts +1 -1
- package/src/Config.ts +9 -9
- package/src/ConfigJson.ts +5 -5
- package/src/Dictionary.ts +1 -1
- package/src/Pattern.ts +4 -4
- package/src/PatternJson.ts +1 -1
- package/src/Result.ts +10 -2
- package/src/ResultJson.ts +2 -2
- package/src/Tile.ts +1 -1
- package/src/WordBonus.ts +1 -1
- package/src/WordDefinition.ts +1 -1
package/build/Board.d.ts
CHANGED
package/build/Board.js
CHANGED
|
@@ -70,20 +70,9 @@ class Board {
|
|
|
70
70
|
}, 0);
|
|
71
71
|
}
|
|
72
72
|
getWords() {
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
for (let y = 0; y < this.rowsCount; ++y) {
|
|
77
|
-
column.push(this.rows[y][x]);
|
|
78
|
-
}
|
|
79
|
-
columns.push(column);
|
|
80
|
-
}
|
|
81
|
-
const columnsBoard = new Board({ rows: columns });
|
|
82
|
-
const lines = this.toString().split('\n').concat(columnsBoard.toString().split('\n'));
|
|
83
|
-
const words = lines
|
|
84
|
-
.flatMap((line) => line.replaceAll(/\s+/g, constants_1.EMPTY_CELL).split(' '))
|
|
85
|
-
.filter((word) => word.length > 1);
|
|
86
|
-
return words;
|
|
73
|
+
const horizontalWords = getHorizontalWords(this.rows);
|
|
74
|
+
const verticalWords = getHorizontalWords(transpose(this.rows));
|
|
75
|
+
return [...horizontalWords, ...verticalWords];
|
|
87
76
|
}
|
|
88
77
|
isEmpty() {
|
|
89
78
|
return this.rows.every((row) => row.every(({ isEmpty }) => isEmpty));
|
|
@@ -113,3 +102,40 @@ Board.fromJson = (json) => {
|
|
|
113
102
|
rows: json.map((row) => row.map(Cell_1.Cell.fromJson)),
|
|
114
103
|
});
|
|
115
104
|
};
|
|
105
|
+
const transpose = (array) => {
|
|
106
|
+
const rows = array.length;
|
|
107
|
+
const cols = array[0].length;
|
|
108
|
+
const transposed = Array(cols)
|
|
109
|
+
.fill(null)
|
|
110
|
+
.map(() => Array(rows));
|
|
111
|
+
for (let y = 0; y < rows; ++y) {
|
|
112
|
+
for (let x = 0; x < cols; ++x) {
|
|
113
|
+
transposed[x][y] = array[y][x];
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return transposed;
|
|
117
|
+
};
|
|
118
|
+
const getHorizontalWords = (cells) => {
|
|
119
|
+
const words = [];
|
|
120
|
+
for (const row of cells) {
|
|
121
|
+
let currentWord = [];
|
|
122
|
+
for (const cell of row) {
|
|
123
|
+
if (!cell.isEmpty) {
|
|
124
|
+
currentWord.push(cell);
|
|
125
|
+
}
|
|
126
|
+
else if (currentWord.length > 0) {
|
|
127
|
+
if (currentWord.length > 1) {
|
|
128
|
+
words.push(wordToString(currentWord));
|
|
129
|
+
}
|
|
130
|
+
currentWord = [];
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
if (currentWord.length > 1) {
|
|
134
|
+
words.push(wordToString(currentWord));
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return words;
|
|
138
|
+
};
|
|
139
|
+
const wordToString = (word) => {
|
|
140
|
+
return word.map((cell) => cell.tile.character).join('');
|
|
141
|
+
};
|
package/build/BoardJson.d.ts
CHANGED
package/build/Bonus.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BONUS_CHARACTER, BONUS_WORD } from '@scrabble-solver/constants';
|
|
2
|
-
import { BonusJson } from './BonusJson';
|
|
3
|
-
import { BonusValue } from './BonusValue';
|
|
4
|
-
import { Cell } from './Cell';
|
|
1
|
+
import { type BONUS_CHARACTER, type BONUS_WORD } from '@scrabble-solver/constants';
|
|
2
|
+
import { type BonusJson } from './BonusJson';
|
|
3
|
+
import { type BonusValue } from './BonusValue';
|
|
4
|
+
import { type Cell } from './Cell';
|
|
5
5
|
import { type Config } from './Config';
|
|
6
6
|
export declare abstract class Bonus {
|
|
7
7
|
readonly multiplier: number;
|
package/build/Cell.d.ts
CHANGED
package/build/CellJson.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Bonus } from './Bonus';
|
|
2
|
-
import { BonusValue } from './BonusValue';
|
|
3
|
-
import { Cell } from './Cell';
|
|
2
|
+
import { type BonusValue } from './BonusValue';
|
|
3
|
+
import { type Cell } from './Cell';
|
|
4
4
|
import { type Config } from './Config';
|
|
5
5
|
export declare class CharacterBonus extends Bonus {
|
|
6
6
|
readonly type = "BONUS_CHARACTER";
|
package/build/Collision.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Cell } from './Cell';
|
|
1
|
+
import { type Cell } from './Cell';
|
|
2
2
|
export type Collision = Cell[];
|
package/build/CollisionJson.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CellJson } from './CellJson';
|
|
1
|
+
import { type CellJson } from './CellJson';
|
|
2
2
|
export type CollisionJson = CellJson[];
|
package/build/Config.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Bingo } from './Bingo';
|
|
2
|
-
import { Bonus } from './Bonus';
|
|
3
|
-
import { BonusValue } from './BonusValue';
|
|
4
|
-
import { Cell } from './Cell';
|
|
5
|
-
import { ConfigJson } from './ConfigJson';
|
|
6
|
-
import { Game } from './Game';
|
|
7
|
-
import { Locale } from './Locale';
|
|
8
|
-
import { Tile } from './Tile';
|
|
9
|
-
import { TileConfig } from './TileConfig';
|
|
1
|
+
import { type Bingo } from './Bingo';
|
|
2
|
+
import { type Bonus } from './Bonus';
|
|
3
|
+
import { type BonusValue } from './BonusValue';
|
|
4
|
+
import { type Cell } from './Cell';
|
|
5
|
+
import { type ConfigJson } from './ConfigJson';
|
|
6
|
+
import { type Game } from './Game';
|
|
7
|
+
import { type Locale } from './Locale';
|
|
8
|
+
import { type Tile } from './Tile';
|
|
9
|
+
import { type TileConfig } from './TileConfig';
|
|
10
10
|
export declare class Config {
|
|
11
11
|
static fromJson: (json: ConfigJson) => Config;
|
|
12
12
|
readonly bonuses: Bonus[];
|
package/build/ConfigJson.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Bingo } from './Bingo';
|
|
2
|
-
import { BonusJson } from './BonusJson';
|
|
3
|
-
import { Game } from './Game';
|
|
4
|
-
import { Locale } from './Locale';
|
|
5
|
-
import { TileConfig } from './TileConfig';
|
|
1
|
+
import { type Bingo } from './Bingo';
|
|
2
|
+
import { type BonusJson } from './BonusJson';
|
|
3
|
+
import { type Game } from './Game';
|
|
4
|
+
import { type Locale } from './Locale';
|
|
5
|
+
import { type TileConfig } from './TileConfig';
|
|
6
6
|
export interface ConfigJson {
|
|
7
7
|
bingo: Bingo;
|
|
8
8
|
blankScore: number;
|
package/build/Dictionary.d.ts
CHANGED
package/build/Pattern.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Board } from './Board';
|
|
2
|
-
import { Cell } from './Cell';
|
|
3
|
-
import { Config } from './Config';
|
|
4
|
-
import { PatternJson } from './PatternJson';
|
|
1
|
+
import { type Board } from './Board';
|
|
2
|
+
import { type Cell } from './Cell';
|
|
3
|
+
import { type Config } from './Config';
|
|
4
|
+
import { type PatternJson } from './PatternJson';
|
|
5
5
|
export declare class Pattern {
|
|
6
6
|
readonly board: Board;
|
|
7
7
|
readonly cells: Cell[];
|
package/build/PatternJson.d.ts
CHANGED
package/build/Result.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Cell } from './Cell';
|
|
2
|
-
import { ResultJson } from './ResultJson';
|
|
3
|
-
import { Tile } from './Tile';
|
|
2
|
+
import { type ResultJson } from './ResultJson';
|
|
3
|
+
import { type Tile } from './Tile';
|
|
4
4
|
type Collision = Cell[];
|
|
5
5
|
export declare class Result {
|
|
6
6
|
static fromJson: (json: ResultJson) => Result;
|
|
@@ -25,5 +25,7 @@ export declare class Result {
|
|
|
25
25
|
points: number;
|
|
26
26
|
});
|
|
27
27
|
toJson(): ResultJson;
|
|
28
|
+
isHorizontal(): boolean;
|
|
29
|
+
isVertical(): boolean;
|
|
28
30
|
}
|
|
29
31
|
export {};
|
package/build/Result.js
CHANGED
|
@@ -29,6 +29,12 @@ class Result {
|
|
|
29
29
|
points: this.points,
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
+
isHorizontal() {
|
|
33
|
+
return this.cells[0].y === this.cells[1].y;
|
|
34
|
+
}
|
|
35
|
+
isVertical() {
|
|
36
|
+
return this.cells[0].x === this.cells[1].x;
|
|
37
|
+
}
|
|
32
38
|
}
|
|
33
39
|
exports.Result = Result;
|
|
34
40
|
Result.fromJson = (json) => {
|
package/build/ResultJson.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CellJson } from './CellJson';
|
|
2
|
-
import { CollisionJson } from './CollisionJson';
|
|
1
|
+
import { type CellJson } from './CellJson';
|
|
2
|
+
import { type CollisionJson } from './CollisionJson';
|
|
3
3
|
export interface ResultJson {
|
|
4
4
|
cells: CellJson[];
|
|
5
5
|
collisions: CollisionJson[];
|
package/build/Tile.d.ts
CHANGED
package/build/WordBonus.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WordDefinitionJson } from './WordDefinitionJson';
|
|
1
|
+
import { type WordDefinitionJson } from './WordDefinitionJson';
|
|
2
2
|
export declare class WordDefinition {
|
|
3
3
|
static fromJson: (json: WordDefinitionJson | null) => WordDefinition;
|
|
4
4
|
static readonly Null: WordDefinition;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scrabble-solver/types",
|
|
3
|
-
"version": "2.15.
|
|
3
|
+
"version": "2.15.13",
|
|
4
4
|
"description": "Scrabble Solver 2 - Types",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"clean": "rimraf build/"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@scrabble-solver/constants": "^2.15.
|
|
26
|
+
"@scrabble-solver/constants": "^2.15.13"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "fd3e02f7051acdb8cc6dd138a959679bc00f1ed6"
|
|
29
29
|
}
|
package/src/Board.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EMPTY_CELL } from '@scrabble-solver/constants';
|
|
2
2
|
|
|
3
|
-
import { BoardJson } from './BoardJson';
|
|
3
|
+
import { type BoardJson } from './BoardJson';
|
|
4
4
|
import { Cell } from './Cell';
|
|
5
5
|
import { Tile } from './Tile';
|
|
6
6
|
|
|
@@ -110,25 +110,9 @@ export class Board {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
public getWords(): string[] {
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
const column: Cell[] = [];
|
|
117
|
-
|
|
118
|
-
for (let y = 0; y < this.rowsCount; ++y) {
|
|
119
|
-
column.push(this.rows[y][x]);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
columns.push(column);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
const columnsBoard = new Board({ rows: columns });
|
|
126
|
-
const lines = this.toString().split('\n').concat(columnsBoard.toString().split('\n'));
|
|
127
|
-
const words = lines
|
|
128
|
-
.flatMap((line) => line.replaceAll(/\s+/g, EMPTY_CELL).split(' '))
|
|
129
|
-
.filter((word) => word.length > 1);
|
|
130
|
-
|
|
131
|
-
return words;
|
|
113
|
+
const horizontalWords = getHorizontalWords(this.rows);
|
|
114
|
+
const verticalWords = getHorizontalWords(transpose(this.rows));
|
|
115
|
+
return [...horizontalWords, ...verticalWords];
|
|
132
116
|
}
|
|
133
117
|
|
|
134
118
|
public isEmpty(): boolean {
|
|
@@ -151,3 +135,48 @@ export class Board {
|
|
|
151
135
|
this.rows[y] = updateRow(this.rows[y]);
|
|
152
136
|
}
|
|
153
137
|
}
|
|
138
|
+
|
|
139
|
+
const transpose = <T>(array: T[][]): T[][] => {
|
|
140
|
+
const rows = array.length;
|
|
141
|
+
const cols = array[0].length;
|
|
142
|
+
const transposed: T[][] = Array(cols)
|
|
143
|
+
.fill(null)
|
|
144
|
+
.map(() => Array(rows));
|
|
145
|
+
|
|
146
|
+
for (let y = 0; y < rows; ++y) {
|
|
147
|
+
for (let x = 0; x < cols; ++x) {
|
|
148
|
+
transposed[x][y] = array[y][x];
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return transposed;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
const getHorizontalWords = (cells: Cell[][]): string[] => {
|
|
156
|
+
const words: string[] = [];
|
|
157
|
+
|
|
158
|
+
for (const row of cells) {
|
|
159
|
+
let currentWord: Cell[] = [];
|
|
160
|
+
|
|
161
|
+
for (const cell of row) {
|
|
162
|
+
if (!cell.isEmpty) {
|
|
163
|
+
currentWord.push(cell);
|
|
164
|
+
} else if (currentWord.length > 0) {
|
|
165
|
+
if (currentWord.length > 1) {
|
|
166
|
+
words.push(wordToString(currentWord));
|
|
167
|
+
}
|
|
168
|
+
currentWord = [];
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
if (currentWord.length > 1) {
|
|
173
|
+
words.push(wordToString(currentWord));
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return words;
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
const wordToString = (word: Cell[]): string => {
|
|
181
|
+
return word.map((cell) => cell.tile.character).join('');
|
|
182
|
+
};
|
package/src/BoardJson.ts
CHANGED
package/src/Bonus.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BONUS_CHARACTER, BONUS_WORD } from '@scrabble-solver/constants';
|
|
1
|
+
import { type BONUS_CHARACTER, type BONUS_WORD } from '@scrabble-solver/constants';
|
|
2
2
|
|
|
3
|
-
import { BonusJson } from './BonusJson';
|
|
4
|
-
import { BonusValue } from './BonusValue';
|
|
5
|
-
import { Cell } from './Cell';
|
|
3
|
+
import { type BonusJson } from './BonusJson';
|
|
4
|
+
import { type BonusValue } from './BonusValue';
|
|
5
|
+
import { type Cell } from './Cell';
|
|
6
6
|
import { type Config } from './Config';
|
|
7
7
|
|
|
8
8
|
export abstract class Bonus {
|
package/src/Cell.ts
CHANGED
package/src/CellJson.ts
CHANGED
package/src/CharacterBonus.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BONUS_CHARACTER } from '@scrabble-solver/constants';
|
|
2
2
|
|
|
3
3
|
import { Bonus } from './Bonus';
|
|
4
|
-
import { BonusValue } from './BonusValue';
|
|
5
|
-
import { Cell } from './Cell';
|
|
4
|
+
import { type BonusValue } from './BonusValue';
|
|
5
|
+
import { type Cell } from './Cell';
|
|
6
6
|
import { type Config } from './Config';
|
|
7
7
|
|
|
8
8
|
export class CharacterBonus extends Bonus {
|
package/src/Collision.ts
CHANGED
package/src/CollisionJson.ts
CHANGED
package/src/Config.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { BLANK, BONUS_CHARACTER, BONUS_WORD, NO_BONUS } from '@scrabble-solver/constants';
|
|
2
2
|
|
|
3
|
-
import { Bingo } from './Bingo';
|
|
4
|
-
import { Bonus } from './Bonus';
|
|
5
|
-
import { BonusValue } from './BonusValue';
|
|
6
|
-
import { Cell } from './Cell';
|
|
3
|
+
import { type Bingo } from './Bingo';
|
|
4
|
+
import { type Bonus } from './Bonus';
|
|
5
|
+
import { type BonusValue } from './BonusValue';
|
|
6
|
+
import { type Cell } from './Cell';
|
|
7
7
|
import { CharacterBonus } from './CharacterBonus';
|
|
8
|
-
import { ConfigJson } from './ConfigJson';
|
|
9
|
-
import { Game } from './Game';
|
|
10
|
-
import { Locale } from './Locale';
|
|
11
|
-
import { Tile } from './Tile';
|
|
12
|
-
import { TileConfig } from './TileConfig';
|
|
8
|
+
import { type ConfigJson } from './ConfigJson';
|
|
9
|
+
import { type Game } from './Game';
|
|
10
|
+
import { type Locale } from './Locale';
|
|
11
|
+
import { type Tile } from './Tile';
|
|
12
|
+
import { type TileConfig } from './TileConfig';
|
|
13
13
|
import { WordBonus } from './WordBonus';
|
|
14
14
|
|
|
15
15
|
export class Config {
|
package/src/ConfigJson.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Bingo } from './Bingo';
|
|
2
|
-
import { BonusJson } from './BonusJson';
|
|
3
|
-
import { Game } from './Game';
|
|
4
|
-
import { Locale } from './Locale';
|
|
5
|
-
import { TileConfig } from './TileConfig';
|
|
1
|
+
import { type Bingo } from './Bingo';
|
|
2
|
+
import { type BonusJson } from './BonusJson';
|
|
3
|
+
import { type Game } from './Game';
|
|
4
|
+
import { type Locale } from './Locale';
|
|
5
|
+
import { type TileConfig } from './TileConfig';
|
|
6
6
|
|
|
7
7
|
export interface ConfigJson {
|
|
8
8
|
bingo: Bingo;
|
package/src/Dictionary.ts
CHANGED
package/src/Pattern.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Board } from './Board';
|
|
2
|
-
import { Cell } from './Cell';
|
|
3
|
-
import { Config } from './Config';
|
|
4
|
-
import { PatternJson } from './PatternJson';
|
|
1
|
+
import { type Board } from './Board';
|
|
2
|
+
import { type Cell } from './Cell';
|
|
3
|
+
import { type Config } from './Config';
|
|
4
|
+
import { type PatternJson } from './PatternJson';
|
|
5
5
|
|
|
6
6
|
export class Pattern {
|
|
7
7
|
public readonly board: Board;
|
package/src/PatternJson.ts
CHANGED
package/src/Result.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CONSONANTS, VOWELS } from '@scrabble-solver/constants';
|
|
2
2
|
|
|
3
3
|
import { Cell } from './Cell';
|
|
4
|
-
import { ResultJson } from './ResultJson';
|
|
5
|
-
import { Tile } from './Tile';
|
|
4
|
+
import { type ResultJson } from './ResultJson';
|
|
5
|
+
import { type Tile } from './Tile';
|
|
6
6
|
|
|
7
7
|
type Collision = Cell[];
|
|
8
8
|
|
|
@@ -80,6 +80,14 @@ export class Result {
|
|
|
80
80
|
points: this.points,
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
+
|
|
84
|
+
public isHorizontal(): boolean {
|
|
85
|
+
return this.cells[0].y === this.cells[1].y;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
public isVertical(): boolean {
|
|
89
|
+
return this.cells[0].x === this.cells[1].x;
|
|
90
|
+
}
|
|
83
91
|
}
|
|
84
92
|
|
|
85
93
|
const getBlanks = (tiles: Tile[]): Tile[] => tiles.filter(({ isBlank }) => isBlank);
|
package/src/ResultJson.ts
CHANGED
package/src/Tile.ts
CHANGED
package/src/WordBonus.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BONUS_WORD } from '@scrabble-solver/constants';
|
|
2
2
|
|
|
3
3
|
import { Bonus } from './Bonus';
|
|
4
|
-
import { BonusValue } from './BonusValue';
|
|
4
|
+
import { type BonusValue } from './BonusValue';
|
|
5
5
|
|
|
6
6
|
export class WordBonus extends Bonus {
|
|
7
7
|
public readonly type = BONUS_WORD;
|
package/src/WordDefinition.ts
CHANGED