modif lea, si tout casse c'est demodif lea, si tout casse c'est de
This commit is contained in:
parent
cc3240da13
commit
c2d2a56123
1 changed files with 32 additions and 19 deletions
51
script.js
51
script.js
|
@ -21,8 +21,38 @@ function change_color_mid_letter(coord){
|
||||||
}
|
}
|
||||||
|
|
||||||
function update(x) {
|
function update(x) {
|
||||||
word += x
|
console.log("avant",free_box);
|
||||||
document.getElementById("message").innerHTML = word;
|
|
||||||
|
if (free_box[1]==6) {
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
word += x;
|
||||||
|
free = free_box.map(num=>{return String(num)}).join("");
|
||||||
|
document.getElementById(free).innerHTML = x;
|
||||||
|
free_box[1]+=1;
|
||||||
|
}
|
||||||
|
console.log("word",word);
|
||||||
|
console.log("apres",free_box);
|
||||||
|
}
|
||||||
|
|
||||||
|
function Supprimer() {
|
||||||
|
word = word.slice(0,-1);
|
||||||
|
console.log(word);
|
||||||
|
if (free_box[1]==1) {
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
free_box[1]+=-1;
|
||||||
|
}
|
||||||
|
free = free_box.map(num=>{return String(num)}).join("");
|
||||||
|
console.log("freesup",free);
|
||||||
|
document.getElementById(free).innerHTML = "";
|
||||||
|
console.log(free_box);
|
||||||
|
}
|
||||||
|
|
||||||
|
function Enter() {
|
||||||
|
free_box[0]+=1;
|
||||||
|
free_box[1]=1;
|
||||||
|
verifLettres(word);
|
||||||
}
|
}
|
||||||
|
|
||||||
function verifLettres(aWord) {
|
function verifLettres(aWord) {
|
||||||
|
@ -40,23 +70,6 @@ function verifLettres(aWord) {
|
||||||
}
|
}
|
||||||
return verif;
|
return verif;
|
||||||
}
|
}
|
||||||
function update(x) {
|
|
||||||
word += x;
|
|
||||||
console.log(word);
|
|
||||||
document.getElementById(free_box).innerHTML = x;
|
|
||||||
if (free_box[1]==5) {
|
|
||||||
if (free_box[0]==5) {
|
|
||||||
pass;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
free_box[0]+=1;
|
|
||||||
free_box[1]=1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
free_box[1]+=1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function write_result(verif){
|
function write_result(verif){
|
||||||
let pos = "";
|
let pos = "";
|
||||||
|
|
Loading…
Reference in a new issue