This commit is contained in:
JARNOUEN DE VILLARTAY Ulysse (SAFRAN AIRCRAFT ENGINES)
2026-04-15 16:06:48 +02:00
parent 74ebab4b24
commit 553b30bdcc
3 changed files with 142 additions and 42 deletions
+22 -10
View File
@@ -1,23 +1,35 @@
<html>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Tic Tac Toe</title>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"
/>
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"
/>
<link rel="stylesheet" href="./css/style.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<main class="container center">
<h4>Tic Tac Toe : <?php echo "player $playerTurn turn";?></h4>
<h4>
<?php if ($isGameOver) { ?>
Partie terminée
<?php } else { ?>
Tic Tac Toe : joueur <?php echo $playerTurn; ?> à vous de jouer
<?php } ?>
</h4>
<?php
displayGrid($grid);
// Quand la partie est finie, les liens dans les cases vides
// disparaissent pour empêcher tout coup supplémentaire.
displayGrid($grid, !$isGameOver);
if ($message != "")
echo "<h5>$message <a href='.'>new game</a></h5>";
?>
if ($message != '') {
echo '<h5>' . htmlspecialchars($message, ENT_QUOTES) . " <a href='?reset=1'>nouvelle partie</a></h5>";
} else {
echo "<p><a href='?reset=1'>Recommencer la partie</a></p>";
}
?>
</main>
</body>
</html>