aleatoire
This commit is contained in:
parent
96cb870900
commit
5a5d4f5924
1 changed files with 9 additions and 1 deletions
10
script.js
10
script.js
|
@ -1,4 +1,4 @@
|
|||
const reponse = "train";
|
||||
var reponse = "";
|
||||
var word ="";
|
||||
const good_letter_color = "#8dc689";
|
||||
const bad_letter_color = "#e57373";
|
||||
|
@ -7,6 +7,8 @@ var free_box = [1,1];
|
|||
let arrWords;
|
||||
readTextFile("words.txt");
|
||||
|
||||
aleatoire();
|
||||
|
||||
function change_color_good_letter(coord){
|
||||
coord = "case".concat(coord)
|
||||
console.log(coord)
|
||||
|
@ -118,3 +120,9 @@ function verifWord() {
|
|||
}
|
||||
return exist;
|
||||
}
|
||||
|
||||
function aleatoire() {
|
||||
let rand = Math.floor(Math.random() * arrWords.length);
|
||||
reponse = arrWords[rand];
|
||||
console.log(reponse);
|
||||
}
|
Loading…
Reference in a new issue