Skip to content

Instantly share code, notes, and snippets.

@b0ndurant
Last active March 9, 2018 21:04
Show Gist options
  • Save b0ndurant/03f99fe11be98739a98ef24443678bfc to your computer and use it in GitHub Desktop.
Save b0ndurant/03f99fe11be98739a98ef24443678bfc to your computer and use it in GitHub Desktop.
quete conditions
<?php
$weapons = ['fists', 'whip', 'gun'];
$opponentWeapon = $weapons[rand(0,2)];
if ($opponentWeapon == 'fists') {
$indiana = 'gun';
} elseif ($opponentWeapon == 'whip') {
$indiana = 'fists';
} elseif ($opponentWeapon == 'gun') {
$indiana = 'whip';
}
echo 'opponent Weapon use '.$opponentWeapon.' and indiana use '.$indiana;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment