diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2010-12-08 13:24:02 +0100 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2010-12-08 13:24:02 +0100 |
commit | 539685183e46a9fe7f0d334688b8760a99e3d169 (patch) | |
tree | c88de769702ff18462d0b0abffbdf88a691588ba /data/rbot/plugins | |
parent | b781d7259bf147a47b5ee575beb255b0afa08feb (diff) |
UNO!: reset must_play when changing turn
After a successful challenge, the challenged player can choose to
pick&pass instead of playing one of its allowed cards. In such a case,
the must_play array would not get reset, preventing the next player to
be able to play any of its card.
Fix by resetting must_play on next_turn rather than on set_discard.
Diffstat (limited to 'data/rbot/plugins')
-rw-r--r-- | data/rbot/plugins/games/uno.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/data/rbot/plugins/games/uno.rb b/data/rbot/plugins/games/uno.rb index e6a7ea18..6b50d03e 100644 --- a/data/rbot/plugins/games/uno.rb +++ b/data/rbot/plugins/games/uno.rb @@ -331,10 +331,10 @@ class UnoGame else @special = false end - @must_play = nil end def next_turn(opts={}) + @must_play = nil @players << @players.shift @player_has_picked = false show_turn unless opts[:silent] |