Created
October 4, 2020 15:40
-
-
Save LA1720/fefedd3e00092d2fe32abdfdae2426c4 to your computer and use it in GitHub Desktop.
Poings, fouet, pistolet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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