在chrome下为什么alert之后再落子呢?
for(var k=0;k<count;k++){
if(wins[i][j][k]){
myWin[k]++;
computerWin[k] = 6 ;
if(myWin[k] == 5 ){
window.alert('你赢了');
over = true;
}
}
}
if(!over){
me = !me;
computerAI();
}
for(var k=0;k<count;k++){
if(wins[i][j][k]){
myWin[k]++;
computerWin[k] = 6 ;
if(myWin[k] == 5 ){
window.alert('你赢了');
over = true;
}
}
}
if(!over){
me = !me;
computerAI();
}
2016-12-18
举报