document.getElementById("number").textContent = localStorage.trivabbleGameNumber = value;
break;
case "boardLang":
- document.getElementById("board-lang").textContent =
- langName[localStorage.trivabbleBoardLang = value];
+ localStorage.trivabbleBoardLang = value;
+ document.getElementById("board-lang").textContent = langName[value];
break;
}
}
function changeBoardLang(lang) {
myConfirm(
- _("Are you sure you want to change board to '" + langName[lang] + "'? This will put all the tiles back in the bag an start another game."),
+ format(_("Are you sure you want to change board to '{0}'? This will put all the tiles back in the bag and start another game."), langName[lang]),
function () {
sendCmds([{cmd: "changeBoard", lang: lang}]);
}
+++ /dev/null
-/**
- * Copyright (C) 2020 Laurent Mazet <mazet@softndesign.org>
- *
- * @licstart
- * This file is part of Trivabble.
- *
- * Trivabble is free software: you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License (GNU AGPL)
- * as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version.
- *
- * Trivabble is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with Trivabble. If not, see <http://www.gnu.org/licenses/>.
- * @licend
- *
- * @source: https://trivabble.1s.fr/
- * @source: https://gitlab.com/raphj/trivabble/
- */
-
-module.exports = {
-
- /*
- 102 jetons:
- - 0 point: Joker *2
- - 1 point : E *15, N *9, S *7, I *6, R *6, T *6, U *6, A *5, D *4
- - 2 points : H *4, G *3, L *3, O *3
- - 3 points : M *4, B *2, W *1, Z *1
- - 4 points : C *2, F *2, K *2, P *1
- - 6 points : Ä *1, J *1, Ü *1, V *1
- - 8 points : Ö *1, X *1
- - 10 points : Q *1, Y *1
- */
-
- bag: [
- " ", " ", // Joker
- "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E",
- "N", "N", "N", "N", "N", "N", "N", "N", "N",
- "S", "S", "S", "S", "S", "S", "S",
- "I", "I", "I", "I", "I", "I",
- "R", "R", "R", "R", "R", "R",
- "T", "T", "T", "T", "T", "T",
- "U", "U", "U", "U", "U", "U",
- "A", "A", "A", "A", "A",
- "D", "D", "D", "D",
- "H", "H", "H", "H",
- "G", "G", "G",
- "L", "L", "L",
- "O", "O", "O",
- "M", "M", "M", "M",
- "B", "B",
- "W",
- "Z",
- "C", "C",
- "F", "F",
- "K", "K",
- "P",
- "Ä",
- "J",
- "Ü",
- "V",
- "Ö",
- "X",
- "Q",
- "Y"
- ],
-
- values: {
- " ": 0,
- "E": 1,
- "N": 1,
- "S": 1,
- "I": 1,
- "R": 1,
- "T": 1,
- "U": 1,
- "A": 1,
- "D": 1,
- "H": 2,
- "G": 2,
- "L": 2,
- "O": 2,
- "M": 3,
- "B": 3,
- "W": 3,
- "Z": 3,
- "C": 4,
- "F": 4,
- "K": 4,
- "P": 4,
- "Ä": 6,
- "J": 6,
- "Ü": 6,
- "V": 6,
- "Ö": 8,
- "X": 8,
- "Q": 10,
- "Y": 10
- }
-};
+++ /dev/null
-/**
- * Copyright (C) 2020 Laurent Mazet <mazet@softndesign.org>
- *
- * @licstart
- * This file is part of Trivabble.
- *
- * Trivabble is free software: you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License (GNU AGPL)
- * as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version.
- *
- * Trivabble is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with Trivabble. If not, see <http://www.gnu.org/licenses/>.
- * @licend
- *
- * @source: https://trivabble.1s.fr/
- * @source: https://gitlab.com/raphj/trivabble/
- */
-
-module.exports = {
- /*
- 100 jetons:
- - 0 point: Blank *2
- - 1 point : E *12, A *9, I *9, O *8, R *6, N *6, T *6, L *4, S *4, U *4
- - 2 points : D *4, G *3
- - 3 points : B *2, C *2, M *2, P *2
- - 4 points : F *2, H *2, V *2, W *2, Y *2
- - 5 points : K *1
- - 8 points : J *1, X *1
- - 10 points : Q *1, Z *1
- */
-
- bag: [
- " ", " ", // Blanks
- "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E",
- "A", "A", "A", "A", "A", "A", "A", "A", "A",
- "I", "I", "I", "I", "I", "I", "I", "I", "I",
- "O", "O", "O", "O", "O", "O", "O", "O",
- "R", "R", "R", "R", "R", "R",
- "N", "N", "N", "N", "N", "N",
- "T", "T", "T", "T", "T", "T",
- "L", "L", "L", "L",
- "S", "S", "S", "S",
- "U", "U", "U", "U",
- "D", "D", "D", "D",
- "G", "G", "G",
- "B", "B",
- "C", "C",
- "M", "M",
- "P", "P",
- "F", "F",
- "H", "H",
- "V", "V",
- "W", "W",
- "Y", "Y",
- "K",
- "J",
- "X",
- "Q",
- "Z"
- ],
-
- values: {
- " ": 0,
- "E": 1,
- "A": 1,
- "I": 1,
- "O": 1,
- "R": 1,
- "N": 1,
- "T": 1,
- "L": 1,
- "S": 1,
- "U": 1,
- "D": 2,
- "G": 2,
- "B": 3,
- "C": 3,
- "M": 3,
- "P": 3,
- "F": 4,
- "H": 4,
- "V": 4,
- "W": 4,
- "Y": 4,
- "K": 5,
- "J": 8,
- "X": 8,
- "Q": 10,
- "Z": 10
- }
-};
+++ /dev/null
-/**
- * Copyright (C) 2020 Laurent Mazet <mazet@softndesign.org>
- *
- * @licstart
- * This file is part of Trivabble.
- *
- * Trivabble is free software: you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License (GNU AGPL)
- * as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version.
- *
- * Trivabble is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with Trivabble. If not, see <http://www.gnu.org/licenses/>.
- * @licend
- *
- * @source: https://trivabble.1s.fr/
- * @source: https://gitlab.com/raphj/trivabble/
- */
-
-module.exports = {
- /*
- 100 jetons:
- - 0 point: Comodin *2
- - 1 point : A *12, E *12, O *9, I *6, S *6, N *5, R *5, U *5, L *4, T *4
- - 2 points : D *5, G *2
- - 3 points : C *4, B *2, M *2, P *2
- - 4 points : H *2, F *1, V *1, Y *1
- - 5 points : CH *1, Q *1
- - 8 points : J *1, LL *1, Ñ *1, RR *1, X *1
- - 10 points : Z *1
- */
-
- bag: [
- " ", " ", // Comodines
- "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A",
- "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E",
- "O", "O", "O", "O", "O", "O", "O", "O", "O",
- "I", "I", "I", "I", "I", "I",
- "S", "S", "S", "S", "S", "S",
- "N", "N", "N", "N", "N",
- "R", "R", "R", "R", "R",
- "U", "U", "U", "U", "U",
- "L", "L", "L", "L",
- "T", "T", "T", "T",
- "D", "D", "D", "D", "D",
- "G", "G",
- "C", "C", "C", "C",
- "B", "B",
- "M", "M",
- "P", "P",
- "H", "H",
- "F",
- "V",
- "Y",
- "CH",
- "Q",
- "J",
- "LL",
- "Ñ",
- "RR",
- "X",
- "Z"
- ],
-
- values: {
- " ": 0,
- "A": 1,
- "E": 1,
- "O": 1,
- "I": 1,
- "S": 1,
- "N": 1,
- "R": 1,
- "U": 1,
- "L": 1,
- "T": 1,
- "D": 2,
- "G": 2,
- "C": 3,
- "B": 3,
- "M": 3,
- "P": 3,
- "H": 4,
- "F": 4,
- "V": 4,
- "Y": 4,
- "CH": 5,
- "Q": 5,
- "J": 8,
- "LL": 8,
- "Ñ": 8,
- "RR": 8,
- "X": 8,
- "Z": 10
- }
-};
+++ /dev/null
-/**
- * Copyright (C) 2020 Laurent Mazet <mazet@softndesign.org>
- *
- * @licstart
- * This file is part of Trivabble.
- *
- * Trivabble is free software: you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License (GNU AGPL)
- * as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version.
- *
- * Trivabble is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with Trivabble. If not, see <http://www.gnu.org/licenses/>.
- * @licend
- *
- * @source: https://trivabble.1s.fr/
- * @source: https://gitlab.com/raphj/trivabble/
- */
-
-module.exports = {
-/*
- 102 jetons
- - 0 point : Joker *2
- - 1 point : E *15, A *9, I *8, N *6, O *6, R *6, S *6, T *6, U *6, L *5
- - 2 points : D *3, M *3, G *2
- - 3 points : B *2, C *2, P *2
- - 4 points : F *2, H *2, V *2
- - 8 points : J *1, Q *1
- - 10 points : K *1, W *1, X *1, Y *1, Z *1
- */
-
- bag: [
- " ", " ", // Jokers
- "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E",
- "A", "A", "A", "A", "A", "A", "A", "A", "A",
- "I", "I", "I", "I", "I", "I", "I", "I",
- "N", "N", "N", "N", "N", "N",
- "O", "O", "O", "O", "O", "O",
- "R", "R", "R", "R", "R", "R",
- "S", "S", "S", "S", "S", "S",
- "T", "T", "T", "T", "T", "T",
- "U", "U", "U", "U", "U", "U",
- "L", "L", "L", "L", "L",
- "D", "D", "D",
- "M", "M", "M",
- "G", "G",
- "B", "B",
- "C", "C",
- "P", "P",
- "F", "F",
- "H", "H",
- "V", "V",
- "J",
- "Q",
- "K",
- "W",
- "X",
- "Y",
- "Z"
- ],
-
- values: {
- " ": 0,
- "E": 1,
- "A": 1,
- "I": 1,
- "N": 1,
- "O": 1,
- "R": 1,
- "S": 1,
- "T": 1,
- "U": 1,
- "L": 1,
- "D": 2,
- "M": 2,
- "G": 2,
- "B": 3,
- "C": 3,
- "P": 3,
- "F": 4,
- "H": 4,
- "V": 4,
- "J": 8,
- "Q": 8,
- "K": 10,
- "W": 10,
- "X": 10,
- "Y": 10,
- "Z": 10
- }
-};
--- /dev/null
+/**
+ * Copyright (C) 2020 Laurent Mazet <mazet@softndesign.org>
+ *
+ * @licstart
+ * This file is part of Trivabble.
+ *
+ * Trivabble is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License (GNU AGPL)
+ * as published by the Free Software Foundation, either version 3 of
+ * the License, or (at your option) any later version.
+ *
+ * Trivabble is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Trivabble. If not, see <http://www.gnu.org/licenses/>.
+ * @licend
+ *
+ * @source: https://trivabble.1s.fr/
+ * @source: https://gitlab.com/raphj/trivabble/
+ */
+
+module.exports = {
+
+ /*
+ 102 jetons:
+ - 0 point: Joker *2
+ - 1 point : E *15, N *9, S *7, I *6, R *6, T *6, U *6, A *5, D *4
+ - 2 points : H *4, G *3, L *3, O *3
+ - 3 points : M *4, B *2, W *1, Z *1
+ - 4 points : C *2, F *2, K *2, P *1
+ - 6 points : Ä *1, J *1, Ü *1, V *1
+ - 8 points : Ö *1, X *1
+ - 10 points : Q *1, Y *1
+ */
+
+ bag: [
+ " ", " ", // Joker
+ "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E",
+ "N", "N", "N", "N", "N", "N", "N", "N", "N",
+ "S", "S", "S", "S", "S", "S", "S",
+ "I", "I", "I", "I", "I", "I",
+ "R", "R", "R", "R", "R", "R",
+ "T", "T", "T", "T", "T", "T",
+ "U", "U", "U", "U", "U", "U",
+ "A", "A", "A", "A", "A",
+ "D", "D", "D", "D",
+ "H", "H", "H", "H",
+ "G", "G", "G",
+ "L", "L", "L",
+ "O", "O", "O",
+ "M", "M", "M", "M",
+ "B", "B",
+ "W",
+ "Z",
+ "C", "C",
+ "F", "F",
+ "K", "K",
+ "P",
+ "Ä",
+ "J",
+ "Ü",
+ "V",
+ "Ö",
+ "X",
+ "Q",
+ "Y"
+ ],
+
+ letterValues: {
+ " ": 0,
+ "E": 1,
+ "N": 1,
+ "S": 1,
+ "I": 1,
+ "R": 1,
+ "T": 1,
+ "U": 1,
+ "A": 1,
+ "D": 1,
+ "H": 2,
+ "G": 2,
+ "L": 2,
+ "O": 2,
+ "M": 3,
+ "B": 3,
+ "W": 3,
+ "Z": 3,
+ "C": 4,
+ "F": 4,
+ "K": 4,
+ "P": 4,
+ "Ä": 6,
+ "J": 6,
+ "Ü": 6,
+ "V": 6,
+ "Ö": 8,
+ "X": 8,
+ "Q": 10,
+ "Y": 10
+ }
+};
--- /dev/null
+/**
+ * Copyright (C) 2020 Laurent Mazet <mazet@softndesign.org>
+ *
+ * @licstart
+ * This file is part of Trivabble.
+ *
+ * Trivabble is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License (GNU AGPL)
+ * as published by the Free Software Foundation, either version 3 of
+ * the License, or (at your option) any later version.
+ *
+ * Trivabble is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Trivabble. If not, see <http://www.gnu.org/licenses/>.
+ * @licend
+ *
+ * @source: https://trivabble.1s.fr/
+ * @source: https://gitlab.com/raphj/trivabble/
+ */
+
+module.exports = {
+ /*
+ 100 jetons:
+ - 0 point: Blank *2
+ - 1 point : E *12, A *9, I *9, O *8, R *6, N *6, T *6, L *4, S *4, U *4
+ - 2 points : D *4, G *3
+ - 3 points : B *2, C *2, M *2, P *2
+ - 4 points : F *2, H *2, V *2, W *2, Y *2
+ - 5 points : K *1
+ - 8 points : J *1, X *1
+ - 10 points : Q *1, Z *1
+ */
+
+ bag: [
+ " ", " ", // Blanks
+ "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E",
+ "A", "A", "A", "A", "A", "A", "A", "A", "A",
+ "I", "I", "I", "I", "I", "I", "I", "I", "I",
+ "O", "O", "O", "O", "O", "O", "O", "O",
+ "R", "R", "R", "R", "R", "R",
+ "N", "N", "N", "N", "N", "N",
+ "T", "T", "T", "T", "T", "T",
+ "L", "L", "L", "L",
+ "S", "S", "S", "S",
+ "U", "U", "U", "U",
+ "D", "D", "D", "D",
+ "G", "G", "G",
+ "B", "B",
+ "C", "C",
+ "M", "M",
+ "P", "P",
+ "F", "F",
+ "H", "H",
+ "V", "V",
+ "W", "W",
+ "Y", "Y",
+ "K",
+ "J",
+ "X",
+ "Q",
+ "Z"
+ ],
+
+ letterValues: {
+ " ": 0,
+ "E": 1,
+ "A": 1,
+ "I": 1,
+ "O": 1,
+ "R": 1,
+ "N": 1,
+ "T": 1,
+ "L": 1,
+ "S": 1,
+ "U": 1,
+ "D": 2,
+ "G": 2,
+ "B": 3,
+ "C": 3,
+ "M": 3,
+ "P": 3,
+ "F": 4,
+ "H": 4,
+ "V": 4,
+ "W": 4,
+ "Y": 4,
+ "K": 5,
+ "J": 8,
+ "X": 8,
+ "Q": 10,
+ "Z": 10
+ }
+};
--- /dev/null
+/**
+ * Copyright (C) 2020 Laurent Mazet <mazet@softndesign.org>
+ *
+ * @licstart
+ * This file is part of Trivabble.
+ *
+ * Trivabble is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License (GNU AGPL)
+ * as published by the Free Software Foundation, either version 3 of
+ * the License, or (at your option) any later version.
+ *
+ * Trivabble is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Trivabble. If not, see <http://www.gnu.org/licenses/>.
+ * @licend
+ *
+ * @source: https://trivabble.1s.fr/
+ * @source: https://gitlab.com/raphj/trivabble/
+ */
+
+module.exports = {
+ /*
+ 100 jetons:
+ - 0 point: Comodin *2
+ - 1 point : A *12, E *12, O *9, I *6, S *6, N *5, R *5, U *5, L *4, T *4
+ - 2 points : D *5, G *2
+ - 3 points : C *4, B *2, M *2, P *2
+ - 4 points : H *2, F *1, V *1, Y *1
+ - 5 points : CH *1, Q *1
+ - 8 points : J *1, LL *1, Ñ *1, RR *1, X *1
+ - 10 points : Z *1
+ */
+
+ bag: [
+ " ", " ", // Comodines
+ "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A",
+ "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E",
+ "O", "O", "O", "O", "O", "O", "O", "O", "O",
+ "I", "I", "I", "I", "I", "I",
+ "S", "S", "S", "S", "S", "S",
+ "N", "N", "N", "N", "N",
+ "R", "R", "R", "R", "R",
+ "U", "U", "U", "U", "U",
+ "L", "L", "L", "L",
+ "T", "T", "T", "T",
+ "D", "D", "D", "D", "D",
+ "G", "G",
+ "C", "C", "C", "C",
+ "B", "B",
+ "M", "M",
+ "P", "P",
+ "H", "H",
+ "F",
+ "V",
+ "Y",
+ "CH",
+ "Q",
+ "J",
+ "LL",
+ "Ñ",
+ "RR",
+ "X",
+ "Z"
+ ],
+
+ letterValues: {
+ " ": 0,
+ "A": 1,
+ "E": 1,
+ "O": 1,
+ "I": 1,
+ "S": 1,
+ "N": 1,
+ "R": 1,
+ "U": 1,
+ "L": 1,
+ "T": 1,
+ "D": 2,
+ "G": 2,
+ "C": 3,
+ "B": 3,
+ "M": 3,
+ "P": 3,
+ "H": 4,
+ "F": 4,
+ "V": 4,
+ "Y": 4,
+ "CH": 5,
+ "Q": 5,
+ "J": 8,
+ "LL": 8,
+ "Ñ": 8,
+ "RR": 8,
+ "X": 8,
+ "Z": 10
+ }
+};
--- /dev/null
+/**
+ * Copyright (C) 2020 Laurent Mazet <mazet@softndesign.org>
+ *
+ * @licstart
+ * This file is part of Trivabble.
+ *
+ * Trivabble is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License (GNU AGPL)
+ * as published by the Free Software Foundation, either version 3 of
+ * the License, or (at your option) any later version.
+ *
+ * Trivabble is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Trivabble. If not, see <http://www.gnu.org/licenses/>.
+ * @licend
+ *
+ * @source: https://trivabble.1s.fr/
+ * @source: https://gitlab.com/raphj/trivabble/
+ */
+
+module.exports = {
+/*
+ 102 jetons
+ - 0 point : Joker *2
+ - 1 point : E *15, A *9, I *8, N *6, O *6, R *6, S *6, T *6, U *6, L *5
+ - 2 points : D *3, M *3, G *2
+ - 3 points : B *2, C *2, P *2
+ - 4 points : F *2, H *2, V *2
+ - 8 points : J *1, Q *1
+ - 10 points : K *1, W *1, X *1, Y *1, Z *1
+ */
+
+ bag: [
+ " ", " ", // Jokers
+ "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E", "E",
+ "A", "A", "A", "A", "A", "A", "A", "A", "A",
+ "I", "I", "I", "I", "I", "I", "I", "I",
+ "N", "N", "N", "N", "N", "N",
+ "O", "O", "O", "O", "O", "O",
+ "R", "R", "R", "R", "R", "R",
+ "S", "S", "S", "S", "S", "S",
+ "T", "T", "T", "T", "T", "T",
+ "U", "U", "U", "U", "U", "U",
+ "L", "L", "L", "L", "L",
+ "D", "D", "D",
+ "M", "M", "M",
+ "G", "G",
+ "B", "B",
+ "C", "C",
+ "P", "P",
+ "F", "F",
+ "H", "H",
+ "V", "V",
+ "J",
+ "Q",
+ "K",
+ "W",
+ "X",
+ "Y",
+ "Z"
+ ],
+
+ letterValues: {
+ " ": 0,
+ "E": 1,
+ "A": 1,
+ "I": 1,
+ "N": 1,
+ "O": 1,
+ "R": 1,
+ "S": 1,
+ "T": 1,
+ "U": 1,
+ "L": 1,
+ "D": 2,
+ "M": 2,
+ "G": 2,
+ "B": 3,
+ "C": 3,
+ "P": 3,
+ "F": 4,
+ "H": 4,
+ "V": 4,
+ "J": 8,
+ "Q": 8,
+ "K": 10,
+ "W": 10,
+ "X": 10,
+ "Y": 10,
+ "Z": 10
+ }
+};
/* Manage multi language board */
const boardPieces = {
- "de": require ("./de.js"),
- "en": require ("./en.js"),
- "es": require ("./es.js"),
- "fr": require ("./fr.js")
+ "de": require ("./lang/de.js"),
+ "en": require ("./lang/en.js"),
+ "es": require ("./lang/es.js"),
+ "fr": require ("./lang/fr.js")
};
const defaultLang = "fr";
this.board = newBoard();
this.lang = lang || defaultLang;
this.bag = boardPieces[this.lang].bag.slice();
- this.values = boardPieces[this.lang].values;
+ this.letterValues = boardPieces[this.lang].letterValues;
this.racks = {};
this.scores = {};
this.lastUpdated = new Date();
game.board = obj.board || newBoard();
game.lang = obj.lang || defaultLang;
game.bag = boardPieces[game.lang].bag.slice();
- game.values = boardPieces[game.lang].values;
+ game.letterValues = boardPieces[game.lang].letterValues;
game.racks = obj.racks || {};
game.scores = obj.scores || {};
game.lastUpdated = obj.lastUpdated ? new Date(obj.lastUpdated) : new Date();
rack: game.getPlayerRack(playerName),
board: game.board,
remainingLetters: game.bag.length,
- letterValues: game.values,
+ letterletterValues: game.letterValues,
version: VERSION
});
break;
currentPlayer: game.currentPlayer,
gameNumber: gameNumber,
boardLang: game.lang,
- letterValues: game.values,
+ letterValues: game.letterValues,
rack: game.getPlayerRack(message.playerName),
board: game.board,
remainingLetters: game.bag.length,