diff --git a/WEB/Model/UserModel.php b/WEB/Model/UserModel.php index b52725c5..bf7f19ff 100644 --- a/WEB/Model/UserModel.php +++ b/WEB/Model/UserModel.php @@ -211,6 +211,7 @@ class UserModel $maxPoints = max($lesPoints); $maxIndex = array_keys($lesPoints, $maxPoints)[0]; $vainqueur = $lesJoueurs[$maxIndex]; + array_multisort($lesPoints, SORT_DESC, $lesJoueurs, $lesTemps); return array($lesJoueurs, $lesPoints, $lesTemps, $vainqueur); } public function checkGameIsEnd(int $idPartie) : bool{ diff --git a/WEB/View/src/pages/Multijoueur/GameEnd.php b/WEB/View/src/pages/Multijoueur/GameEnd.php index 6ea3052f..3321d39b 100644 --- a/WEB/View/src/pages/Multijoueur/GameEnd.php +++ b/WEB/View/src/pages/Multijoueur/GameEnd.php @@ -32,7 +32,7 @@ $i = 0; for ($i; $i < $playerNumberPerGame; $i++) { echo "