public static ScoringModel GetCurrentScoringModel() { ScoringModel _model = new ScoringModel(); //DAO fetch data return(_model); }
public int GetScore(Match match, PlayerType role) { int score = 0; ScoringModel sm = ScoringModel.GetCurrentScoringModel(); BattingCard card = match.GetOurBattingScoreCard(); foreach (var line in card.ScorecardData.Where(a => a.Batsman.ID == _player.ID)) { score += line.Score * sm.PointsPerRun; //... etc } return(score); }