From ac1c3c4a4cbd224dcca6abe540fecedb476151f5 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 3 Jul 2008 15:18:16 +0200 Subject: UNO plugin: round cards for late joiners up, not down --- data/rbot/plugins/games/uno.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/rbot/plugins/games/uno.rb b/data/rbot/plugins/games/uno.rb index ba3b1a90..640b28b1 100644 --- a/data/rbot/plugins/games/uno.rb +++ b/data/rbot/plugins/games/uno.rb @@ -650,9 +650,9 @@ class UnoGame end cards = 7 if @start_time - cards = @players.inject(0) do |s, pl| + cards = (@players.inject(0) do |s, pl| s +=pl.cards.length - end/@players.length + end*1.0/@players.length).ceil end p = Player.new(user) @players << p -- cgit v1.2.3