From 734b29bb02802fd5a03359a1e77aff2c8f28fe9a Mon Sep 17 00:00:00 2001 From: emkael Date: Fri, 3 Jun 2016 13:53:07 +0200 Subject: * determining highest makeable contract bug-fixed --- src/ParScore.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ParScore.cs b/src/ParScore.cs index a3705fd..5032ea1 100644 --- a/src/ParScore.cs +++ b/src/ParScore.cs @@ -86,7 +86,7 @@ namespace BCDD { ParContract contract = new ParContract(); int tricks = 0; - for (int i = 0; i < 4; i++) + for (int i = 3; i >= 0; i--) { if ((i % 2 == 0 && forNS) || (i % 2 == 1 && forEW)) @@ -94,7 +94,8 @@ namespace BCDD for (int j = 0; j < 5; j++) { int level = ddTable[i, j] - 6; - if (level >= contract.Level) + if (level > contract.Level + || (level == contract.Level && j > Array.IndexOf(BCalcWrapper.DENOMINATIONS, contract.Denomination))) { contract.Level = level; contract.Denomination = BCalcWrapper.DENOMINATIONS[j]; -- cgit v1.2.3