Test d'affichage
continuous-integration/drone/push Build is failing Details

ServeurDeTest
Noé GARNIER 2 years ago
parent d54a34c76a
commit a6caa1ae87

@ -56,3 +56,4 @@ $playerNumberPerGame = 3;
$nbEnigmePerGame = 1; $nbEnigmePerGame = 1;
$test = null;

@ -119,7 +119,7 @@ class UserModel
$this->resoudre_gateway->enigmeEnded($mailUtilisateur,$enigmeId); $this->resoudre_gateway->enigmeEnded($mailUtilisateur,$enigmeId);
} }
public function enigmeMultiEnded(string $mailUtilisateur, int $enigmeId){ public function enigmeMultiEnded(string $mailUtilisateur, int $enigmeId){
global $playerNumberPerGame; global $playerNumberPerGame, $test;
$idPartie = $_SESSION['idPartie']; $idPartie = $_SESSION['idPartie'];
$dateDebut = $this->partie_gateway->getDateDebut($idPartie); $dateDebut = $this->partie_gateway->getDateDebut($idPartie);
$now = new DateTime(); $now = new DateTime();
@ -127,6 +127,7 @@ class UserModel
$tempDeResolution = $interval->days * 24 * 60 * 60 + $interval->h * 60 * 60 + $interval->i * 60 + $interval->s; $tempDeResolution = $interval->days * 24 * 60 * 60 + $interval->h * 60 * 60 + $interval->i * 60 + $interval->s;
// $result = $this->resoudre_gateway->getMaxClassement($enigmeId, $idPartie); // $result = $this->resoudre_gateway->getMaxClassement($enigmeId, $idPartie);
$leClassement = $this->resoudre_gateway->getClassement($enigmeId, $idPartie); $leClassement = $this->resoudre_gateway->getClassement($enigmeId, $idPartie);
$test = $leClassement;
for ($i = 0; $i < $playerNumberPerGame; $i++){ for ($i = 0; $i < $playerNumberPerGame; $i++){
if ($leClassement[$i] == null || $leClassement[$i] != $i + 1){ if ($leClassement[$i] == null || $leClassement[$i] != $i + 1){
$classement = $i + 1; $classement = $i + 1;

@ -19,6 +19,7 @@
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<p>Vous avez terminer toute les énimges.</p> <p>Vous avez terminer toute les énimges.</p>
<p><?php global $test; echo $test ?></p>
<p>Votre score est de : <?php echo $points ?> points.</p> <p>Votre score est de : <?php echo $points ?> points.</p>
<p>Temps restant avant la fin de la partie :</p> <p>Temps restant avant la fin de la partie :</p>
<?php <?php

Loading…
Cancel
Save