+ + VS + +
+ + +diff --git a/src/arenas/Battleship/js.js b/src/arenas/Battleship/js.js new file mode 100644 index 0000000..4ffd58d --- /dev/null +++ b/src/arenas/Battleship/js.js @@ -0,0 +1,26 @@ +function Ajx(){ + var request = false; + try {request = new ActiveXObject('Msxml2.XMLHTTP');} + catch (err2) { + try {request = new ActiveXObject('Microsoft.XMLHTTP');} + catch (err3) { + try { request = new XMLHttpRequest();} + catch (err1) { + request = false; + } + } + } + return request; +} +function battleship(bot1,bot2,xd_check){ + document.getElementById('fightResult').innerHTML = '
Please wait...
'; + var xhr = Ajx(); + xhr.onreadystatechange = function(){if(xhr.readyState == 4){ + if(xhr.status == 200) { + document.getElementById('fightResult').innerHTML = xhr.responseText; + } + }}; + xhr.open("POST", '/Battleship', true); + xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); + xhr.send('act=fight&bot1=' + bot1 + '&bot2=' + bot2 + '&xd_check=' + xd_check); +} \ No newline at end of file diff --git a/src/arenas/Battleship/public.php b/src/arenas/Battleship/public.php index 61aa218..a5a20c0 100644 --- a/src/arenas/Battleship/public.php +++ b/src/arenas/Battleship/public.php @@ -1 +1,45 @@ -+ + VS + +
+ + +Ce n'est pas encore possible. L'interface est en cours de developpement. Mais vous pouvez toujours me contacter, @gnieark sur twitter, je mettrai à la main votre bot dans l'arène.
\ No newline at end of file +le formulaire est sur la page d'accueil du site
\ No newline at end of file