SHARE
TWEET

Untitled

a guest Jul 21st, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.     echo strtoupper("Indy combat !") . '<br>' . '<br>' . '<br>';
  3.  
  4.  
  5. $weapons = ['fists', 'whip', 'gun'];
  6. $opponentWeapon = $weapons[rand(0,2)];
  7.  
  8.     echo "Enemy use $opponentWeapon !";
  9. // TODO
  10.     echo "<br>";
  11. if ($opponentWeapon == "fists") {
  12.         echo "Indy won with whip !";
  13.  
  14. }
  15. elseif($opponentWeapon == "whip") {
  16.         echo "Indy won with gun !";
  17. }
  18. else {
  19.         echo "Indy won with fists !";
  20. }
  21.  
  22. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top