diff --git a/WEB/Controller/UserController.php b/WEB/Controller/UserController.php index 38215ab3..6bc8b6fa 100644 --- a/WEB/Controller/UserController.php +++ b/WEB/Controller/UserController.php @@ -348,16 +348,6 @@ class UserController } } - public function goToGameEnd(){ - try { - global $rep, $vues, $error; - require ($rep . $vues['gameEnd']); - } catch (Exception $e) { - $error = $e->getMessage(); - require($rep . $vues['erreur']); - } - } - // A appeler après avoir vérifié que la partie est finie public function endGame(){ try { @@ -366,7 +356,7 @@ class UserController $idPartie = $_SESSION['idPartie']; $lesInfos = $model->getEndGameInfo($idPartie); $model->endGame($idPartie); - $this->goToGameEnd(); + require ($rep . $vues['gameEnd']); } catch (Exception $e) { $error = $e->getMessage();