|
|
@ -205,10 +205,7 @@ 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['temps'] == 0){
|
|
|
|
if ($row['temps'] == 0 || $row['ended'] == 0){
|
|
|
|
$points += 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if ($row['ended'] == 0){
|
|
|
|
|
|
|
|
$points += 0;
|
|
|
|
$points += 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ($row['classement'] == 1){
|
|
|
|
else if ($row['classement'] == 1){
|
|
|
@ -261,6 +258,7 @@ class UserModel
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public function endGame(int $idPartie) {
|
|
|
|
public function endGame(int $idPartie) {
|
|
|
|
|
|
|
|
$this->resoudre_gateway->cleanCodeAfterGame($idPartie);
|
|
|
|
$this->partie_gateway->endGame($idPartie);
|
|
|
|
$this->partie_gateway->endGame($idPartie);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|