Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Poings, fouet, pistolet
$weapons = ['fists', 'whip', 'gun'];
$opponentWeapon = $weapons[rand(0,2)];
switch($opponentWeapon) {
case 0:
$indyWeapon = ($weapons[2]);
break;
case 1:
$indyWeapon = ($weapons[0]);
break;
case 2:
$indyWeapon = ($weapons[1]);
break;
}
var_dump("for enemy".'-'.' '.$opponentWeapon.' VS '.$indyWeapon.' '.'-'."for Indy");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.