From 2092b0b165822b09a2fa83aad18bc9d12af753b5 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Mon, 21 Apr 2008 23:37:04 +0200 Subject: uno plugin: only allow to pick a color after a wild --- data/rbot/plugins/games/uno.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/data/rbot/plugins/games/uno.rb b/data/rbot/plugins/games/uno.rb index 131f0673..f77d1c42 100644 --- a/data/rbot/plugins/games/uno.rb +++ b/data/rbot/plugins/games/uno.rb @@ -517,6 +517,13 @@ class UnoGame end def choose_color(user, color) + # you can only pick a color if the current color is unset + if @color + announce _("you can't pick a color now, %{p}") % { + :p => get_player(user) + } + return + end case color when 'r' @color = 'Red' -- cgit v1.2.3