16 Mai
This commit is contained in:
11
BACKEND/PHP/tp3/chifoumi/css/style.css
Normal file
11
BACKEND/PHP/tp3/chifoumi/css/style.css
Normal file
@@ -0,0 +1,11 @@
|
||||
.center{
|
||||
text-align:center;
|
||||
}
|
||||
.gagne{
|
||||
color:#2E8B57;
|
||||
|
||||
}
|
||||
.perdu{
|
||||
|
||||
color:#FF6347;
|
||||
}
|
BIN
BACKEND/PHP/tp3/chifoumi/images/ciseaux.png
Normal file
BIN
BACKEND/PHP/tp3/chifoumi/images/ciseaux.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
BACKEND/PHP/tp3/chifoumi/images/feuille.png
Normal file
BIN
BACKEND/PHP/tp3/chifoumi/images/feuille.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
BIN
BACKEND/PHP/tp3/chifoumi/images/pierre.png
Normal file
BIN
BACKEND/PHP/tp3/chifoumi/images/pierre.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
7
BACKEND/PHP/tp3/chifoumi/include/jeu.php
Normal file
7
BACKEND/PHP/tp3/chifoumi/include/jeu.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
$vue=FALSE;
|
||||
$images=["pierre.png","feuille.png","ciseaux.png"];
|
||||
|
||||
// TODO
|
||||
|
||||
?>
|
52
BACKEND/PHP/tp3/chifoumi/index.php
Normal file
52
BACKEND/PHP/tp3/chifoumi/index.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
include 'include/jeu.php';
|
||||
|
||||
// variable de la vue definies par le controleur
|
||||
// $coup_[joueur|oridnateur]
|
||||
// $image_[joueur|ordinateur]
|
||||
// $message
|
||||
// $vue booleen pour affichage si un coup a été joué
|
||||
//
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8" >
|
||||
|
||||
<link rel="stylesheet" href="https://unpkg.com/@picocss/pico@1.*/css/pico.min.css">
|
||||
<link rel="stylesheet" href="./css/style.css">
|
||||
<title>Chifoumi</title>
|
||||
</head>
|
||||
<body>
|
||||
<main class="container">
|
||||
<h3>Pierre, Feuille, Ciseaux</h3>
|
||||
<div class="center">
|
||||
<p>Choississez votre coup </p>
|
||||
<a href="?coup=0"><img width="50px" src="./images/pierre.png"></a>
|
||||
<a href="?coup=1"><img width="50px" src="./images/feuille.png"></a>
|
||||
<a href="?coup=2"><img width="50px" src="./images/ciseaux.png"></a>
|
||||
</div>
|
||||
|
||||
<?php if ($vue): ?>
|
||||
<div class="grid">
|
||||
<article>
|
||||
<h5 ">Votre Coup</h5>
|
||||
<hr>
|
||||
<div class="center">
|
||||
<img src="./images/<?php echo $image_joueur;?>">
|
||||
</div>
|
||||
</article>
|
||||
<article>
|
||||
<h5>Celui de l'ordinateur</h5>
|
||||
<hr>
|
||||
<div class="center">
|
||||
<img src="./images/<?php echo $image_ordinateur;?>">
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
<h2 class="center"><span class="<?php echo $class;?>"><?php echo $message;?></span></h2>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user