@scrabble-solver/types 2.11.8 → 2.11.9
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/Config.d.ts +2 -0
- package/build/Config.js +3 -0
- package/build/ConfigJson.d.ts +2 -0
- package/package.json +3 -3
- package/src/Config.ts +5 -0
- package/src/ConfigJson.ts +2 -0
package/build/Config.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import Bonus from './Bonus';
|
|
|
2
2
|
import BonusValue from './BonusValue';
|
|
3
3
|
import Cell from './Cell';
|
|
4
4
|
import ConfigJson from './ConfigJson';
|
|
5
|
+
import Locale from './Locale';
|
|
5
6
|
import Tile from './Tile';
|
|
6
7
|
import TileConfig from './TileConfig';
|
|
7
8
|
declare class Config {
|
|
@@ -16,6 +17,7 @@ declare class Config {
|
|
|
16
17
|
get blanksCount(): number;
|
|
17
18
|
get boardHeight(): number;
|
|
18
19
|
get boardWidth(): number;
|
|
20
|
+
get locale(): Locale;
|
|
19
21
|
get twoCharacterTiles(): string[];
|
|
20
22
|
getCellBonus(cell: Cell): Bonus | undefined;
|
|
21
23
|
getCellBonusValue(cell: Cell): BonusValue;
|
package/build/Config.js
CHANGED
|
@@ -33,6 +33,9 @@ class Config {
|
|
|
33
33
|
get boardWidth() {
|
|
34
34
|
return this.config.boardWidth;
|
|
35
35
|
}
|
|
36
|
+
get locale() {
|
|
37
|
+
return this.config.locale;
|
|
38
|
+
}
|
|
36
39
|
get twoCharacterTiles() {
|
|
37
40
|
return this.config.tiles.filter((tile) => tile.character.length === 2).map((tile) => tile.character);
|
|
38
41
|
}
|
package/build/ConfigJson.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import BonusJson from './BonusJson';
|
|
2
|
+
import Locale from './Locale';
|
|
2
3
|
import TileConfig from './TileConfig';
|
|
3
4
|
interface ConfigJson {
|
|
4
5
|
allTilesBonusScore: number;
|
|
@@ -8,6 +9,7 @@ interface ConfigJson {
|
|
|
8
9
|
boardWidth: number;
|
|
9
10
|
bonuses: BonusJson[];
|
|
10
11
|
id: string;
|
|
12
|
+
locale: Locale;
|
|
11
13
|
maximumCharactersCount: number;
|
|
12
14
|
name: string;
|
|
13
15
|
tiles: TileConfig[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scrabble-solver/types",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.9",
|
|
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.11.
|
|
27
|
+
"@scrabble-solver/constants": "^2.11.9"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "ff5376346ee2ff7d0db2cbcbe98a47de1c96bea2"
|
|
30
30
|
}
|
package/src/Config.ts
CHANGED
|
@@ -5,6 +5,7 @@ import BonusValue from './BonusValue';
|
|
|
5
5
|
import Cell from './Cell';
|
|
6
6
|
import CharacterBonus from './CharacterBonus';
|
|
7
7
|
import ConfigJson from './ConfigJson';
|
|
8
|
+
import Locale from './Locale';
|
|
8
9
|
import Tile from './Tile';
|
|
9
10
|
import TileConfig from './TileConfig';
|
|
10
11
|
import WordBonus from './WordBonus';
|
|
@@ -50,6 +51,10 @@ class Config {
|
|
|
50
51
|
return this.config.boardWidth;
|
|
51
52
|
}
|
|
52
53
|
|
|
54
|
+
public get locale(): Locale {
|
|
55
|
+
return this.config.locale;
|
|
56
|
+
}
|
|
57
|
+
|
|
53
58
|
public get twoCharacterTiles(): string[] {
|
|
54
59
|
return this.config.tiles.filter((tile) => tile.character.length === 2).map((tile) => tile.character);
|
|
55
60
|
}
|
package/src/ConfigJson.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import BonusJson from './BonusJson';
|
|
2
|
+
import Locale from './Locale';
|
|
2
3
|
import TileConfig from './TileConfig';
|
|
3
4
|
|
|
4
5
|
interface ConfigJson {
|
|
@@ -9,6 +10,7 @@ interface ConfigJson {
|
|
|
9
10
|
boardWidth: number;
|
|
10
11
|
bonuses: BonusJson[];
|
|
11
12
|
id: string;
|
|
13
|
+
locale: Locale;
|
|
12
14
|
maximumCharactersCount: number;
|
|
13
15
|
name: string;
|
|
14
16
|
tiles: TileConfig[];
|