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); }
/// <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); }
public AccountController(QueueGamer gamer) { client = gamer.Client; client.Controler = this; InitializeDataAboutClient(gamer.NickName, gamer.Password); }
/// <summary> /// Добавляет игрока в очередь /// </summary> /// <param name="gamer"></param> public void AddGamer(QueueGamer gamer) { queueOfGamer.Add(gamer); }