summaryrefslogtreecommitdiff
blob: c5993b64bb8c66a0403fd97e1891d130073e8762 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: fixed gamelogic bug with wheel-straight: check suit of ace if testing for straight-flush
Origin: https://sourceforge.net/apps/trac/holdingnuts/changeset/741
--- a/src/libpoker/GameLogic.cpp
+++ b/src/libpoker/GameLogic.cpp
@@ -179,7 +179,11 @@
 	
 	// is an A2345-straight ("wheel")
 	if (count == 4 && (last_face == Card::Two && allcards->front().getFace() == Card::Ace))
-		is_straight = true;
+	{
+		// check suit when testing for StraightFlush
+		if (suit == -1 || allcards->front().getSuit() == suit)
+			is_straight = true;
+	}
 	
 	if (is_straight)
 	{