From 6a8d1a2863573e31895c3eedfbe9019022cfc467 Mon Sep 17 00:00:00 2001 From: Soren Hein Date: Mon, 5 Jan 2015 15:58:19 +0100 Subject: [PATCH] Fixes bugs in LastTrickWinner Was returning wrong result when only one trick was input. --- src/SolverIF.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SolverIF.cpp b/src/SolverIF.cpp index 8457c8d0..e30c83c3 100644 --- a/src/SolverIF.cpp +++ b/src/SolverIF.cpp @@ -1103,7 +1103,7 @@ void LastTrickWinner( { hp = handId(dl->first, h); lastTrickSuit[hp] = dl->currentTrickSuit[h]; - lastTrickRank[hp] = dl->currentTrickRank[h]; + lastTrickRank[hp] = bitMapRank[dl->currentTrickRank[h]]; } for (h = handRelFirst; h < DDS_HANDS; h++) @@ -1157,8 +1157,8 @@ void LastTrickWinner( } } - * leadRank = lastTrickRank[handRelFirst]; - * leadSuit = lastTrickSuit[handRelFirst]; + * leadRank = highestRank[maxRank]; + * leadSuit = maxSuit; * leadSideWins = ((handToPlay == maxHand || partner[handToPlay] == maxHand) ? 1 : 0); }