make premium for playing seven tiles configurable (system wide)

This commit is contained in:
Laurent Mazet 2020-10-23 21:40:16 +02:00
parent e6df1604e9
commit 4ddd84885b
2 changed files with 4 additions and 1 deletions

View File

@ -32,6 +32,8 @@ window.TrivabbleConf = {
// The defaut double tap duration. If not set, the value at the middle of the previous array is used.
DOUBLE_TAP_DURATION: 1800,
// The default premium for playing seven tiles on a turn
PREMIUM_SEVEN_TILES: 50,
// I don't like trailing commas, here is a nice message for you reading this file :-)
HAVE_FUN: true

View File

@ -59,6 +59,7 @@
setConf("FLASH_LIGHT_DURATIONS", [800, 1600, 3200]);
setConf("FLASH_LIGHT_DURATION", middle("FLASH_LIGHT_DURATIONS"));
setConf("FLASH_LIGHT_COLOR", "#ee6633");
setConf("PREMIUM_SEVEN_TILES", 50);
function getSetting(key) {
let type;
@ -1873,7 +1874,7 @@
/* Check for trivabble */
if (Object.keys(currentTilePlayed).length === 7) {
totalScore += 50;
totalScore += getSetting("PREMIUM_SEVEN_TILES");
}
/* Confirm score */