Esempio n. 1
0
 private Party(IPartyPool pool, int partyLimit)
 {
     this.pool           = pool;
     this.PartyLimit     = partyLimit;
     this.Players        = new List <IPlayer>();
     this.PendingInvites = new List <IPlayer>();
 }
Esempio n. 2
0
 public Party(IPartyPool pool, int partyLimit, IPlayer leader) : this(pool, partyLimit)
 {
     this.PartyLeader = leader;
     leader.Register(this);
     Players.Add(leader);
     UpdateStatus();
     UsedGroupFinder = false;
 }
Esempio n. 3
0
 public GroupFinder(BlockingCollection <KeyValuePair <IParty, IAdventure> > adventureQueue,
                    IPartyPool pool, int partyCapacity, IAdventureRepository repo)
 {
     this.adventureQueue = adventureQueue;
     this.tickets        = new SortedList <DateTime, AdventureTicket>();
     this.waitTimes      = new List <TimeSpan>();
     this.repository     = repo;
     this.partySize      = partyCapacity;
     this.pool           = pool;
 }
Esempio n. 4
0
        public Party(IPartyPool pool, IList <IPlayer> players) : this(pool, players.Count())
        {
            if (PartyLimit > 0)
            {
                this.PartyLeader = players[0];
            }

            foreach (var p in players)
            {
                Players.Add(p);
                p.Register(this);
            }

            UpdateStatus();
            UsedGroupFinder = true;
        }
Esempio n. 5
0
 public IGroupFinder Create(IPartyPool pool, int partyCapacity, IAdventureRepository repo,
                            IAdventureManager am)
 {
     return(new GroupFinder(am.Queue(), pool, partyCapacity, repo));
 }