示例#1
0
        protected override (int, int) GetScore(NrlMatches game, IList <ClubLadder> dataLadder,
                                               IList <NrlMatches> lastRound)
        {
            var homeTeam = dataLadder.GetLadder(game.HomeTeam.NickName);
            var awayTeam = dataLadder.GetLadder(game.AwayTeam.NickName);

            return(homeTeam.ForPoints > awayTeam.ForPoints ? (10, 0) : (0, 10));
        }
示例#2
0
        protected override (int, int) GetScore(NrlMatches game, IList <ClubLadder> dataLadder,
                                               IList <NrlMatches> lastRound)
        {
            var home = GetTeamScore(dataLadder, lastRound, game.HomeTeam.NickName);
            var away = GetTeamScore(dataLadder, lastRound, game.AwayTeam.NickName);

            return(home, away);
        }
示例#3
0
        public Tip GetTip(NrlMatches game, IList <ClubLadder> dataLadder, IList <NrlMatches> dataLastRound)
        {
            var scores = new List <Score> ();

            _ruleList.ForEach(x => scores.Add(x.GetScoreClass(game, dataLadder, dataLastRound)));

            return(new Tip(scores, game));
        }
示例#4
0
        public Score GetScoreClass(NrlMatches game, IList <ClubLadder> dataLadder, IList <NrlMatches> lastRound)
        {
            var scores = GetScore(game, dataLadder, lastRound);

            return(new Score {
                RuleName = RuleName, HomeTeam = scores.Item1, AwayTeam = scores.Item2
            });
        }
示例#5
0
        protected override (int, int) GetScore(NrlMatches game, IList <ClubLadder> dataLadder,
                                               IList <NrlMatches> lastRound)
        {
            var ladder = dataLadder.GetLadder(game.HomeTeam.NickName);

            if (ladder.HomeForm > 0)
            {
                return(20, 0);
            }

            return(ladder.HomeForm == 0 ? (10, 0) : (0, 0));
        }
示例#6
0
        private static bool DidWin(string clubName, NrlMatches match)
        {
            if (match == null)
            {
                return(true);
            }
            if (match.HomeTeam.NickName == clubName)
            {
                return(match.HomeTeam.Score > match.AwayTeam.Score);
            }

            return(match.AwayTeam.Score > match.HomeTeam.Score);
        }
示例#7
0
        protected override (int, int) GetScore(NrlMatches game, IList <ClubLadder> dataLadder,
                                               IList <NrlMatches> lastRound)
        {
            var homeLadder = dataLadder.GetLadder(game.HomeTeam.NickName);
            var awayLadder = dataLadder.GetLadder(game.AwayTeam.NickName);

            if (homeLadder.Wins == awayLadder.Wins)
            {
                return(0, 0);
            }

            return(homeLadder.Wins > awayLadder.Wins ? (10, 0) : (0, 10));
        }
示例#8
0
        private static float GetScore(string teamName, NrlMatches previousRoundHome)
        {
            if (previousRoundHome == null)
            {
                return(0);
            }

            if (previousRoundHome.HomeTeam.NickName == teamName)
            {
                return(previousRoundHome.HomeTeam.Score - previousRoundHome.AwayTeam.Score);
            }

            return(previousRoundHome.AwayTeam.Score - previousRoundHome.HomeTeam.Score);
        }
示例#9
0
        protected override (int, int) GetScore(NrlMatches game, IList <ClubLadder> dataLadder,
                                               IList <NrlMatches> lastRound)
        {
            var ladder = dataLadder.GetLadder(game.AwayTeam.NickName);

            if (ladder.AwayForm < -4) //Need to change this to < 75% of games
            {
                return(20, 0);
            }

            if (ladder.AwayForm <= -2) //Need to change this to < 40% of games
            {
                return(10, 0);
            }

            return(ladder.AwayForm <= 0 ? (0, 8) : (0, 15));
        }
示例#10
0
        protected override (int, int) GetScore(NrlMatches game, IList <ClubLadder> dataLadder,
                                               IList <NrlMatches> lastRound)
        {
            int h = 0, a = 0;

            if (!DidWin(game.HomeTeam.NickName, lastRound) &&
                GetGameScore(game.HomeTeam.NickName, lastRound) < -15)
            {
                a = 10;
            }

            if (!DidWin(game.AwayTeam.NickName, lastRound) &&
                GetGameScore(game.AwayTeam.NickName, lastRound) < -15)
            {
                h = 10;
            }

            return(h, a);
        }
示例#11
0
        protected override (int, int) GetScore(NrlMatches game, IList <ClubLadder> dataLadder,
                                               IList <NrlMatches> lastRound)
        {
            var home = 0;
            var away = 0;

            if (game == null)
            {
                return(0, 0);
            }
            if (DidWin(game.HomeTeam.NickName, lastRound))
            {
                home += 10;
            }

            if (DidWin(game.AwayTeam.NickName, lastRound))
            {
                away += 10;
            }

            return(home, away);
        }
示例#12
0
 protected abstract (int, int) GetScore(NrlMatches game, IList <ClubLadder> dataLadder,
                                        IList <NrlMatches> lastRound);