summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/games/uno.rb
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-04-14 22:55:05 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-04-14 22:55:05 +0200
commitf7786f40c4c70e6f72eb49566c8fba020d59af56 (patch)
treea39fc488b1da7bdbe9b92d4dd5702f6aef4c96eb /data/rbot/plugins/games/uno.rb
parent5c0a202257ca2195900ef4dbbe3215f1fd730727 (diff)
uno plugin: initialize top10 counter both for inline and spread lists
Diffstat (limited to 'data/rbot/plugins/games/uno.rb')
-rw-r--r--data/rbot/plugins/games/uno.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/data/rbot/plugins/games/uno.rb b/data/rbot/plugins/games/uno.rb
index 01db7ff4..7b13beaf 100644
--- a/data/rbot/plugins/games/uno.rb
+++ b/data/rbot/plugins/games/uno.rb
@@ -1105,8 +1105,8 @@ class UnoPlugin < Plugin
}
scores.sort! { |a1, a2| -(a1.first <=> a2.first) }
scores = scores[0, n.to_i].compact
+ i = 0
if scores.length <= 5
- i = 0
list = "\n" + scores.map { |a|
i+=1
_("%{i}. %{b}%{nick}%{b} with %{b}%{score}%{b} points") % {
@@ -1127,8 +1127,8 @@ class UnoPlugin < Plugin
}
wins.sort! { |a1, a2| -(a1.first <=> a2.first) }
wins = wins[0, n.to_i].compact
+ i = 0
if wins.length <= 5
- i = 0
list = "\n" + wins.map { |a|
i+=1
_("%{i}. %{b}%{nick}%{b} with %{b}%{score}%{b} wins") % {