From cf3359807d96d55d4ba338132a3ab23e4b49ea33 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Tue, 30 Mar 2010 17:31:03 +0000 Subject: [PATCH] Fixed royal flush ranking (not that it really affected anything) git-svn-id: file:///srv/svn/euler@4 e5f4c3ec-3c0c-11df-b522-21efaa4426b5 --- 054/e054.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/054/e054.py b/054/e054.py index 9e0bdce..3b3465b 100644 --- a/054/e054.py +++ b/054/e054.py @@ -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