Fixed royal flush ranking (not that it really affected anything)

git-svn-id: file:///srv/svn/euler@4 e5f4c3ec-3c0c-11df-b522-21efaa4426b5
This commit is contained in:
Correl Roush 2010-03-30 17:31:03 +00:00
parent e7ab66cbd7
commit cf3359807d

View file

@ -83,7 +83,7 @@ class PokerHand:
(self._cards[4].value == 2 and self._cards[1].value == 5 and self._cards[0].value == 14):
straight = True
if straight and flush:
if self._cards[4] == 14:
if self._cards[0].value == 14:
self._rank = PokerHand.ROYAL_FLUSH
else:
self._rank = PokerHand.STRAIGHT_FLUSH