Removed pointless 5 card limitation from the static factory method

git-svn-id: file:///srv/svn/euler@15 e5f4c3ec-3c0c-11df-b522-21efaa4426b5
This commit is contained in:
Correl Roush 2010-04-01 04:44:32 +00:00
parent e2d55968e3
commit 71973e170f

View file

@ -181,10 +181,8 @@ class Hand:
Uses smart hand creation if more than five cards are specified. Uses smart hand creation if more than five cards are specified.
""" """
if len(cards) == 5: if len(cards) <= 5:
return Hand(cards) return Hand(cards)
elif len(cards) < 5:
raise InvalidHand
else: else:
return Hand.create_best_hand_smart(cards) return Hand.create_best_hand_smart(cards)
return false return false