Skip to content

Instantly share code, notes, and snippets.

@cadwallion
Last active August 29, 2015 14:00
Show Gist options
  • Save cadwallion/831fc3449d9ff746fd65 to your computer and use it in GitHub Desktop.
Save cadwallion/831fc3449d9ff746fd65 to your computer and use it in GitHub Desktop.
Case statement with arrays
def getElementBonus elementA, elementB
case [elementA, elementB]
when ['Fire', 'Life']
return 3
when ['Water', 'Fire']
return 3
when ['Life', 'Water']
return 3
else
return 0
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment