diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2010-07-02 12:04:42 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2010-07-02 12:04:42 +0200 |
commit | e432044b6a769cae6ff501e80161a6abd7669fde (patch) | |
tree | 6ab64c66a137dce22cac38dfd6d78896a28b97c3 | |
parent | c012fd7aa2b0fdbe3f8226980fe80e9decb285a0 (diff) |
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.
-rw-r--r-- | data/rbot/plugins/games/uno.rb | 15 |
1 files changed, 11 insertions, 4 deletions
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 |