This commit is contained in:
Gnieark 2016-07-11 20:30:26 +02:00
parent 9495e7512d
commit 99807ad572
2 changed files with 7 additions and 9 deletions

View File

@ -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()."<br/>";
$err = "Something went wrong for ".$this->bots[$botCount]->getName()."<br/>";
}else{
$botCount++;
}

View File

@ -104,8 +104,6 @@ function play(gameId,xd_check){
if(req.status == 200) {
addLog(req.responseText);
var reponse = JSON.parse(req.responseText);
}else{
}