Hello,
i have one last question and very confusing for me.
have 4X4 matrix and the player and the computer will play m or u and every time they close a row of the word mum i want to track down in the box which one had closed the a row for example
player :2
computer:1.
but i dont know exactly how. i used the the following but thats very wrong.
if(document.myForm.box1.value=="M" && document.myForm.box2.value=="U"
&& document.myForm.box3.value=="M"){
win=eval("document.myForm.box1.style.color");
if(win=="Blue"){
document.myForm.comp.value="1";
}
else if(win!="Blue"){
document.myForm.player.value="1";
}
win=eval("document.myForm.box2.style.color");
if(win=="Blue" ){
document.myForm.comp.value="1";
}
else if(win!="LightSteelBlue"){
document.myForm.player.value="1";
}
win=eval("document.myForm.box3.style.color");
if(win=="Blue" ){
document.myForm.comp.value="1";
}
else if(win!="Blue"){
document.myForm.player.value="1";
}
}
i quess i need a function to increase but iam confused what to compare and how to track down.
could anyone help?
i have one last question and very confusing for me.
have 4X4 matrix and the player and the computer will play m or u and every time they close a row of the word mum i want to track down in the box which one had closed the a row for example
player :2
computer:1.
but i dont know exactly how. i used the the following but thats very wrong.
if(document.myForm.box1.value=="M" && document.myForm.box2.value=="U"
&& document.myForm.box3.value=="M"){
win=eval("document.myForm.box1.style.color");
if(win=="Blue"){
document.myForm.comp.value="1";
}
else if(win!="Blue"){
document.myForm.player.value="1";
}
win=eval("document.myForm.box2.style.color");
if(win=="Blue" ){
document.myForm.comp.value="1";
}
else if(win!="LightSteelBlue"){
document.myForm.player.value="1";
}
win=eval("document.myForm.box3.style.color");
if(win=="Blue" ){
document.myForm.comp.value="1";
}
else if(win!="Blue"){
document.myForm.player.value="1";
}
}
i quess i need a function to increase but iam confused what to compare and how to track down.
could anyone help?