Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 19 lines (13 sloc) 333 Bytes
#!/usr/bin/env ruby
last_line = []
1000.times do
output = `ruby ./engine.rb`
last_line.push output.split("\n").last
end
winners = Hash.new(0)
last_line.each do |val|
winners[val] += 1
end
winners.sort_by{|winner, times| -times}.each do |winner, times|
puts "#{winner.gsub(' is the winner!', '')} won #{times} times"
end
Something went wrong with that request. Please try again.