コード例 #1
0
        // domain behavior

        public Participant ProcessMatchResults(Guid clubId, int mp, int w, int l, int score)
        {
            Participant participant = Leaderboard.Participants.Find(item => item.ClubId == clubId);

            ClubPoints clubPoints = new ClubPoints(
                participant.ClubPoints.MP + mp,
                participant.ClubPoints.W + w,
                participant.ClubPoints.L + l);

            participant.AddScore(score);
            participant.AddClubPoints(clubPoints);

            return(participant);
        }
コード例 #2
0
 internal void AddClubPoints(ClubPoints clubPoints)
 {
     ClubPoints = clubPoints;
 }
コード例 #3
0
 internal Participant(Guid clubId)
 {
     ClubId     = clubId;
     Score      = 0;
     ClubPoints = new ClubPoints(0, 0, 0);
 }