for debog
This commit is contained in:
parent
5c554be7ae
commit
2d9e84acf7
|
@ -63,7 +63,7 @@ function battleship(bot1,bot2,gridWidth,gridHeight,nbShip1,nbShip2,nbShip3,nbShi
|
||||||
if(xhr.status == 200) {
|
if(xhr.status == 200) {
|
||||||
//debug
|
//debug
|
||||||
//alert(xhr.responseText);
|
//alert(xhr.responseText);
|
||||||
try{
|
//try{
|
||||||
var grids = JSON.parse(xhr.responseText);
|
var grids = JSON.parse(xhr.responseText);
|
||||||
for( var player=1; player <= 2 ; player ++){
|
for( var player=1; player <= 2 ; player ++){
|
||||||
for (var y=0; y < grids[player].count ; y++){
|
for (var y=0; y < grids[player].count ; y++){
|
||||||
|
@ -75,11 +75,11 @@ function battleship(bot1,bot2,gridWidth,gridHeight,nbShip1,nbShip2,nbShip3,nbShi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
//}
|
||||||
catch(e){
|
//catch(e){
|
||||||
document.getElementById('logs').innerHTML = xhr.responseText;
|
// document.getElementById('logs').innerHTML = xhr.responseText;
|
||||||
|
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}};
|
}};
|
||||||
xhr.open("POST", '/Battleship', true);
|
xhr.open("POST", '/Battleship', true);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user