SHARE
TWEET

Untitled

a guest Oct 13th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $weapons = ['fists', 'whip', 'gun'];
  4. $opponentWeapon = $weapons[rand(0,2)];
  5. $indyWeapon='???';
  6. if ($opponentWeapon==$weapons[0]) {
  7.     $indyWeapon = $weapons[2];
  8.     echo $indyWeapon;
  9. } elseif ($opponentWeapon==$weapons[1]) {
  10.     $indyWeapon = $weapons[0];
  11.     echo $indyWeapon;
  12. } else {
  13.     $indyWeapon = $weapons[1];
  14.     echo $indyWeapon;
  15. }
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