Пример #1
0
        public void RandomizeWeBL()
        {
            double luck = RandomGen.GetRandomNormal(mean: 1, stdDev: 0.05);

            NewDamage = OrigDamage * luck;
            this.NewPunchesAttempted = OrigPunchesAttempted;
            this.NewPunchesLanded    = (int)(OrigPunchesLanded * luck);
        }
Пример #2
0
        public static FightScore GetRoundScoreNoStun(double score1, double score2, double judgeLuck)
        {
            int fighter1Score = 10;
            int fighter2Score = 10;

            score1 = score1 * RandomGen.GetRandomNormal(1, judgeLuck);
            score2 = score2 * RandomGen.GetRandomNormal(1, judgeLuck);
            if (score1 > score2 && (score1 - score2) > Resources.RoundTieThreshold)
            {
                fighter2Score = 9;
            }
            else if (score2 > score1 && (score2 - score1) > Resources.RoundTieThreshold)
            {
                fighter1Score = 9;
            }
            return(new Model.FightScore(fighter1Score, fighter2Score));
        }
Пример #3
0
        private void ScoreRound(double judgeLuck, int numberOfJudges)
        {
            FightScore fScore = GetRoundScore(Fighter1Round, Fighter2Round, Fighter1Round.GetScore(), Fighter2Round.GetScore());

            this.Fighter1Score = fScore.Fighter1Score;
            this.Fighter2Score = fScore.Fighter2Score;

            this.JudgeRounds = new List <JudgeRound>();

            for (int i = 1; i <= numberOfJudges; i++)
            {
                double     score1 = Fighter1Round.GetScore() * RandomGen.GetRandomNormal(1, judgeLuck);
                double     score2 = Fighter2Round.GetScore() * RandomGen.GetRandomNormal(1, judgeLuck);
                FightScore fs     = GetRoundScore(this.Fighter1Round, this.Fighter2Round, score1, score2);
                JudgeRound jr     = new Model.JudgeRound(i, fs.Fighter1Score, fs.Fighter2Score, this.RoundNumber);
                this.JudgeRounds.Add(jr);
            }
        }
Пример #4
0
 public void SetLuckFactor(double stdDeviation)
 {
     this.LuckFactor = RandomGen.GetRandomNormal(1, stdDeviation);
 }