             else
                 @value = 'TJQKA'.indexOf(value) + 10
 
+        value_s: () -> value_s(@value)
+
         to_s: () ->
             suit = {'C':'clubs','D':'diamonds','H':'hearts','S':'spades'}[@suit]
-            value = @value
-            if (@value > 10)
-                value = {11:'Jack',12:'Queen',13:'King',14:'Ace'}[@value]
-
-            "#{value} of #{suit}"
+            "#{value_s} of #{suit}"
     
     cards = []
     for card in s.split(' ')

        return false if card.suit != suit

    true


# Return the maximal hand type found in an hand. This is a numbers Array,


hand_types = [ 'high card', 'pair', 'two pairs', 'three of a kind', 'straight',
'flush', 'full house', 'four of a kind', 'straight flush' ]

compare_hands = (s) ->

