summaryrefslogtreecommitdiff
path: root/src/ParScore.cs
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-06-03 13:53:07 +0200
committeremkael <emkael@tlen.pl>2016-06-03 13:53:07 +0200
commit734b29bb02802fd5a03359a1e77aff2c8f28fe9a (patch)
treec70e38658930fb4ecc5578c6f928ee3343fc4858 /src/ParScore.cs
parent732c094d52f565ad8627e019dbef4c4c77994429 (diff)
* determining highest makeable contract bug-fixed
Diffstat (limited to 'src/ParScore.cs')
-rw-r--r--src/ParScore.cs5
1 files changed, 3 insertions, 2 deletions
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];