From 74e225b229ef468caf7af8218edd2073252ec240 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Fri, 29 Aug 2008 00:35:40 -0700 Subject: [PATCH] cleanup --- rank.rb => score.rb | 31 ++++++++++++------------------- testhands.txt | 3 +++ 2 files changed, 15 insertions(+), 19 deletions(-) rename rank.rb => score.rb (81%) diff --git a/rank.rb b/score.rb similarity index 81% rename from rank.rb rename to score.rb index 1cdee0a..d3b55bf 100755 --- a/rank.rb +++ b/score.rb @@ -3,7 +3,7 @@ require 'hand' require 'combinations' -def score(hand_string, verbose=false) +def score(hand_string) # split into an array of two character strings (each representing a card) cards = hand_string.scan(/../) @@ -26,16 +26,6 @@ def score(hand_string, verbose=false) ten_card_hand = Hand.new(cards.join) best_hands,best_score = [ten_card_hand],ten_card_hand.score if ten_card_hand.score > best_score - # DEBUG - if verbose then - best_hands.each do |h| - puts "#{h.score} points for a #{h.score_name}" - puts h - puts - end - puts "#{best_score} TOTAL POINTS" - end - # return score [best_score, best_hands] end @@ -75,8 +65,10 @@ PlayerNames = { total = Hash.new(0) +puts '' puts '' puts 'Super Babel Scoring' +puts '' puts '' puts '' puts '