Guest User

Untitled

a guest
Oct 13th, 2019
71
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