diff options
Diffstat (limited to 'data')
-rw-r--r-- | data/rbot/plugins/azgame.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/data/rbot/plugins/azgame.rb b/data/rbot/plugins/azgame.rb index 9721d8b8..1046bba3 100644 --- a/data/rbot/plugins/azgame.rb +++ b/data/rbot/plugins/azgame.rb @@ -70,11 +70,12 @@ class AzGame debug "Total score: #{t}"
ret = Hash.new
@tries.each { |k, a|
- ret[k] = [t*a/n, "%d tries" % a]
+ ret[k] = [t*a/n, "%d %s" % [a, a > 1 ? "tries" : "try"]]
}
if @winner
debug "replacing winner score of %d with %d" % [ret[@winner].first, t]
- ret[@winner] = [t, "winner"]
+ tries = ret[@winner].last
+ ret[@winner] = [t, "winner, #{tries}"]
end
return ret.sort_by { |h| h.last.first }
end
|