Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- echo strtoupper("Indy combat !") . '<br>' . '<br>' . '<br>';
- $weapons = ['fists', 'whip', 'gun'];
- $opponentWeapon = $weapons[rand(0,2)];
- echo "Enemy use $opponentWeapon !";
- // TODO
- echo "<br>";
- if ($opponentWeapon == "fists") {
- echo "Indy won with whip !";
- }
- elseif($opponentWeapon == "whip") {
- echo "Indy won with gun !";
- }
- else {
- echo "Indy won with fists !";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement