@scrabble-solver/configs 2.12.2 → 2.12.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 (112) hide show
  1. package/build/games/index.d.ts +3 -0
  2. package/build/games/index.js +12 -0
  3. package/build/games/literaki.d.ts +25 -0
  4. package/build/games/literaki.js +110 -0
  5. package/build/games/scrabble.d.ts +18 -0
  6. package/build/games/scrabble.js +78 -0
  7. package/build/games/superScrabble.d.ts +18 -0
  8. package/build/games/superScrabble.js +141 -0
  9. package/build/getConfig.d.ts +2 -6
  10. package/build/getConfig.js +29 -10
  11. package/build/hasConfig.d.ts +3 -0
  12. package/build/hasConfig.js +31 -0
  13. package/build/index.d.ts +7 -4
  14. package/build/index.js +32 -9
  15. package/build/locales/deDe.d.ts +3 -0
  16. package/build/locales/deDe.js +42 -0
  17. package/build/locales/enGb.d.ts +3 -0
  18. package/build/locales/enGb.js +104 -0
  19. package/build/locales/enUs.d.ts +3 -0
  20. package/build/locales/enUs.js +104 -0
  21. package/build/locales/esEs.d.ts +3 -0
  22. package/build/locales/esEs.js +41 -0
  23. package/build/locales/faIr.d.ts +3 -0
  24. package/build/locales/faIr.js +45 -0
  25. package/build/locales/frFr.d.ts +3 -0
  26. package/build/locales/frFr.js +39 -0
  27. package/build/locales/index.d.ts +7 -0
  28. package/build/locales/index.js +20 -0
  29. package/build/locales/plPl.d.ts +3 -0
  30. package/build/locales/plPl.js +83 -0
  31. package/package.json +4 -4
  32. package/src/games/index.ts +3 -0
  33. package/src/games/literaki.ts +110 -0
  34. package/src/games/scrabble.ts +78 -0
  35. package/src/games/superScrabble.ts +141 -0
  36. package/src/getConfig.ts +8 -15
  37. package/src/hasConfig.ts +10 -0
  38. package/src/index.ts +7 -4
  39. package/src/locales/deDe.ts +43 -0
  40. package/src/locales/enGb.ts +105 -0
  41. package/src/locales/enUs.ts +105 -0
  42. package/src/locales/esEs.ts +42 -0
  43. package/src/locales/faIr.ts +46 -0
  44. package/src/locales/frFr.ts +40 -0
  45. package/src/locales/index.ts +7 -0
  46. package/src/locales/plPl.ts +84 -0
  47. package/build/getLocaleConfig.d.ts +0 -3
  48. package/build/getLocaleConfig.js +0 -10
  49. package/build/isConfigId.d.ts +0 -2
  50. package/build/isConfigId.js +0 -12
  51. package/build/literaki/bonuses.d.ts +0 -14
  52. package/build/literaki/bonuses.js +0 -99
  53. package/build/literaki/index.d.ts +0 -1
  54. package/build/literaki/index.js +0 -8
  55. package/build/literaki/literaki.d.ts +0 -13
  56. package/build/literaki/literaki.js +0 -31
  57. package/build/literaki/tiles/index.d.ts +0 -6
  58. package/build/literaki/tiles/index.js +0 -18
  59. package/build/literaki/tiles/tilesDe.d.ts +0 -6
  60. package/build/literaki/tiles/tilesDe.js +0 -34
  61. package/build/literaki/tiles/tilesEn.d.ts +0 -6
  62. package/build/literaki/tiles/tilesEn.js +0 -31
  63. package/build/literaki/tiles/tilesEs.d.ts +0 -6
  64. package/build/literaki/tiles/tilesEs.js +0 -33
  65. package/build/literaki/tiles/tilesFa.d.ts +0 -6
  66. package/build/literaki/tiles/tilesFa.js +0 -37
  67. package/build/literaki/tiles/tilesFr.d.ts +0 -6
  68. package/build/literaki/tiles/tilesFr.js +0 -31
  69. package/build/literaki/tiles/tilesPl.d.ts +0 -6
  70. package/build/literaki/tiles/tilesPl.js +0 -37
  71. package/build/scrabble/bonuses.d.ts +0 -7
  72. package/build/scrabble/bonuses.js +0 -67
  73. package/build/scrabble/index.d.ts +0 -1
  74. package/build/scrabble/index.js +0 -8
  75. package/build/scrabble/scrabble.d.ts +0 -13
  76. package/build/scrabble/scrabble.js +0 -31
  77. package/build/scrabble/tiles/index.d.ts +0 -6
  78. package/build/scrabble/tiles/index.js +0 -18
  79. package/build/scrabble/tiles/tilesDe.d.ts +0 -6
  80. package/build/scrabble/tiles/tilesDe.js +0 -34
  81. package/build/scrabble/tiles/tilesEn.d.ts +0 -6
  82. package/build/scrabble/tiles/tilesEn.js +0 -31
  83. package/build/scrabble/tiles/tilesEs.d.ts +0 -6
  84. package/build/scrabble/tiles/tilesEs.js +0 -33
  85. package/build/scrabble/tiles/tilesFa.d.ts +0 -6
  86. package/build/scrabble/tiles/tilesFa.js +0 -37
  87. package/build/scrabble/tiles/tilesFr.d.ts +0 -6
  88. package/build/scrabble/tiles/tilesFr.js +0 -31
  89. package/build/scrabble/tiles/tilesPl.d.ts +0 -6
  90. package/build/scrabble/tiles/tilesPl.js +0 -37
  91. package/src/getLocaleConfig.ts +0 -9
  92. package/src/isConfigId.ts +0 -10
  93. package/src/literaki/bonuses.ts +0 -99
  94. package/src/literaki/index.ts +0 -1
  95. package/src/literaki/literaki.ts +0 -30
  96. package/src/literaki/tiles/index.ts +0 -6
  97. package/src/literaki/tiles/tilesDe.ts +0 -33
  98. package/src/literaki/tiles/tilesEn.ts +0 -30
  99. package/src/literaki/tiles/tilesEs.ts +0 -32
  100. package/src/literaki/tiles/tilesFa.ts +0 -36
  101. package/src/literaki/tiles/tilesFr.ts +0 -30
  102. package/src/literaki/tiles/tilesPl.ts +0 -36
  103. package/src/scrabble/bonuses.ts +0 -67
  104. package/src/scrabble/index.ts +0 -1
  105. package/src/scrabble/scrabble.ts +0 -30
  106. package/src/scrabble/tiles/index.ts +0 -6
  107. package/src/scrabble/tiles/tilesDe.ts +0 -33
  108. package/src/scrabble/tiles/tilesEn.ts +0 -30
  109. package/src/scrabble/tiles/tilesEs.ts +0 -32
  110. package/src/scrabble/tiles/tilesFa.ts +0 -36
  111. package/src/scrabble/tiles/tilesFr.ts +0 -30
  112. package/src/scrabble/tiles/tilesPl.ts +0 -36
@@ -1,67 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const constants_1 = require("@scrabble-solver/constants");
4
- const bonuses = [
5
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 0, y: 0 },
6
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 3, y: 0 },
7
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 7, y: 0 },
8
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 11, y: 0 },
9
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 14, y: 0 },
10
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 1, y: 1 },
11
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 5, y: 1 },
12
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 9, y: 1 },
13
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 13, y: 1 },
14
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 2, y: 2 },
15
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 6, y: 2 },
16
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 8, y: 2 },
17
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 12, y: 2 },
18
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 0, y: 3 },
19
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 3, y: 3 },
20
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 7, y: 3 },
21
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 11, y: 3 },
22
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 14, y: 3 },
23
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 4, y: 4 },
24
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 10, y: 4 },
25
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 1, y: 5 },
26
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 5, y: 5 },
27
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 9, y: 5 },
28
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 13, y: 5 },
29
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 2, y: 6 },
30
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 6, y: 6 },
31
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 8, y: 6 },
32
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 12, y: 6 },
33
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 0, y: 7 },
34
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 3, y: 7 },
35
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 7, y: 7 },
36
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 11, y: 7 },
37
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 14, y: 7 },
38
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 2, y: 8 },
39
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 6, y: 8 },
40
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 8, y: 8 },
41
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 12, y: 8 },
42
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 1, y: 9 },
43
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 5, y: 9 },
44
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 9, y: 9 },
45
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 13, y: 9 },
46
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 4, y: 10 },
47
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 10, y: 10 },
48
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 0, y: 11 },
49
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 3, y: 11 },
50
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 7, y: 11 },
51
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 11, y: 11 },
52
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 14, y: 11 },
53
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 2, y: 12 },
54
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 6, y: 12 },
55
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 8, y: 12 },
56
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 12, y: 12 },
57
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 1, y: 13 },
58
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 5, y: 13 },
59
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 9, y: 13 },
60
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 13, y: 13 },
61
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 0, y: 14 },
62
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 3, y: 14 },
63
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 7, y: 14 },
64
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 11, y: 14 },
65
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 14, y: 14 },
66
- ];
67
- exports.default = bonuses;
@@ -1 +0,0 @@
1
- export { default } from './scrabble';
@@ -1,8 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.default = void 0;
7
- var scrabble_1 = require("./scrabble");
8
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(scrabble_1).default; } });
@@ -1,13 +0,0 @@
1
- import { Config } from '@scrabble-solver/types';
2
- declare const scrabble: {
3
- id: string;
4
- name: string;
5
- "en-GB": Config;
6
- "de-DE": Config;
7
- "en-US": Config;
8
- "es-ES": Config;
9
- "fa-IR": Config;
10
- "fr-FR": Config;
11
- "pl-PL": Config;
12
- };
13
- export default scrabble;
@@ -1,31 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const types_1 = require("@scrabble-solver/types");
7
- const bonuses_1 = __importDefault(require("./bonuses"));
8
- const tiles_1 = require("./tiles");
9
- const base = {
10
- allTilesBonusScore: 50,
11
- blankScore: 0,
12
- blanksCount: 2,
13
- boardHeight: 15,
14
- boardWidth: 15,
15
- bonuses: bonuses_1.default,
16
- id: 'scrabble',
17
- maximumCharactersCount: 7,
18
- name: 'Scrabble',
19
- };
20
- const scrabble = {
21
- id: base.id,
22
- name: base.name,
23
- [types_1.Locale.EN_GB]: types_1.Config.fromJson({ ...base, locale: types_1.Locale.EN_GB, tiles: tiles_1.tilesEn }),
24
- [types_1.Locale.DE_DE]: types_1.Config.fromJson({ ...base, locale: types_1.Locale.DE_DE, tiles: tiles_1.tilesDe }),
25
- [types_1.Locale.EN_US]: types_1.Config.fromJson({ ...base, locale: types_1.Locale.EN_US, tiles: tiles_1.tilesEn }),
26
- [types_1.Locale.ES_ES]: types_1.Config.fromJson({ ...base, locale: types_1.Locale.ES_ES, tiles: tiles_1.tilesEs }),
27
- [types_1.Locale.FA_IR]: types_1.Config.fromJson({ ...base, locale: types_1.Locale.FA_IR, tiles: tiles_1.tilesFa }),
28
- [types_1.Locale.FR_FR]: types_1.Config.fromJson({ ...base, locale: types_1.Locale.FR_FR, tiles: tiles_1.tilesFr }),
29
- [types_1.Locale.PL_PL]: types_1.Config.fromJson({ ...base, locale: types_1.Locale.PL_PL, tiles: tiles_1.tilesPl }),
30
- };
31
- exports.default = scrabble;
@@ -1,6 +0,0 @@
1
- export { default as tilesEn } from './tilesEn';
2
- export { default as tilesEs } from './tilesEs';
3
- export { default as tilesFa } from './tilesFa';
4
- export { default as tilesFr } from './tilesFr';
5
- export { default as tilesPl } from './tilesPl';
6
- export { default as tilesDe } from './tilesDe';
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.tilesDe = exports.tilesPl = exports.tilesFr = exports.tilesFa = exports.tilesEs = exports.tilesEn = void 0;
7
- var tilesEn_1 = require("./tilesEn");
8
- Object.defineProperty(exports, "tilesEn", { enumerable: true, get: function () { return __importDefault(tilesEn_1).default; } });
9
- var tilesEs_1 = require("./tilesEs");
10
- Object.defineProperty(exports, "tilesEs", { enumerable: true, get: function () { return __importDefault(tilesEs_1).default; } });
11
- var tilesFa_1 = require("./tilesFa");
12
- Object.defineProperty(exports, "tilesFa", { enumerable: true, get: function () { return __importDefault(tilesFa_1).default; } });
13
- var tilesFr_1 = require("./tilesFr");
14
- Object.defineProperty(exports, "tilesFr", { enumerable: true, get: function () { return __importDefault(tilesFr_1).default; } });
15
- var tilesPl_1 = require("./tilesPl");
16
- Object.defineProperty(exports, "tilesPl", { enumerable: true, get: function () { return __importDefault(tilesPl_1).default; } });
17
- var tilesDe_1 = require("./tilesDe");
18
- Object.defineProperty(exports, "tilesDe", { enumerable: true, get: function () { return __importDefault(tilesDe_1).default; } });
@@ -1,6 +0,0 @@
1
- declare const tilesDe: {
2
- character: string;
3
- count: number;
4
- score: number;
5
- }[];
6
- export default tilesDe;
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tilesDe = [
4
- { character: 'a', count: 5, score: 1 },
5
- { character: 'ä', count: 1, score: 6 },
6
- { character: 'b', count: 2, score: 3 },
7
- { character: 'c', count: 2, score: 4 },
8
- { character: 'd', count: 4, score: 1 },
9
- { character: 'e', count: 15, score: 1 },
10
- { character: 'f', count: 2, score: 4 },
11
- { character: 'g', count: 3, score: 2 },
12
- { character: 'h', count: 4, score: 2 },
13
- { character: 'i', count: 6, score: 1 },
14
- { character: 'j', count: 1, score: 6 },
15
- { character: 'k', count: 2, score: 4 },
16
- { character: 'l', count: 3, score: 2 },
17
- { character: 'm', count: 4, score: 3 },
18
- { character: 'n', count: 9, score: 1 },
19
- { character: 'o', count: 3, score: 2 },
20
- { character: 'ö', count: 1, score: 8 },
21
- { character: 'p', count: 1, score: 4 },
22
- { character: 'q', count: 1, score: 10 },
23
- { character: 'r', count: 6, score: 1 },
24
- { character: 's', count: 7, score: 1 },
25
- { character: 't', count: 6, score: 1 },
26
- { character: 'u', count: 6, score: 1 },
27
- { character: 'ü', count: 1, score: 6 },
28
- { character: 'v', count: 1, score: 6 },
29
- { character: 'w', count: 1, score: 3 },
30
- { character: 'x', count: 1, score: 8 },
31
- { character: 'y', count: 1, score: 10 },
32
- { character: 'z', count: 1, score: 3 },
33
- ];
34
- exports.default = tilesDe;
@@ -1,6 +0,0 @@
1
- declare const tilesEn: {
2
- character: string;
3
- count: number;
4
- score: number;
5
- }[];
6
- export default tilesEn;
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tilesEn = [
4
- { character: 'a', count: 9, score: 1 },
5
- { character: 'b', count: 2, score: 3 },
6
- { character: 'c', count: 2, score: 3 },
7
- { character: 'd', count: 4, score: 2 },
8
- { character: 'e', count: 12, score: 1 },
9
- { character: 'f', count: 2, score: 4 },
10
- { character: 'g', count: 3, score: 2 },
11
- { character: 'h', count: 2, score: 4 },
12
- { character: 'i', count: 9, score: 1 },
13
- { character: 'j', count: 1, score: 8 },
14
- { character: 'k', count: 1, score: 5 },
15
- { character: 'l', count: 4, score: 1 },
16
- { character: 'm', count: 2, score: 3 },
17
- { character: 'n', count: 6, score: 1 },
18
- { character: 'o', count: 8, score: 1 },
19
- { character: 'p', count: 2, score: 3 },
20
- { character: 'q', count: 1, score: 10 },
21
- { character: 'r', count: 6, score: 1 },
22
- { character: 's', count: 4, score: 1 },
23
- { character: 't', count: 6, score: 1 },
24
- { character: 'u', count: 4, score: 1 },
25
- { character: 'v', count: 2, score: 4 },
26
- { character: 'w', count: 2, score: 4 },
27
- { character: 'x', count: 1, score: 8 },
28
- { character: 'y', count: 2, score: 4 },
29
- { character: 'z', count: 1, score: 10 },
30
- ];
31
- exports.default = tilesEn;
@@ -1,6 +0,0 @@
1
- declare const tilesEs: {
2
- character: string;
3
- count: number;
4
- score: number;
5
- }[];
6
- export default tilesEs;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tilesEs = [
4
- { character: 'a', count: 12, score: 1 },
5
- { character: 'b', count: 2, score: 3 },
6
- { character: 'c', count: 4, score: 3 },
7
- { character: 'ch', count: 1, score: 5 },
8
- { character: 'd', count: 5, score: 2 },
9
- { character: 'e', count: 12, score: 1 },
10
- { character: 'f', count: 1, score: 4 },
11
- { character: 'g', count: 2, score: 2 },
12
- { character: 'h', count: 2, score: 4 },
13
- { character: 'i', count: 6, score: 1 },
14
- { character: 'j', count: 1, score: 8 },
15
- { character: 'll', count: 1, score: 8 },
16
- { character: 'l', count: 4, score: 1 },
17
- { character: 'm', count: 2, score: 3 },
18
- { character: 'n', count: 5, score: 1 },
19
- { character: 'ñ', count: 1, score: 8 },
20
- { character: 'o', count: 9, score: 1 },
21
- { character: 'p', count: 2, score: 3 },
22
- { character: 'q', count: 1, score: 5 },
23
- { character: 'r', count: 5, score: 1 },
24
- { character: 'rr', count: 1, score: 8 },
25
- { character: 's', count: 6, score: 1 },
26
- { character: 't', count: 4, score: 1 },
27
- { character: 'u', count: 5, score: 1 },
28
- { character: 'v', count: 1, score: 4 },
29
- { character: 'x', count: 1, score: 8 },
30
- { character: 'y', count: 1, score: 4 },
31
- { character: 'z', count: 1, score: 10 },
32
- ];
33
- exports.default = tilesEs;
@@ -1,6 +0,0 @@
1
- declare const tilesFa: {
2
- character: string;
3
- count: number;
4
- score: number;
5
- }[];
6
- export default tilesFa;
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tilesFa = [
4
- { character: 'ا', count: 12, score: 1 },
5
- { character: 'ب', count: 4, score: 1 },
6
- { character: 'پ', count: 1, score: 6 },
7
- { character: 'ت', count: 4, score: 1 },
8
- { character: 'ث', count: 1, score: 10 },
9
- { character: 'ج', count: 2, score: 5 },
10
- { character: 'چ', count: 1, score: 6 },
11
- { character: 'ح', count: 1, score: 6 },
12
- { character: 'خ', count: 2, score: 5 },
13
- { character: 'د', count: 6, score: 1 },
14
- { character: 'ذ', count: 1, score: 10 },
15
- { character: 'ر', count: 7, score: 1 },
16
- { character: 'ز', count: 3, score: 4 },
17
- { character: 'ژ', count: 1, score: 10 },
18
- { character: 'س', count: 3, score: 2 },
19
- { character: 'ش', count: 3, score: 3 },
20
- { character: 'ص', count: 1, score: 6 },
21
- { character: 'ض', count: 1, score: 8 },
22
- { character: 'ط', count: 1, score: 8 },
23
- { character: 'ظ', count: 1, score: 10 },
24
- { character: 'ع', count: 2, score: 5 },
25
- { character: 'غ', count: 1, score: 8 },
26
- { character: 'ف', count: 2, score: 4 },
27
- { character: 'ق', count: 2, score: 5 },
28
- { character: 'ک', count: 3, score: 3 },
29
- { character: 'گ', count: 2, score: 4 },
30
- { character: 'ل', count: 3, score: 2 },
31
- { character: 'م', count: 5, score: 1 },
32
- { character: 'ن', count: 6, score: 1 },
33
- { character: 'و', count: 5, score: 1 },
34
- { character: 'ه', count: 5, score: 1 },
35
- { character: 'ی', count: 8, score: 1 },
36
- ];
37
- exports.default = tilesFa;
@@ -1,6 +0,0 @@
1
- declare const tilesFr: {
2
- character: string;
3
- count: number;
4
- score: number;
5
- }[];
6
- export default tilesFr;
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tilesFr = [
4
- { character: 'a', count: 9, score: 1 },
5
- { character: 'b', count: 2, score: 3 },
6
- { character: 'c', count: 2, score: 3 },
7
- { character: 'd', count: 3, score: 2 },
8
- { character: 'e', count: 15, score: 1 },
9
- { character: 'f', count: 2, score: 4 },
10
- { character: 'g', count: 2, score: 2 },
11
- { character: 'h', count: 2, score: 4 },
12
- { character: 'i', count: 8, score: 1 },
13
- { character: 'j', count: 1, score: 8 },
14
- { character: 'k', count: 1, score: 10 },
15
- { character: 'l', count: 5, score: 1 },
16
- { character: 'm', count: 3, score: 2 },
17
- { character: 'n', count: 6, score: 1 },
18
- { character: 'o', count: 6, score: 1 },
19
- { character: 'p', count: 2, score: 3 },
20
- { character: 'q', count: 1, score: 8 },
21
- { character: 'r', count: 6, score: 1 },
22
- { character: 's', count: 6, score: 1 },
23
- { character: 't', count: 6, score: 1 },
24
- { character: 'u', count: 6, score: 1 },
25
- { character: 'v', count: 2, score: 4 },
26
- { character: 'w', count: 1, score: 10 },
27
- { character: 'x', count: 1, score: 10 },
28
- { character: 'y', count: 1, score: 10 },
29
- { character: 'z', count: 1, score: 10 },
30
- ];
31
- exports.default = tilesFr;
@@ -1,6 +0,0 @@
1
- declare const tilesPl: {
2
- character: string;
3
- count: number;
4
- score: number;
5
- }[];
6
- export default tilesPl;
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tilesPl = [
4
- { character: 'a', count: 9, score: 1 },
5
- { character: 'ą', count: 1, score: 5 },
6
- { character: 'b', count: 2, score: 3 },
7
- { character: 'c', count: 3, score: 2 },
8
- { character: 'ć', count: 1, score: 6 },
9
- { character: 'd', count: 3, score: 2 },
10
- { character: 'e', count: 7, score: 1 },
11
- { character: 'ę', count: 1, score: 5 },
12
- { character: 'f', count: 1, score: 5 },
13
- { character: 'g', count: 2, score: 3 },
14
- { character: 'h', count: 2, score: 3 },
15
- { character: 'i', count: 8, score: 1 },
16
- { character: 'j', count: 2, score: 3 },
17
- { character: 'k', count: 3, score: 2 },
18
- { character: 'l', count: 3, score: 2 },
19
- { character: 'ł', count: 2, score: 3 },
20
- { character: 'm', count: 3, score: 2 },
21
- { character: 'n', count: 5, score: 1 },
22
- { character: 'ń', count: 1, score: 7 },
23
- { character: 'o', count: 6, score: 1 },
24
- { character: 'ó', count: 1, score: 5 },
25
- { character: 'p', count: 3, score: 2 },
26
- { character: 'r', count: 4, score: 1 },
27
- { character: 's', count: 4, score: 1 },
28
- { character: 'ś', count: 1, score: 5 },
29
- { character: 't', count: 3, score: 2 },
30
- { character: 'u', count: 2, score: 3 },
31
- { character: 'w', count: 4, score: 1 },
32
- { character: 'y', count: 4, score: 2 },
33
- { character: 'z', count: 5, score: 1 },
34
- { character: 'ź', count: 1, score: 9 },
35
- { character: 'ż', count: 1, score: 5 },
36
- ];
37
- exports.default = tilesPl;
@@ -1,9 +0,0 @@
1
- import { Config, Locale } from '@scrabble-solver/types';
2
-
3
- import getConfig from './getConfig';
4
-
5
- const getLocaleConfig = (configId: string, locale: Locale): Config => {
6
- return getConfig(configId)[locale];
7
- };
8
-
9
- export default getLocaleConfig;
package/src/isConfigId.ts DELETED
@@ -1,10 +0,0 @@
1
- import literaki from './literaki';
2
- import scrabble from './scrabble';
3
-
4
- const configs = [literaki, scrabble];
5
-
6
- const isConfigId = (configId: unknown): boolean => {
7
- return configs.some(({ id }) => id === configId);
8
- };
9
-
10
- export default isConfigId;
@@ -1,99 +0,0 @@
1
- import { BONUS_CHARACTER, BONUS_WORD } from '@scrabble-solver/constants';
2
-
3
- const bonuses = [
4
- { multiplier: 3, score: 5, type: BONUS_CHARACTER, x: 0, y: 0 },
5
- { multiplier: 3, type: BONUS_WORD, x: 2, y: 0 },
6
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 5, y: 0 },
7
- { multiplier: 3, score: 5, type: BONUS_CHARACTER, x: 7, y: 0 },
8
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 9, y: 0 },
9
- { multiplier: 3, type: BONUS_WORD, x: 12, y: 0 },
10
- { multiplier: 3, score: 5, type: BONUS_CHARACTER, x: 14, y: 0 },
11
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 4, y: 1 },
12
- { multiplier: 3, score: 5, type: BONUS_CHARACTER, x: 6, y: 1 },
13
- { multiplier: 3, score: 5, type: BONUS_CHARACTER, x: 8, y: 1 },
14
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 10, y: 1 },
15
- { multiplier: 3, type: BONUS_WORD, x: 0, y: 2 },
16
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 3, y: 2 },
17
- { multiplier: 2, type: BONUS_WORD, x: 5, y: 2 },
18
- { multiplier: 3, score: 1, type: BONUS_CHARACTER, x: 7, y: 2 },
19
- { multiplier: 2, type: BONUS_WORD, x: 9, y: 2 },
20
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 11, y: 2 },
21
- { multiplier: 3, type: BONUS_WORD, x: 14, y: 2 },
22
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 2, y: 3 },
23
- { multiplier: 2, type: BONUS_WORD, x: 4, y: 3 },
24
- { multiplier: 3, score: 1, type: BONUS_CHARACTER, x: 6, y: 3 },
25
- { multiplier: 3, score: 1, type: BONUS_CHARACTER, x: 8, y: 3 },
26
- { multiplier: 2, type: BONUS_WORD, x: 10, y: 3 },
27
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 12, y: 3 },
28
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 1, y: 4 },
29
- { multiplier: 2, type: BONUS_WORD, x: 3, y: 4 },
30
- { multiplier: 3, score: 1, type: BONUS_CHARACTER, x: 5, y: 4 },
31
- { multiplier: 3, score: 1, type: BONUS_CHARACTER, x: 9, y: 4 },
32
- { multiplier: 2, type: BONUS_WORD, x: 11, y: 4 },
33
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 13, y: 4 },
34
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 0, y: 5 },
35
- { multiplier: 2, type: BONUS_WORD, x: 2, y: 5 },
36
- { multiplier: 3, score: 1, type: BONUS_CHARACTER, x: 4, y: 5 },
37
- { multiplier: 3, score: 3, type: BONUS_CHARACTER, x: 7, y: 5 },
38
- { multiplier: 3, score: 1, type: BONUS_CHARACTER, x: 10, y: 5 },
39
- { multiplier: 2, type: BONUS_WORD, x: 12, y: 5 },
40
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 14, y: 5 },
41
- { multiplier: 3, score: 5, type: BONUS_CHARACTER, x: 1, y: 6 },
42
- { multiplier: 3, score: 1, type: BONUS_CHARACTER, x: 3, y: 6 },
43
- { multiplier: 3, score: 3, type: BONUS_CHARACTER, x: 6, y: 6 },
44
- { multiplier: 3, score: 3, type: BONUS_CHARACTER, x: 8, y: 6 },
45
- { multiplier: 3, score: 1, type: BONUS_CHARACTER, x: 11, y: 6 },
46
- { multiplier: 3, score: 5, type: BONUS_CHARACTER, x: 13, y: 6 },
47
- { multiplier: 3, score: 5, type: BONUS_CHARACTER, x: 0, y: 7 },
48
- { multiplier: 3, score: 1, type: BONUS_CHARACTER, x: 2, y: 7 },
49
- { multiplier: 3, score: 3, type: BONUS_CHARACTER, x: 5, y: 7 },
50
- { multiplier: 3, score: 5, type: BONUS_CHARACTER, x: 7, y: 7 },
51
- { multiplier: 3, score: 3, type: BONUS_CHARACTER, x: 9, y: 7 },
52
- { multiplier: 3, score: 1, type: BONUS_CHARACTER, x: 12, y: 7 },
53
- { multiplier: 3, score: 5, type: BONUS_CHARACTER, x: 14, y: 7 },
54
- { multiplier: 3, score: 5, type: BONUS_CHARACTER, x: 1, y: 8 },
55
- { multiplier: 3, score: 1, type: BONUS_CHARACTER, x: 3, y: 8 },
56
- { multiplier: 3, score: 3, type: BONUS_CHARACTER, x: 6, y: 8 },
57
- { multiplier: 3, score: 3, type: BONUS_CHARACTER, x: 8, y: 8 },
58
- { multiplier: 3, score: 1, type: BONUS_CHARACTER, x: 11, y: 8 },
59
- { multiplier: 3, score: 5, type: BONUS_CHARACTER, x: 13, y: 8 },
60
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 0, y: 9 },
61
- { multiplier: 2, type: BONUS_WORD, x: 2, y: 9 },
62
- { multiplier: 3, score: 1, type: BONUS_CHARACTER, x: 4, y: 9 },
63
- { multiplier: 3, score: 3, type: BONUS_CHARACTER, x: 7, y: 9 },
64
- { multiplier: 3, score: 1, type: BONUS_CHARACTER, x: 10, y: 9 },
65
- { multiplier: 2, type: BONUS_WORD, x: 12, y: 9 },
66
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 14, y: 9 },
67
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 1, y: 10 },
68
- { multiplier: 2, type: BONUS_WORD, x: 3, y: 10 },
69
- { multiplier: 3, score: 1, type: BONUS_CHARACTER, x: 5, y: 10 },
70
- { multiplier: 3, score: 1, type: BONUS_CHARACTER, x: 9, y: 10 },
71
- { multiplier: 2, type: BONUS_WORD, x: 11, y: 10 },
72
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 13, y: 10 },
73
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 2, y: 11 },
74
- { multiplier: 2, type: BONUS_WORD, x: 4, y: 11 },
75
- { multiplier: 3, score: 1, type: BONUS_CHARACTER, x: 6, y: 11 },
76
- { multiplier: 3, score: 1, type: BONUS_CHARACTER, x: 8, y: 11 },
77
- { multiplier: 2, type: BONUS_WORD, x: 10, y: 11 },
78
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 12, y: 11 },
79
- { multiplier: 3, type: BONUS_WORD, x: 0, y: 12 },
80
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 3, y: 12 },
81
- { multiplier: 2, type: BONUS_WORD, x: 5, y: 12 },
82
- { multiplier: 3, score: 1, type: BONUS_CHARACTER, x: 7, y: 12 },
83
- { multiplier: 2, type: BONUS_WORD, x: 9, y: 12 },
84
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 11, y: 12 },
85
- { multiplier: 3, type: BONUS_WORD, x: 14, y: 12 },
86
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 4, y: 13 },
87
- { multiplier: 3, score: 5, type: BONUS_CHARACTER, x: 6, y: 13 },
88
- { multiplier: 3, score: 5, type: BONUS_CHARACTER, x: 8, y: 13 },
89
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 10, y: 13 },
90
- { multiplier: 3, score: 5, type: BONUS_CHARACTER, x: 0, y: 14 },
91
- { multiplier: 3, type: BONUS_WORD, x: 2, y: 14 },
92
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 5, y: 14 },
93
- { multiplier: 3, score: 5, type: BONUS_CHARACTER, x: 7, y: 14 },
94
- { multiplier: 3, score: 2, type: BONUS_CHARACTER, x: 9, y: 14 },
95
- { multiplier: 3, type: BONUS_WORD, x: 12, y: 14 },
96
- { multiplier: 3, score: 5, type: BONUS_CHARACTER, x: 14, y: 14 },
97
- ];
98
-
99
- export default bonuses;
@@ -1 +0,0 @@
1
- export { default } from './literaki';
@@ -1,30 +0,0 @@
1
- import { Config, Locale } from '@scrabble-solver/types';
2
-
3
- import bonuses from './bonuses';
4
- import { tilesDe, tilesEn, tilesEs, tilesFa, tilesFr, tilesPl } from './tiles';
5
-
6
- const base = {
7
- allTilesBonusScore: 50,
8
- blankScore: 0,
9
- blanksCount: 2,
10
- boardHeight: 15,
11
- boardWidth: 15,
12
- bonuses,
13
- id: 'literaki',
14
- maximumCharactersCount: 7,
15
- name: 'Literaki',
16
- };
17
-
18
- const literaki = {
19
- id: base.id,
20
- name: base.name,
21
- [Locale.DE_DE]: Config.fromJson({ ...base, locale: Locale.EN_GB, tiles: tilesDe }),
22
- [Locale.EN_GB]: Config.fromJson({ ...base, locale: Locale.DE_DE, tiles: tilesEn }),
23
- [Locale.EN_US]: Config.fromJson({ ...base, locale: Locale.EN_US, tiles: tilesEn }),
24
- [Locale.ES_ES]: Config.fromJson({ ...base, locale: Locale.ES_ES, tiles: tilesEs }),
25
- [Locale.FA_IR]: Config.fromJson({ ...base, locale: Locale.FA_IR, tiles: tilesFa }),
26
- [Locale.FR_FR]: Config.fromJson({ ...base, locale: Locale.FR_FR, tiles: tilesFr }),
27
- [Locale.PL_PL]: Config.fromJson({ ...base, locale: Locale.PL_PL, tiles: tilesPl }),
28
- };
29
-
30
- export default literaki;
@@ -1,6 +0,0 @@
1
- export { default as tilesEn } from './tilesEn';
2
- export { default as tilesEs } from './tilesEs';
3
- export { default as tilesFa } from './tilesFa';
4
- export { default as tilesFr } from './tilesFr';
5
- export { default as tilesPl } from './tilesPl';
6
- export { default as tilesDe } from './tilesDe';
@@ -1,33 +0,0 @@
1
- const tilesDe = [
2
- { character: 'a', count: 5, score: 1 },
3
- { character: 'ä', count: 1, score: 6 },
4
- { character: 'b', count: 2, score: 3 },
5
- { character: 'c', count: 2, score: 4 },
6
- { character: 'd', count: 4, score: 1 },
7
- { character: 'e', count: 15, score: 1 },
8
- { character: 'f', count: 2, score: 4 },
9
- { character: 'g', count: 3, score: 2 },
10
- { character: 'h', count: 4, score: 2 },
11
- { character: 'i', count: 6, score: 1 },
12
- { character: 'j', count: 1, score: 6 },
13
- { character: 'k', count: 2, score: 4 },
14
- { character: 'l', count: 3, score: 2 },
15
- { character: 'm', count: 4, score: 3 },
16
- { character: 'n', count: 9, score: 1 },
17
- { character: 'o', count: 3, score: 2 },
18
- { character: 'ö', count: 1, score: 8 },
19
- { character: 'p', count: 1, score: 4 },
20
- { character: 'q', count: 1, score: 10 },
21
- { character: 'r', count: 6, score: 1 },
22
- { character: 's', count: 7, score: 1 },
23
- { character: 't', count: 6, score: 1 },
24
- { character: 'u', count: 6, score: 1 },
25
- { character: 'ü', count: 1, score: 6 },
26
- { character: 'v', count: 1, score: 6 },
27
- { character: 'w', count: 1, score: 3 },
28
- { character: 'x', count: 1, score: 8 },
29
- { character: 'y', count: 1, score: 10 },
30
- { character: 'z', count: 1, score: 3 },
31
- ];
32
-
33
- export default tilesDe;
@@ -1,30 +0,0 @@
1
- const tilesEn = [
2
- { character: 'a', count: 9, score: 1 },
3
- { character: 'b', count: 2, score: 3 },
4
- { character: 'c', count: 2, score: 3 },
5
- { character: 'd', count: 4, score: 2 },
6
- { character: 'e', count: 12, score: 1 },
7
- { character: 'f', count: 2, score: 4 },
8
- { character: 'g', count: 3, score: 2 },
9
- { character: 'h', count: 2, score: 4 },
10
- { character: 'i', count: 9, score: 1 },
11
- { character: 'j', count: 1, score: 8 },
12
- { character: 'k', count: 1, score: 5 },
13
- { character: 'l', count: 4, score: 1 },
14
- { character: 'm', count: 2, score: 3 },
15
- { character: 'n', count: 6, score: 1 },
16
- { character: 'o', count: 8, score: 1 },
17
- { character: 'p', count: 2, score: 3 },
18
- { character: 'q', count: 1, score: 10 },
19
- { character: 'r', count: 6, score: 1 },
20
- { character: 's', count: 4, score: 1 },
21
- { character: 't', count: 6, score: 1 },
22
- { character: 'u', count: 4, score: 1 },
23
- { character: 'v', count: 2, score: 4 },
24
- { character: 'w', count: 2, score: 4 },
25
- { character: 'x', count: 1, score: 8 },
26
- { character: 'y', count: 2, score: 4 },
27
- { character: 'z', count: 1, score: 10 },
28
- ];
29
-
30
- export default tilesEn;