Rock, Paper, Scissors, Lizard, Spock Create a function that will take two strings as input and return a single output for the result.  Most popular answer wins.

The rules of Rock-paper-scissors-lizard-Spock are:


Scissors cut paper
Paper covers rock
Rock crushes lizard
Lizard poisons Spock
Spock smashes scissors
Scissors decapitate lizard
Lizard eats paper
Paper disproves Spock
Spock vaporizes rock
Rock breaks scissors


The output for every possible input case is:

winner('Scissors', 'Paper') -&gt; 'Scissors cut Paper'
winner('Scissors', 'Rock') -&gt; 'Rock breaks Scissors'
winner('Scissors', 'Spock') -&gt; 'Spock smashes Scissors'
winner('Scissors', 'Lizard') -&gt; 'Scissors decapitate Lizard'
winner('Scissors', 'Scissors') -&gt; 'Scissors tie Scissors'
winner('Paper', 'Rock') -&gt; 'Paper covers Rock'
winner('Paper', 'Spock') -&gt; 'Paper disproves Spock'
winner('Paper', 'Lizard') -&gt; 'Lizard eats Paper'
winner('Paper', 'Scissors') -&gt; 'Scissors cut Paper'
winner('Paper', 'Paper') -&gt; 'Paper ties Paper'
winner('Rock', 'Spock') -&gt; 'Spock vaporizes Rock'
winner('Rock', 'Lizard') -&gt; 'Rock crushes Lizard'
winner('Rock', 'Scissors') -&gt; 'Rock breaks Scissors'
winner('Rock', 'Paper') -&gt; 'Paper covers Rock'
winner('Rock', 'Rock') -&gt; 'Rock ties Rock'
winner('Lizard', 'Rock') -&gt; 'Rock crushes Lizard'
winner('Lizard', 'Spock') -&gt; 'Lizard poisons Spock'
winner('Lizard', 'Scissors') -&gt; 'Scissors decapitate Lizard'
winner('Lizard', 'Paper') -&gt; 'Lizard eats Paper'
winner('Lizard', 'Lizard') -&gt; 'Lizard ties Lizard'
winner('Spock', 'Rock') -&gt; 'Spock vaporizes Rock'
winner('Spock', 'Lizard') -&gt; 'Lizard poisons Spock'
winner('Spock', 'Scissors') -&gt; 'Spock smashes Scissors'
winner('Spock', 'Paper') -&gt; 'Paper disproves Spock'
winner('Spock', 'Spock') -&gt; 'Spock ties Spock'


Extra challenge suggested by @Sean Cheshire: Allow custom lists, such as those from this site. With the n-item list, the item loses to the (n-1)/2 previous, and wins over the (n-1)/2 following
APL

vs←{
    n←'Scissors' 'Paper' 'Rock' 'Lizard' 'Spock'
    x←n⍳⊂⍺ ⋄ y←n⍳⊂⍵ ⋄ X←⍺ ⋄ Y←⍵ ⋄ r←{X,⍵,⊂Y}
    x=y:     r (-x=0)↓'ties'
    y=5|1+x: r x⌷'cut' 'covers' 'crushes' 'poisons' 'smashes'
    y=5|3+x: r x⌷'decapitate' 'disproves' 'breaks' 'eats' 'vaporizes'
    ⍵∇⍺
}


Output exactly as required in all cases, including tie/ties. No lookup table, except for the actual words.

You can try it on http://ngn.github.io/apl/web/

'Spock' vs 'Paper'
Paper  disproves  Spock


APL just knows!