mirror of https://github.com/dirtbags/moth.git
Fix egregious logic bug in roshambo server
The second player always won :)
This commit is contained in:
parent
2a9b46a662
commit
fef10a63dc
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue