示例#1
0
        private List <PlayerResultScore> ResultScoreMockPlayerB(Player player, Guid gameId, Guid matchId)
        {
            var score1 = new PlayerResultScore(player, matchId, gameId, 2, 3);
            var clc    = new MortalKombatPointCalculator(3, 2, 0, 0);

            score1.SetPointsTaken(clc);
            score1.SetPointsLost(clc);

            var score2 = new PlayerResultScore(player, matchId, gameId, 3, 1);

            clc = new MortalKombatPointCalculator(3, 3, 5, 0);
            score2.SetPointsTaken(clc);
            score2.SetPointsLost(clc);

            var score3 = new PlayerResultScore(player, matchId, gameId, 1, 3);

            clc = new MortalKombatPointCalculator(3, 1, 6, 6.2);
            score2.SetPointsTaken(clc);
            score2.SetPointsLost(clc);

            List <PlayerResultScore> scores = new List <PlayerResultScore> {
                score1, score2, score3
            };

            return(scores);
        }
示例#2
0
        private void SetLoser(Guid matchId, Guid gameId, PlayerSpecs loser, PlayerSpecs winner, MatchResult <Player> matchResult)
        {
            var loserResultScores =
                new PlayerResultScore(
                    loser.Participant,
                    matchId,
                    gameId,
                    loser.RoundsWon,
                    winner.RoundsWon);

            var loserCalculator = new MortalKombatPointCalculator(
                MaxRounds,
                loser.RoundsWon,
                winner.PreviousScore,
                loser.PreviousScore);

            loserResultScores.SetPointsTaken(loserCalculator);
            loserResultScores.SetPointsLost(loserCalculator);

            matchResult.SetLoser(loserResultScores);
        }