Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $weapons = ["fists", "whip", "gun"];
- $opponentWeapon = $weapons[rand(0,2)]; // Cela permet de choisir une arme de manière aléatoire.
- $indyWeapon = '';
- switch ($opponentWeapon) {
- case "fists":
- $indyWeapon = $weapons[2];
- break;
- case "whip":
- $indyWeapon = $weapons[0];
- break;
- case "gun":
- $indyWeapon = $weapons[1];
- break;
- default:
- $indyWeapon = $weapons = "";
- break;
- }
- echo "WHOAHH he have a " . $opponentWeapon . ", i need to use my " . $indyWeapon . " to win !!!";
Add Comment
Please, Sign In to add comment