.
This commit is contained in:
parent
9495e7512d
commit
99807ad572
|
@ -105,7 +105,7 @@ class TronGame
|
||||||
'response' => $response,
|
'response' => $response,
|
||||||
'httpStatus' => curl_getinfo($ch[$i])['http_code'],
|
'httpStatus' => curl_getinfo($ch[$i])['http_code'],
|
||||||
'responseArr' => $arr
|
'responseArr' => $arr
|
||||||
);
|
);
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
$res[$i] = false;
|
$res[$i] = false;
|
||||||
|
@ -206,12 +206,12 @@ class TronGame
|
||||||
//save_draw_bots
|
//save_draw_bots
|
||||||
$this->save_draw_bots($loosers);
|
$this->save_draw_bots($loosers);
|
||||||
$winners = array();
|
$winners = array();
|
||||||
for ($botCount = 0; $botCount < $nbeBots; $botCount++){
|
for ($botCount = 0; $botCount < $nbeBots; $botCount++){
|
||||||
if ($this->bots[$botCount]->getStatus()){
|
if ($this->bots[$botCount]->getStatus()){
|
||||||
$winners[] = $this->bots[$botCount]->getId();
|
$winners[] = $this->bots[$botCount]->getId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//sauver les relations winers loosers
|
//sauver les relations winers loosers
|
||||||
$this->save_losers_winers($loosers,$winners);
|
$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){
|
if ($this->bots[$botCount]->getStatus() === false){
|
||||||
|
|
||||||
$err = "Something went wrong for ".$this->bots[$botCount]->getName()."<br/>";
|
$err = "Something went wrong for ".$this->bots[$botCount]->getName()."<br/>";
|
||||||
}else{
|
}else{
|
||||||
$botCount++;
|
$botCount++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,9 +103,7 @@ function play(gameId,xd_check){
|
||||||
if(req.readyState == 4){
|
if(req.readyState == 4){
|
||||||
if(req.status == 200) {
|
if(req.status == 200) {
|
||||||
addLog(req.responseText);
|
addLog(req.responseText);
|
||||||
var reponse = JSON.parse(req.responseText);
|
var reponse = JSON.parse(req.responseText);
|
||||||
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user