From 2d9e84acf7d1448d26262504909f2ac0547b1212 Mon Sep 17 00:00:00 2001 From: gnieark Date: Tue, 15 Dec 2015 13:36:31 +0100 Subject: [PATCH] for debog --- src/arenas/Battleship/js.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/arenas/Battleship/js.js b/src/arenas/Battleship/js.js index 3eeee76..7f7f14f 100644 --- a/src/arenas/Battleship/js.js +++ b/src/arenas/Battleship/js.js @@ -63,7 +63,7 @@ function battleship(bot1,bot2,gridWidth,gridHeight,nbShip1,nbShip2,nbShip3,nbShi if(xhr.status == 200) { //debug //alert(xhr.responseText); - try{ + //try{ var grids = JSON.parse(xhr.responseText); for( var player=1; player <= 2 ; player ++){ 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){ - document.getElementById('logs').innerHTML = xhr.responseText; + //} + //catch(e){ + // document.getElementById('logs').innerHTML = xhr.responseText; - } + //} } }}; xhr.open("POST", '/Battleship', true);