From 99807ad572f285f131a29849ae8e18547a980f89 Mon Sep 17 00:00:00 2001 From: Gnieark Date: Mon, 11 Jul 2016 20:30:26 +0200 Subject: [PATCH] . --- src/arenas/tron/class.TronGame.php | 12 ++++++------ src/arenas/tron/js.js | 4 +--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/arenas/tron/class.TronGame.php b/src/arenas/tron/class.TronGame.php index f14dca8..f229342 100644 --- a/src/arenas/tron/class.TronGame.php +++ b/src/arenas/tron/class.TronGame.php @@ -105,7 +105,7 @@ class TronGame 'response' => $response, 'httpStatus' => curl_getinfo($ch[$i])['http_code'], 'responseArr' => $arr - ); + ); }else{ $res[$i] = false; @@ -206,12 +206,12 @@ class TronGame //save_draw_bots $this->save_draw_bots($loosers); $winners = array(); - for ($botCount = 0; $botCount < $nbeBots; $botCount++){ + for ($botCount = 0; $botCount < $nbeBots; $botCount++){ if ($this->bots[$botCount]->getStatus()){ $winners[] = $this->bots[$botCount]->getId(); } - } - //sauver les relations winers loosers + } + //sauver les relations winers loosers $this->save_losers_winers($loosers,$winners); } @@ -226,7 +226,7 @@ class TronGame } } - return $arrRapport; + return $arrRapport; } @@ -285,7 +285,7 @@ class TronGame if ($this->bots[$botCount]->getStatus() === false){ - $err = "Something went wrong for ".$this->bots[$botCount]->getName()."
"; + $err = "Something went wrong for ".$this->bots[$botCount]->getName()."
"; }else{ $botCount++; } diff --git a/src/arenas/tron/js.js b/src/arenas/tron/js.js index 1ed0111..9f01129 100644 --- a/src/arenas/tron/js.js +++ b/src/arenas/tron/js.js @@ -103,9 +103,7 @@ function play(gameId,xd_check){ if(req.readyState == 4){ if(req.status == 200) { addLog(req.responseText); - var reponse = JSON.parse(req.responseText); - - + var reponse = JSON.parse(req.responseText); }else{ }