Who will win a Rock, Paper, Scissors, Lizard, Spock game? There are several questions regarding this game, even a king-of-the-hill contest here. But I think all those challenges and contests need a way to automatically determine the winner of a game. So:

Challenge

Given two inputs in the range ["rock", "paper", "scissors", "lizard", "spock"] representing the selections for player 1 and player 2, determine the winner of the match.

Rules

[Winner] [action]    [loser]
-----------------------------
scissors cut         paper
paper    covers      rock
rock     crushes     lizard
lizard   poisons     spock
spock    smashes     scissors
scissors decapitates lizard
lizard   eats        paper
paper    disproves   spock
spock    vaporizes   rock
rock     crushes     scissors


Restrictions


Input will be a pair of strings in the given range (no other strings can be used). You can use arrays of chars if you want, as long as they represent any of the mentioned values.
You can choose whether to use lowercase, uppercase ("ROCK") or camel case ("Rock") for the input strings, as long as the chosen case is the same for all inputs.
Output will be a trio of values that determine the winner, which can be anything you want as long as the answers are consistent. Example: 1 if the first input wins, 2 if the second input wins, 0 if there is a tie. Or maybe A if the first input wins, B if the second input wins, &lt;empty string&gt; if there is a tie.


Goal

This is code-golf, so may the shortest program/method/function/lambda for each language win!

Tests

[Input 1] [Input 2] [Output: 1/2/0]
-----------------------------------
 rock      paper     2
 rock      scissors  1
 lizard    spock     1
 spock     rock      1
 spock     paper     2
 rock      rock      0
Python 3, 68 50 48 bytes



EDIT: Thanks to 3 tricks from Neil, and 2 from Mr. Xcoder

Each input string has a distinct fourth character, so I'm using that to distinguish them. If you arrange the elements in the cycle (scissors, paper, rock, lizard, spock), then each element beats the element directly after it and the element 3 spots to the right, cyclically. So we subtract the inputs' positions in the cycle. If that number is 0, it's a tie. If it's 1 or 3, it's a win for the first player. In my original solution, the cycle difference would index into the string "210100" to distinguish the results of the game. Neil somehow figured out this can be accomplished without indexing by adding 7 and taking the modulus by 3. Edit: Originally I used the second character to identify the string, but if you use the fourth and reverse the cycle, you get cake. And we could all use more cake.

lambda x,y,z="cake".find:(7+z(y[3])-z(x[3]))%5%3


Try it online!

Older version:

lambda x,y,z="caoip".index:(7+z(y[1])-z(x[1]))%5%3


Try it online!

Original version:

b="caoip"
def r(x,y):return"210100"[(b.index(y[1])-b.index(x[1]))%5]


Try it online!