Esempio n. 1
0
 public QueueController(ConnectedClient <IMessage> client, DataOfAccount data)
 {
     this.client             = client;
     client.Controler        = this;
     client.EventEndSession += Handler_EndSession;
     client.SendMessage(new RequestJoinToQueue());
     gamer = new QueueGamer(client, data);
 }
Esempio n. 2
0
 /// <summary>
 /// Удаляет игрока из очереди
 /// </summary>
 /// <param name="gamer"></param>
 /// <returns></returns>
 public bool DeleteOfQueue(QueueGamer gamer)
 {
     if (!gamer.AddInRoom)
     {
         for (int i = 0; i < queueOfGamer.Count; i++)
         {
             if (queueOfGamer[i].NickName == gamer.NickName &&
                 queueOfGamer[i].Password == gamer.Password)
             {
                 queueOfGamer.RemoveAt(i);
                 return(true);
             }
         }
     }
     return(false);
 }
Esempio n. 3
0
 public AccountController(QueueGamer gamer)
 {
     client           = gamer.Client;
     client.Controler = this;
     InitializeDataAboutClient(gamer.NickName, gamer.Password);
 }
Esempio n. 4
0
 /// <summary>
 /// Добавляет игрока в очередь
 /// </summary>
 /// <param name="gamer"></param>
 public void AddGamer(QueueGamer gamer)
 {
     queueOfGamer.Add(gamer);
 }