tp3
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
.center{
|
||||
text-align:center;
|
||||
}
|
||||
.Win{
|
||||
color:#2E8B57;
|
||||
|
||||
}
|
||||
.Loss{
|
||||
color:#FF6347;
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
$images = ["rock.png","paper.png","scissors.png"];
|
||||
$isPlaying = true;
|
||||
|
||||
$playerChoice = 0;
|
||||
$computerChoice = 1;
|
||||
|
||||
$message = "Win";
|
||||
$class = "Win";
|
||||
|
||||
$imagePlayer = $images[$playerChoice];
|
||||
$imageComputer = $images[$computerChoice];
|
||||
|
||||
include './views/header.php';
|
||||
if ($isPlaying){
|
||||
include './views/game.php';
|
||||
include './views/message.php';
|
||||
}
|
||||
include './views/footer.php';
|
||||
?>
|
||||
@@ -0,0 +1,3 @@
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,15 @@
|
||||
<div class="grid">
|
||||
<article>
|
||||
<header>Player</header>
|
||||
<section class="center">
|
||||
<img src="./images/<?php echo $imagePlayer;?>">
|
||||
</section>
|
||||
</article>
|
||||
<article>
|
||||
<header>Computer</header>
|
||||
<section class="center">
|
||||
<img src="./images/<?php echo $imageComputer;?>">
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" >
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"
|
||||
/>
|
||||
|
||||
<link rel="stylesheet" href="./css/style.css">
|
||||
<title>Chifoumi</title>
|
||||
</head>
|
||||
<body>
|
||||
<main class="container">
|
||||
|
||||
<h3>Rock Paper Scissors</h3>
|
||||
|
||||
<section class="center">
|
||||
<p>Choose : </p>
|
||||
<a href="?choice=0"><img width="100px" src="./images/rock.png"></a>
|
||||
<a href="?choice=1"><img width="100px" src="./images/paper.png"></a>
|
||||
<a href="?choice=2"><img width="100px" src="./images/scissors.png"></a>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<h2 class="center">
|
||||
<span class="<?php echo $class;?>"><?php echo $message;?></span>
|
||||
</h2>
|
||||
Reference in New Issue
Block a user