mirror of
https://github.com/correl/euler.git
synced 2024-11-27 11:09:54 +00:00
Allowing a hand to be anything between 1 and 5 cards. This will allow
for improvement probability calculations and such, as well as ranking smaller hands for games like chinese poker. git-svn-id: file:///srv/svn/euler@13 e5f4c3ec-3c0c-11df-b522-21efaa4426b5
This commit is contained in:
parent
987dc151cf
commit
519824caee
1 changed files with 1 additions and 1 deletions
|
@ -62,7 +62,7 @@ class Hand:
|
|||
'Royal Flush'
|
||||
]
|
||||
def __init__(self, cards):
|
||||
if len(cards) != 5:
|
||||
if len(cards) < 1 or len(cards) > 5:
|
||||
raise InvalidHand(cards)
|
||||
self.__rank = None
|
||||
self.__cards = sorted([Card(c) for c in cards], reverse=True)
|
||||
|
|
Loading…
Reference in a new issue