Commit 75d3f760 authored by pet's avatar pet

bug fix: trocando as cores e nao a palavra

parent f355b3a0
......@@ -265,6 +265,10 @@ function mudaCor(c_i){
}
else{ // SEGUNDA METADE É INCONGRUENTE
rand = Math.floor(Math.random() * 5);
if(rand == lastChoice){
rand = (rand+1) % 5;
}
lastChoice = rand;
switch(rand) {
case 0: // VERMELHO
document.getElementById("label").style.color = "#ff0000";
......@@ -288,11 +292,7 @@ function mudaCor(c_i){
break;
}
do {
rand2 = Math.floor(Math.random() * 5);
if(rand2 == lastChoice){
rand2 = (rand+1) % 5;
}
lastChoice = rand2;
rand2 = (Math.floor(Math.random() * 5)) % 5;
} while (rand2 == rand);
switch(rand2) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment