public void CalculateResuilts(int maxNumberOfRecords, IScoring scoringMethod) { int playedDeals = GetPlayedDeals(); for (int i = 0; i < deals.Count; i++) { if (deals[i].HasResult()) { short res = deals[i].result; double ns = 0; double ew = 0; for (int k = 0; k < deals.Count; k++) { if (i != k && deals[k].HasResult()) { short res2 = deals[k].result; ns += scoringMethod.GetDiff(res, res2); ew += scoringMethod.GetDiff(res2, res); } } ns = scoringMethod.ResultReduction(ns, playedDeals, maxNumberOfRecords); ew = scoringMethod.ResultReduction(ew, playedDeals, maxNumberOfRecords); deals[i].SetResults(ns, ew); } } }