From e432044b6a769cae6ff501e80161a6abd7669fde Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Fri, 2 Jul 2010 12:04:42 +0200 Subject: UNO! plugin: cope with pre-game drops The drop is still counted, to prevent people from leaving and then rejoining until they have nice cards. --- data/rbot/plugins/games/uno.rb | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'data/rbot/plugins/games') diff --git a/data/rbot/plugins/games/uno.rb b/data/rbot/plugins/games/uno.rb index a86c33db..3d874bf9 100644 --- a/data/rbot/plugins/games/uno.rb +++ b/data/rbot/plugins/games/uno.rb @@ -329,7 +329,7 @@ class UnoGame def next_turn(opts={}) @players << @players.shift @player_has_picked = false - show_turn + show_turn unless opts[:silent] end def can_play(card) @@ -699,11 +699,18 @@ class UnoGame } case @players.length when 2 + if @join_timer + @bot.timer.remove(@join_timer) + announce _("game start countdown stopped") + @join_timer = nil + end if p == @players.first - next_turn + next_turn :silent => @start_time.nil? + end + if @start_time + end_game + return end - end_game - return when 1 end_game(true) return -- cgit v1.2.3