Created
October 7, 2019 19:28
-
-
Save susanBuck/2b6df015e601f509cef351185a8640a9 to your computer and use it in GitHub Desktop.
Example for Anna
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php require "index_controller.php"?> | |
<!DOCTYPE html> | |
<html lang='en'> | |
<head> | |
<title>Rock Paper Scissors</title> | |
<meta charset='utf-8'> | |
</head> | |
<body> | |
<h1>Rock Paper Scissors</h1> | |
<h2>Mechanics</h2> | |
<ul> | |
<li>Two players randomly choose rock, paper, scissors</li> | |
<li>If they make the same choice, it's a tie</li> | |
<li>Rock beats scissors</li> | |
<li>Paper beats rock</li> | |
<li>Scissors beat paper</li> | |
<li>The game is played 5 times</li> | |
<li>The player with the most wins is the final winner</li> | |
</ul> | |
<h2>Results</h2> | |
<?php foreach ($results as $key => $result) { ?> | |
<ul> | |
<li>Player A chooses <?php echo $result['player1'] ?> | |
</li> | |
<li>Player B chooses <?php echo $result['player2']; ?> | |
</li> | |
<li>Round <?php echo $key + 1; ?> winner is: <?php echo $result['winner']; ?> | |
</li> | |
</ul> | |
<?php } ?> | |
<h3>and the final winner is... <?php echo $finalwinner; ?> with | |
<?php echo $winningScore; ?> points. | |
</h3> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment