2 ème essaie
continuous-integration/drone/push Build is failing Details

ServeurDeTest
Noé GARNIER 2 years ago
parent a12f0ee72d
commit 3a7fe9256f

@ -314,9 +314,9 @@ class ResoudreGateway
"enigme" => array($enigmeId, SQLITE3_INTEGER), "enigme" => array($enigmeId, SQLITE3_INTEGER),
"partie" => array($idPartie, SQLITE3_INTEGER))); "partie" => array($idPartie, SQLITE3_INTEGER)));
$results=$this->con->getResults(); $results=$this->con->getResults();
// if (empty($results) || $results[0]['classement'] == null) { if (empty($results) || $results[0]['classement'] == null) {
// return array(0); return array(0);
// } }
foreach ($results as $row) { foreach ($results as $row) {
$classement[] = $row['classement']; $classement[] = $row['classement'];
}; };

@ -127,10 +127,15 @@ class UserModel
$tempDeResolution = $interval->days * 24 * 60 * 60 + $interval->h * 60 * 60 + $interval->i * 60 + $interval->s; $tempDeResolution = $interval->days * 24 * 60 * 60 + $interval->h * 60 * 60 + $interval->i * 60 + $interval->s;
// $result = $this->resoudre_gateway->getMaxClassement($enigmeId, $idPartie); // $result = $this->resoudre_gateway->getMaxClassement($enigmeId, $idPartie);
$leClassement = $this->resoudre_gateway->getClassement($enigmeId, $idPartie); $leClassement = $this->resoudre_gateway->getClassement($enigmeId, $idPartie);
for ($i = 0; $i < $playerNumberPerGame; $i++){ if ($leClassement[0] == 0){
if ($leClassement[$i] == null){ $classement = 1;
$classement = $i; }
break; else{
for ($i = 1; $i < $playerNumberPerGame; $i++){
if ($leClassement[$i] == null){
$classement = $i;
break;
}
} }
} }
// if ($result == 0){ // if ($result == 0){

Loading…
Cancel
Save