diff --git a/controleurs/jouerPartie_controleur.php b/controleurs/jouerPartie_controleur.php index a645d98..82a204f 100644 --- a/controleurs/jouerPartie_controleur.php +++ b/controleurs/jouerPartie_controleur.php @@ -1,5 +1,10 @@ '; + $joueurs = getJoueursPartie($idpartie); + echo '
'; + echo '

Joueurs :

'; + foreach ($joueurs as $joueur) { + $couleur = $joueur['couleur_pion']; + $couleur_hex = "000000"; + if (!is_null($couleur)) { + $couleur_hex = dechex($couleur); + } + echo '

' . $joueur['pseudo'] . " (" . $joueur['prenom'] . " " . $joueur['nom'] . ')

'; + } + echo '
'; +} + +function afficherCarte(string $nomcarte, int $numero): void +{ + echo '
'; + echo '' . $nomcarte . ''; + if ($numero != 0) { + echo '

' . $numero . '

'; + } else { + echo '

X

'; + } + echo '
'; } function afficher_depart(): void { - afficherCarte("carteDépart.png"); + afficherCarte("carteDépart.png", 0); } function afficher_arrivee(): void { - afficherCarte("carteArrivée.png"); + afficherCarte("carteArrivée.png", 0); } function afficherCartes(int $idpartie): void { $cartes = getCardsName($idpartie); + echo '
'; afficher_depart(); - foreach ($cartes as $carte) { - afficherCarte($carte); + for ($i = 0; $i < sizeof($cartes); $i++) { + afficherCarte($cartes[$i], $i + 1); } afficher_arrivee(); + echo '
'; } function formulaire_selection_partie() @@ -46,11 +71,13 @@ function formulaire_selection_partie()

Jouer une partie

-
+