diff options
author | emkael <emkael@tlen.pl> | 2021-01-29 22:28:28 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2021-01-29 22:28:28 +0100 |
commit | 17ae084dadec37eaf991d66e7bf17adce3d7d12f (patch) | |
tree | da823645f433cb3d342140bba00b97cee8fe6c45 | |
parent | 269cbfd298eaed667f6e4ab9eca39812e4592169 (diff) |
Log summary for contracts from the perspective of the declarer, not N/S
-rw-r--r-- | Analizator9000/Analizator9000/ScoreAccumulator.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Analizator9000/Analizator9000/ScoreAccumulator.cs b/Analizator9000/Analizator9000/ScoreAccumulator.cs index 1a9756f..26041ef 100644 --- a/Analizator9000/Analizator9000/ScoreAccumulator.cs +++ b/Analizator9000/Analizator9000/ScoreAccumulator.cs @@ -108,10 +108,17 @@ namespace Analizator9000 sw.WriteLine(Form1.GetResourceManager().GetString("ScoreAccumulator_txtHeader", Form1.GetCulture()));
foreach (KeyValuePair<Contract, long> tricks in this.trickSums)
{
+ double maxAv = this.maxScoreSums[tricks.Key] / this.dealsScored;
+ double impAv = this.impScoreSums[tricks.Key] / this.dealsScored;
+ if (tricks.Key.Declarer == Contract.DECLARER_EAST || tricks.Key.Declarer == Contract.DECLARER_WEST)
+ {
+ maxAv = 1.0 - maxAv;
+ impAv = -impAv;
+ }
sw.WriteLine(" {0,6} (x{1,3}) {2,5:0.00} {3,9:0.00} {6,5:0.00} {4,5:0.00} {5,7:0.00} ",
this.getContractLogLine(tricks.Key), tricks.Key.Frequency,
(double)tricks.Value / this.dealsScored, (double)this.scoreSums[tricks.Key] / this.dealsScored,
- this.maxScoreSums[tricks.Key] / this.dealsScored, this.impScoreSums[tricks.Key] / this.dealsScored,
+ maxAv, impAv,
(double)this.successSums[tricks.Key] / this.dealsScored);
}
sw.Close();
|