From 4ff3c5d894c9b6b375b69d5fe9506a0a73e33871 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 9 Dec 2010 11:32:49 +0100 Subject: [PATCH] UNO!: prevent joins after a challengeable card If someone joins after a challengeable W+4, he would be inserted between the last and first player, and if there is a challenge _his_ cards would be exposed. So prevent joining in such a situation. --- 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 6b50d03e..c689c253 100644 --- a/data/rbot/plugins/games/uno.rb +++ b/data/rbot/plugins/games/uno.rb @@ -689,6 +689,13 @@ class UnoGame return end end + if @last_discard + announce _("you can't join now, %{p}, a %{card} was just played, wait until next turn") % { + :card => @discard, + :p => user + } + return + end cards = 7 if @start_time cards = (@players.inject(0) do |s, pl| -- 2.39.5