diff options
author | Julien Dessaux | 2022-10-09 18:26:01 +0200 |
---|---|---|
committer | Julien Dessaux | 2022-10-09 18:26:01 +0200 |
commit | 2569c6332fb1f9b695b984f2a8f34eaee3f81d89 (patch) | |
tree | 8a0e0b6413de0d0a4441adddbf03c7ba661481ef /index.js | |
parent | Tweaked display (diff) | |
download | jeux-de-mots-2569c6332fb1f9b695b984f2a8f34eaee3f81d89.tar.gz jeux-de-mots-2569c6332fb1f9b695b984f2a8f34eaee3f81d89.tar.bz2 jeux-de-mots-2569c6332fb1f9b695b984f2a8f34eaee3f81d89.zip |
Added eslint validation
Diffstat (limited to '')
-rw-r--r-- | index.js | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -1,4 +1,4 @@ -'use strict'; +"use strict"; var CW = function(){ // 0 point : blanches × 2. @@ -30,7 +30,7 @@ var CW = function(){ "H", "H", "V", "V", "J", "Q", "K", "W", "X", "Y", "Z" - ] + ]; const points = { " ": 0, E:1, A:1, I:1, N:1, O:1, R:1, S:1, T:1, U:1, L:1, @@ -166,10 +166,10 @@ var CW = function(){ const line = CWDATA.board[y]; for(x=0; x<line.length; x++) { letter = line[x]; - elt = document.getElementById(['s', y, '_', x].join('')); + elt = document.getElementById(["s", y, "_", x].join("")); if (letter !== "") { elt.className = "letter"; - elt.innerHTML = [letter, '<div class="points">', points[letter], "</div>"].join(""); + elt.innerHTML = [letter, "<div class=\"points\">", points[letter], "</div>"].join(""); // we also remove the letter from the pool idx = letters.findIndex(function(elt) { return elt === letter; }); if (idx != -1) { @@ -210,9 +210,9 @@ var CW = function(){ prev = "JOKER"; } if (y > 1) { - letters_left = letters_left.concat(prev, 'x', y, ', '); + letters_left = letters_left.concat(prev, "x", y, ", "); } else { - letters_left = letters_left.concat(prev, ', '); + letters_left = letters_left.concat(prev, ", "); } prev = letter; y = 1; @@ -223,12 +223,12 @@ var CW = function(){ prev = "blanc"; } if (y > 1) { - letters_left = letters_left.concat(prev, 'x', y, '.'); + letters_left = letters_left.concat(prev, "x", y, "."); } else { - letters_left = letters_left.concat(prev, '.'); + letters_left = letters_left.concat(prev, "."); } } - document.getElementById('letters_left').innerHTML = letters_left.join(''); + document.getElementById("letters_left").innerHTML = letters_left.join(""); } }; }(); |