write colors
This commit is contained in:
parent
1e4042e238
commit
af5e5112c3
1 changed files with 18 additions and 0 deletions
18
script.js
18
script.js
|
@ -57,3 +57,21 @@ function update(x) {
|
||||||
free_box[1]+=1;
|
free_box[1]+=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function write_result(verif){
|
||||||
|
let pos = ""
|
||||||
|
pos = free_box[0].toString()
|
||||||
|
for(let i=0; i<5; i++){
|
||||||
|
pos = (free_box[0]-1).toString()
|
||||||
|
pos += (i+1).toString()
|
||||||
|
if (verif[i] == 2){
|
||||||
|
change_color_good_letter()
|
||||||
|
}
|
||||||
|
else if ( verif[i]===1){
|
||||||
|
change_color_mid_letter()
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
change_color_bad_letter()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue