add check to view fulll logs
This commit is contained in:
parent
67b39856fd
commit
9e9e56ffa2
|
@ -1 +1 @@
|
|||
Subproject commit c2bde34e58caa500b8fb2f7e14fc9765596cdf6d
|
||||
Subproject commit 1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a
|
|
@ -57,9 +57,6 @@ function connectFour(bot1,bot2,xd_check, gameId, newGame){
|
|||
var xhr = Ajx();
|
||||
xhr.onreadystatechange = function(){if(xhr.readyState == 4){
|
||||
if(xhr.status == 200) {
|
||||
//for test
|
||||
// alert(xhr.responseText);
|
||||
|
||||
try{
|
||||
var reponse = JSON.parse(xhr.responseText);
|
||||
}catch(e){
|
||||
|
@ -85,7 +82,6 @@ function connectFour(bot1,bot2,xd_check, gameId, newGame){
|
|||
|
||||
}
|
||||
|
||||
|
||||
//if game isn't finished, continue
|
||||
if(reponse['continue'] == 1){
|
||||
connectFour(bot1,bot2,xd_check,reponse['gameId'], false);
|
||||
|
@ -108,5 +104,5 @@ function connectFour(bot1,bot2,xd_check, gameId, newGame){
|
|||
}else{
|
||||
var act='fight';
|
||||
}
|
||||
xhr.send('act=' + act + '&bot1=' + bot1 + '&bot2=' + bot2 + '&xd_check=' + xd_check + '&gameId=' + gameId);
|
||||
xhr.send('act=' + act + '&bot1=' + bot1 + '&bot2=' + bot2 + '&xd_check=' + xd_check + '&gameId=' + gameId + '&fullLogs=' + document.getElementById("fullLogs").checked;);
|
||||
}
|
||||
|
|
|
@ -23,5 +23,6 @@ $bots=get_Bots_Array('connectFou');
|
|||
?>
|
||||
</select>
|
||||
</p>
|
||||
<p><input type="checkbox" id="fullLogs"/>view the full logs</p>
|
||||
<p><input id="fightButton" type="button" value="<?php echo $lang['FIGHT']; ?>" onclick="connectFour(document.getElementById('bot1').value,document.getElementById('bot2').value,'<?php echo xd_check_input(2); ?>',0);"></p>
|
||||
<div id="fightResult"></div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user