diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-07-03 15:18:16 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-07-03 15:18:16 +0200 |
commit | ac1c3c4a4cbd224dcca6abe540fecedb476151f5 (patch) | |
tree | 2b34f408cf1867dc54a736fd81e16777705a0f33 | |
parent | 9c10efa994abb057b5e1a75757ee1570e2a6aa9a (diff) |
UNO plugin: round cards for late joiners up, not down
-rw-r--r-- | data/rbot/plugins/games/uno.rb | 4 |
1 files 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 |