Exemple #1
0
 public static ProbabilityModel GetProbabilityCommandScoreOne(ResultCommandEnum result, List <DataModel> dataModels)
 {
     return(new ProbabilityModel
     {
         Probability = dataModels
                       .Where(x => result == ResultCommandEnum.FirstCommandScoreOne ? x.ScoreFirstCommand > 0 : x.ScoreSecondCommand > 0)
                       .Sum(x => x.Probability),
         Result = result
     });
 }
Exemple #2
0
        public static ProbabilityModel GetProbilityCommandWinOrDrawOrLose(ResultCommandEnum result, DataModel currentDataModel, List <DataModel> dataModels)
        {
            var possibleOutcome = dataModels
                                  .Where(x => x.ResultCommand == result)
                                  .Sum(x => x.Probability);

            return(new ProbabilityModel
            {
                Probability = currentDataModel.ResultCommand == result ? (possibleOutcome + currentDataModel.Probability) : possibleOutcome,
                Result = result
            });
        }