示例#1
0
        public static ScoringModel GetCurrentScoringModel()
        {
            ScoringModel _model = new ScoringModel();

            //DAO fetch data
            return(_model);
        }
示例#2
0
        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);
        }