Skip to content

Commit

Permalink
Print stats after every turn (useful for debugging) and nicer results
Browse files Browse the repository at this point in the history
  • Loading branch information
izidormatusov committed Apr 11, 2012
1 parent fc5f0a4 commit 089d77d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions engine/game.rb
Expand Up @@ -45,8 +45,16 @@ def round(count)
end
# Finish if there is only one player
break if @players.size == 1

puts "Stats:"
@proxies.sort_by { |p| [-p.stats[:experience], p.to_s] }.each do |p|
puts "\t#{p}: #{p.stats}"
end
puts
end
puts
puts "Results:"
puts "--------"
@proxies.sort_by { |p| [-p.stats[:experience], p.to_s] }.each do |p|
puts "#{p}: #{p.stats}"
end
Expand Down

0 comments on commit 089d77d

Please sign in to comment.