Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $weapons = ['fists', 'whip', 'gun'];
- $opponentWeapon = $weapons[rand (0,2)];
- $indyWeapon = '';
- if ('fists'== $opponentWeapon){
- $indyWeapon = "gun";
- }
- elseif ('gun'== $opponentWeapon){
- $indyWeapon = "whip";
- }
- elseif ( 'whip'==$opponentWeapon){
- $indyWeapon = "fists";
- }
- echo $indyWeapon;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement