previous

page 16

next
hide another go until the end
new global
var g_another_el;
setup()
function setup()
...
g_another_el=document.getElementById('another');
g_another_el.style.visibility='hidden';
}
computer()
function computer() {
...
el.textContent=g_player_count;
g_another_el.style.visibility='visible';
}
}
square_clicked(el)
function square_clicked(el) {
...
el.textContent=g_computer_count;
g_another_el.style.visibility='visible';
} else {
setTimeout(computer,2000);
}
}
}
previous
next