From 9e9e56ffa229c337be54142fd50a221f73e96eb4 Mon Sep 17 00:00:00 2001
From: gnieark
Date: Wed, 15 Jun 2016 21:24:21 +0200
Subject: [PATCH] add check to view fulll logs
---
src/PHPMailer | 2 +-
src/arenas/connectFour/js.js | 6 +-----
src/arenas/connectFour/public.php | 1 +
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/PHPMailer b/src/PHPMailer
index c2bde34..1d85f9e 160000
--- a/src/PHPMailer
+++ b/src/PHPMailer
@@ -1 +1 @@
-Subproject commit c2bde34e58caa500b8fb2f7e14fc9765596cdf6d
+Subproject commit 1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a
diff --git a/src/arenas/connectFour/js.js b/src/arenas/connectFour/js.js
index 301df4d..223a40f 100644
--- a/src/arenas/connectFour/js.js
+++ b/src/arenas/connectFour/js.js
@@ -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;);
}
diff --git a/src/arenas/connectFour/public.php b/src/arenas/connectFour/public.php
index fda7c86..cebcef7 100644
--- a/src/arenas/connectFour/public.php
+++ b/src/arenas/connectFour/public.php
@@ -23,5 +23,6 @@ $bots=get_Bots_Array('connectFou');
?>
+ view the full logs