test
continuous-integration/drone/push Build is passing Details

ServeurDeTest
Noé GARNIER 2 years ago
parent 9ec776ffc3
commit 6758d492a0

@ -192,12 +192,12 @@ class UserModel
$points = 0; $points = 0;
$result = $this->resoudre_gateway->getAllByPartieAndUtilisateur($mailUtilisateur, $idPartie); $result = $this->resoudre_gateway->getAllByPartieAndUtilisateur($mailUtilisateur, $idPartie);
foreach ($result as $row){ foreach ($result as $row){
if ($row['classement'] == 1){ if ($row['ended'] != 0){
$points += $this->enigme_gateway->findById($row['enigme'])[0]->getPoints();
}
else if ($row['ended'] == 0){
$points += 0; $points += 0;
} }
else if ($row['classement'] == 1){
$points += $this->enigme_gateway->findById($row['enigme'])[0]->getPoints();
}
else if ($row['classement'] == 2){ else if ($row['classement'] == 2){
$points += $this->enigme_gateway->findById($row['enigme'])[0]->getPoints() * 0.75; $points += $this->enigme_gateway->findById($row['enigme'])[0]->getPoints() * 0.75;
} }

Loading…
Cancel
Save