Skip to content

Instantly share code, notes, and snippets.

Created June 8, 2011 20:45
Show Gist options
  • Save anonymous/1015357 to your computer and use it in GitHub Desktop.
Save anonymous/1015357 to your computer and use it in GitHub Desktop.
dumb max
def best_team(team_map)
best = nil
team_map.each {|x,team| if best == nil || team.win_loss_ratio() > best.win_loss_ratio()
best = team
end
}
best
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment