private void ProduceHcp(TextWriter report, Board board) { report.WriteLine("<td rowspan='4' style='height: 100%'><table class='hcp'>"); report.WriteLine(hcpHtml, HcpEvaluator.GetHcp(board.Hands[Seat.North]), HcpEvaluator.GetHcp(board.Hands[Seat.West]), HcpEvaluator.GetHcp(board.Hands[Seat.East]), HcpEvaluator.GetHcp(board.Hands[Seat.South])); report.WriteLine("</table></td>"); }
static public Info AverageHcp(List <Board> boards) { var info = new Info(); if (boards.Count == 0) { return(info); } foreach (var board in boards) { info.North += HcpEvaluator.GetHcp(board.Hands[Seat.North]); info.South += HcpEvaluator.GetHcp(board.Hands[Seat.South]); info.East += HcpEvaluator.GetHcp(board.Hands[Seat.East]); info.West += HcpEvaluator.GetHcp(board.Hands[Seat.West]); } info.North /= boards.Count; info.South /= boards.Count; info.East /= boards.Count; info.West /= boards.Count; return(info); }