Fix egregious logic bug in roshambo server

The second player always won :)
This commit is contained in:
Neale Pickett 2009-08-28 17:21:55 -06:00
parent 2a9b46a662
commit fef10a63dc
1 changed files with 3 additions and 3 deletions

View File

@ -13,9 +13,9 @@ class Roshambo(game.TurnBasedGame):
players[0].write('tie') players[0].write('tie')
players[1].write('tie') players[1].write('tie')
self.moves = [] self.moves = []
elif moves in (('rock', 'scissors'), elif moves in (['rock', 'scissors'],
('scissors', 'paper'), ['scissors', 'paper'],
('paper', 'rock')): ['paper', 'rock']):
# First player wins # First player wins
self.declare_winner(players[0]) self.declare_winner(players[0])
else: else: