This commit is contained in:
Gnieark 2015-12-18 21:28:38 +01:00
parent 273a493520
commit 5c9c007d4a

View File

@ -29,9 +29,10 @@ function fight(xd_check){
document.getElementById('logs').innerHTML = 'erreur' +xhr.responseText; document.getElementById('logs').innerHTML = 'erreur' +xhr.responseText;
return; return;
} }
var coords = strike['target'].split(","); if( strike['target'] <> ''){
document.getElementById( 'bot' + strike['opponent'] + '-' + coords[1] + '-' + coords[0]).innerHTML = "X"; var coords = strike['target'].split(",");
document.getElementById( 'bot' + strike['opponent'] + '-' + coords[1] + '-' + coords[0]).innerHTML = "X";
}
var p=createElem("p"); var p=createElem("p");
p.innerHTML=strike['log']; p.innerHTML=strike['log'];
document.getElementById('logs').appendChild(p); document.getElementById('logs').appendChild(p);