From 2569c6332fb1f9b695b984f2a8f34eaee3f81d89 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sun, 9 Oct 2022 18:26:01 +0200 Subject: Added eslint validation --- index.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'index.js') diff --git a/index.js b/index.js index a997839..ef244ae 100644 --- a/index.js +++ b/index.js @@ -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', points[letter], ""].join(""); + elt.innerHTML = [letter, "
", points[letter], "
"].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(""); } }; }(); -- cgit v1.2.3