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)); }
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); }
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)); }
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 }); }
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)); }
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); }
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)); }
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); }
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)); }
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); }
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); }
protected abstract (int, int) GetScore(NrlMatches game, IList <ClubLadder> dataLadder, IList <NrlMatches> lastRound);