Correction du calcul des points
continuous-integration/drone/push Build is passing Details

ServeurDeTest
Noé GARNIER 2 years ago
parent eec861aeb6
commit 9ec776ffc3

@ -401,6 +401,7 @@ class UserController
$model = new UserModel(); $model = new UserModel();
$idPartie = $_SESSION['idPartie']; $idPartie = $_SESSION['idPartie'];
$utilisateur = $_SESSION['utilisateur']; $utilisateur = $_SESSION['utilisateur'];
require ($rep . $vues['lobby']);
// $model->quitGame($utilisateur->getEmail(), $idPartie); // $model->quitGame($utilisateur->getEmail(), $idPartie);
// echo '<script>alert("Vous avez quitté la partie.");</script>'; // echo '<script>alert("Vous avez quitté la partie.");</script>';
// require ($rep . $vues['lobby']); // require ($rep . $vues['lobby']);

@ -195,15 +195,15 @@ class UserModel
if ($row['classement'] == 1){ if ($row['classement'] == 1){
$points += $this->enigme_gateway->findById($row['enigme'])[0]->getPoints(); $points += $this->enigme_gateway->findById($row['enigme'])[0]->getPoints();
} }
else if ($row['ended'] == 0){
$points += 0;
}
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;
} }
else if ($row['classement'] == 3){ else if ($row['classement'] == 3){
$points += $this->enigme_gateway->findById($row['enigme'])[0]->getPoints() * 0.5; $points += $this->enigme_gateway->findById($row['enigme'])[0]->getPoints() * 0.5;
} }
else if ($row['ended'] == 0){
$points += 0;
}
else{ else{
$points += $this->enigme_gateway->findById($row['enigme'])[0]->getPoints() * 0.25; $points += $this->enigme_gateway->findById($row['enigme'])[0]->getPoints() * 0.25;
} }

@ -26,7 +26,7 @@
<!-- First Row --> <!-- First Row -->
<div class="row py-4 d-flex justify-content-between user-select-none"> <div class="row py-4 d-flex justify-content-between user-select-none">
<div class="col d-flex align-items-center px-0"> <div class="col d-flex align-items-center px-0">
<a class="material-icons pl-0" id="home" href="index.php?action=quitQueue" <a class="material-icons pl-0" id="home" href="index.php?action=quitGame"
style="font-size: 40px; color: white">home</a> style="font-size: 40px; color: white">home</a>
</div> </div>

Loading…
Cancel
Save