Skip to content

Instantly share code, notes, and snippets.

@Jules59
Created March 12, 2018 22:05
Show Gist options
  • Save Jules59/dc8813dd82aeb6c72b34a8277d1345b6 to your computer and use it in GitHub Desktop.
Save Jules59/dc8813dd82aeb6c72b34a8277d1345b6 to your computer and use it in GitHub Desktop.
les conditions
<?php
$weapons = ['fists', 'whip', 'gun'];
$opponentWeapon = $weapons[rand(0,2)];
if ($opponentWeapon === 'gun') {
$indyWeapon = 'whip';
}
elseif ($opponentWeapon === 'whip') {
$indyWeapon = 'fists';
}
elseif ($opponentWeapon === 'fists') {
$indyWeapon = 'gun';
}
echo "Quand une petit con s'attaque à Indy avec " . $opponentWeapon . " alors Indy lui éclate la tronche avec "
. $indyWeapon;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment