diff --git a/index.html b/index.html index 0571437..5a3ced5 100644 --- a/index.html +++ b/index.html @@ -71,37 +71,37 @@
- - - - - - - - - - + + + + + + + + + +
- - - - - - - - - + + + + + + + + +
- - - - - - - + + + + + + +
diff --git a/script.js b/script.js index d85aa91..2ec0e0a 100644 --- a/script.js +++ b/script.js @@ -37,13 +37,13 @@ function key_color_good_letter(key){ key_div.style.backgroundColor = good_letter_color; } -function key_color_bad_letter(coord){ +function key_color_bad_letter(key){ console.log(key) var key_div = document.getElementById(key); key_div.style.backgroundColor = bad_letter_color; } -function key_color_mid_letter(coord){ +function key_color_mid_letter(key){ console.log(key) var key_div = document.getElementById(key); key_div.style.backgroundColor = mid_letter_color; @@ -86,10 +86,15 @@ function verifLettres() { for(let i=0 ; i<5; i++){ if(word[i]==reponse[i]){ verif[i]=2; + key_color_good_letter(word[i].toUpperCase()); } else{ if(reponse.includes(word[i])){ verif[i]=1; + key_color_mid_letter(word[i].toUpperCase()); + } + else { + key_color_bad_letter(word[i].toUpperCase()); } } }