rank.rb now takes input file on command line

This commit is contained in:
swaits committed 2008-08-29 00:09:40 -07:00
1 parent 701d78a818
commit d33d08fc03
2 files changed
+1 -1

No files matched your search

+1 -1
View File
@@ -93,7 +93,7 @@ puts '<h1>Hand Log</h1>'
puts "<table>" puts "<table>"
puts "<tr><th>Player</th><th colspan=2>Hands</th><th>Score</th><th>Total</th></tr>" puts "<tr><th>Player</th><th colspan=2>Hands</th><th>Score</th><th>Total</th></tr>"
even = false even = false
IO.readlines('hands.txt').each do |line| IO.readlines(ARGV[0]).each do |line|
player,cards = line.chomp.split(/,/) player,cards = line.chomp.split(/,/)
score,hands = score(cards) score,hands = score(cards)
total[player.downcase] += score total[player.downcase] += score
View File
File renamed without changes.