summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-05-25 14:10:41 +0200
committeremkael <emkael@tlen.pl>2016-05-25 14:10:41 +0200
commitfe02c3378117ae01776e6b4f278ace6b90e3391c (patch)
tree4495deb0dec8fa836de699d8189f7ecb83efa3b5 /src
parent635adbd089fe69c8459e174a054edbad50891890 (diff)
* "all pass" special value in Minimax tag
Diffstat (limited to 'src')
-rw-r--r--src/PBNBoard.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/PBNBoard.cs b/src/PBNBoard.cs
index 72f87a4..d60bfe3 100644
--- a/src/PBNBoard.cs
+++ b/src/PBNBoard.cs
@@ -187,7 +187,16 @@ namespace BCDD
public void WriteMinimax(ParContract contract)
{
- this.Fields.Add(new PBNField("Minimax", String.Format("{0}{1}{2}{3}{4}", contract.Level, contract.Denomination, contract.Doubled ? "D" : "", contract.Declarer, contract.Score)));
+ String minimax;
+ if (contract.Score == 0)
+ {
+ minimax = "7NS0";
+ }
+ else
+ {
+ minimax = String.Format("{0}{1}{2}{3}{4}", contract.Level, contract.Denomination, contract.Doubled ? "D" : "", contract.Declarer, contract.Score);
+ }
+ this.Fields.Add(new PBNField("Minimax", minimax));
}
public String GetOptimumScore()