diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-04-11 20:53:49 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-04-11 20:53:49 +0200 |
commit | d400e2711d003fafb15359c2f5479402260f6eb4 (patch) | |
tree | 5da7201599a1abed6d5726403b683dee8b870049 /data/rbot/plugins | |
parent | da7c90c235ae65697f4969112c53294e04904d0c (diff) |
uno plugin: Reverse with two players and a picker should bounce the pick
Diffstat (limited to 'data/rbot/plugins')
-rw-r--r-- | data/rbot/plugins/games/uno.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/data/rbot/plugins/games/uno.rb b/data/rbot/plugins/games/uno.rb index 07b9afe1..f2935c6e 100644 --- a/data/rbot/plugins/games/uno.rb +++ b/data/rbot/plugins/games/uno.rb @@ -263,11 +263,19 @@ class UnoGame end def reverse_turn + # if there are two players, the Reverse acts like a Skip, unless + # there's a @picker running, in which case the Reverse should bounce the + # pick on the other player if @players.length > 2 @players.reverse! # put the current player back in its place @players.unshift @players.pop announce _("Playing order was reversed!") + elsif @picker > 0 + announce _("%{cp} bounces the pick to %{np}") % { + :cp => @players.first, + :np => @players.last + } else skip_turn end |