Rock Paper Scissors
<p>I had a test for my comp sci class and one of the questions was to make a rock paper scissors game that if player 1 won it would return -1, if player 2 won it would return 1 and if it were a tie it would return 0. I made my program and ran it and it worked but according to my professor he said it didn't.</p>

<pre><code>def rps(x,y):
    player1 = -1
    player2 = 1
    tie = 0
    'R'&gt;'S'
    'P'&gt;'R'
    'S'&gt;'P'
    if x&gt;y:
        return player1
    if x&lt;y:
        return player2
    else:
        return tie
</code></pre>

<p>I don't see what is wrong with it? It if you do rps('R','P') then it would return -1 because x = player1 and because Rock beats Paper. Can anyone help me to see if my code is wrong?</p>
