예제 #1
0
        private static void AppendGame(PBNGame g, StringBuilder csv)
        {
            string line = GetHand(g.Identification.Deal.North)
                          + GetHand(g.Identification.Deal.East)
                          + GetHand(g.Identification.Deal.South)
                          + GetHand(g.Identification.Deal.West)
                          + '"'
                          + HTMLVulnerabilityMapper
                          .GetstringFromVulnerability(g.Identification.Vulnerable)
                          + '"' + separator + '"' + g.Identification.Board + '"'
                          + separator + '\n';

            csv.Append(line);
        }
예제 #2
0
        public static void AppendDeal(StringBuilder html, Deal deal,
                                      Direction dealer, Vulnerability vulnerability)
        {
            if (deal == null)
            {
                return;
            }
            html.Append("<div class=\"diagram\">");
            html.Append("<div class=\"header\">");
            html.Append("<div>Dealer: "
                        + HTMLDirectionMapper.GetstringFromDirection(dealer) + "</div>");
            html.Append("<div>Vuln: "
                        + HTMLVulnerabilityMapper.GetstringFromVulnerability(vulnerability)
                        + "</div>");
            html.Append("</div>");

            AppendHand(html, deal.North, "north", "North");
            AppendHand(html, deal.West, "west", "West");
            AppendHand(html, deal.East, "east", "East");
            AppendHand(html, deal.South, "south", "South");

            html.Append("</div>");
        }