From d33d08fc0370d7d8ef0fef39f8ad2bdea734d82b Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Fri, 29 Aug 2008 00:09:40 -0700 Subject: [PATCH] rank.rb now takes input file on command line --- rank.rb | 2 +- hands.txt => testhands.txt | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename hands.txt => testhands.txt (100%) diff --git a/rank.rb b/rank.rb index d2d643a..1cdee0a 100755 --- a/rank.rb +++ b/rank.rb @@ -93,7 +93,7 @@ puts '

Hand Log

' puts "" puts "" even = false -IO.readlines('hands.txt').each do |line| +IO.readlines(ARGV[0]).each do |line| player,cards = line.chomp.split(/,/) score,hands = score(cards) total[player.downcase] += score diff --git a/hands.txt b/testhands.txt similarity index 100% rename from hands.txt rename to testhands.txt
PlayerHandsScoreTotal