Exemplo n.º 1
0
 public List<LineUp> MakeLineUp(Int64 matchId, BoxScore_W boxScore)
 {
     MatchInfo matchInfo = new MatchInfo();
     var homeLineUp = GetLineUp(matchId, boxScore.HomeHitter, AttackType.Home);
     var awayLineUp = GetLineUp(matchId, boxScore.AwayHitter, AttackType.Away);
     return homeLineUp.Concat(awayLineUp).ToList();
 }
Exemplo n.º 2
0
        public Match MakeMatch(Situation_W situation, BoxScore_W boxScore)
        {
            // MatchInfo 만들기
            var matchInfo = MakeMatchInfo(boxScore);

            // Make Match
            Match match = new Match();
            match.GameId = situation.GameId;

            // MakeThs
            match.Ths = MakeThs(match, situation, matchInfo);

            return match;
        }
Exemplo n.º 3
0
        public BoxScore_W Parse(Schedule schedule, String html)
        {
            HtmlDocument doc = new HtmlDocument();
            doc.LoadHtml(html);
            var elements = doc.DocumentNode.SelectNodes("//table[@summary='타자기록']");

            BoxScore_W boxScore_W = new BoxScore_W();
            boxScore_W.GameId = schedule.GameId;
            boxScore_W.AwayHitter = elements[0].OuterHtml;
            boxScore_W.HomeHitter = elements[1].OuterHtml;

            elements = doc.DocumentNode.SelectNodes("//table[@summary='투수기록']");
            boxScore_W.AwayPitcher = elements[0].OuterHtml;
            boxScore_W.HomePitcher = elements[1].OuterHtml;

            return boxScore_W;
        }
Exemplo n.º 4
0
 private MatchInfo MakeMatchInfo(BoxScore_W boxScore)
 {
     MatchInfo matchInfo = new MatchInfo();
     matchInfo.HomeTeamPitcherInfos = GetPitcherInfos(boxScore.HomePitcher);
     matchInfo.AwayTeamPitcherInfos = GetPitcherInfos(boxScore.AwayPitcher);
     matchInfo.HomeTeamHitterInfos = GetBatterInfos(boxScore.HomeHitter);
     matchInfo.AwayTeamHitterInfos = GetBatterInfos(boxScore.AwayHitter);
     return matchInfo;
 }