コード例 #1
0
        public ChallengeScoreboard(IChallengePayout payout, IDictionary <UserId, decimal?> scoreboard) : base(scoreboard.OrderByDescending(item => item.Value))
        {
            PayoutBuckets = payout.Buckets;
            PayoutPrizePoolCurrencyType = payout.PrizePool.Type;
            var participants = this.Where(x => x.Value != null).Select(item => item.Key).ToList();

            Winners = new Queue <UserId>(participants.Take(payout.Entries));
            Losers  = new List <UserId>(participants.Skip(payout.Entries));
        }
コード例 #2
0
 public Challenge(ChallengeId challengeId, IChallengePayout payout)
 {
     this.SetEntityId(challengeId);
     Payout = payout;
 }