From d400e2711d003fafb15359c2f5479402260f6eb4 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Fri, 11 Apr 2008 20:53:49 +0200 Subject: uno plugin: Reverse with two players and a picker should bounce the pick --- data/rbot/plugins/games/uno.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'data') 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 -- cgit v1.2.3