public JoinPublicParkResponse(JoinPublicParkRequest request, Dictionary <String, Point> listOtherPlayer, String userCR, Point lcCR) : base(request) { this.ListOtherPlayer = listOtherPlayer; this.UserNameCurrent = userCR; this.LocationCurrent = lcCR; }
public void JoinPublicParkRequestHandler(JoinPublicParkRequest request) { this.Status = StatusEnum.InPublicPark; this.LocationPP = new Point(0, 0); AddNewPlayRequest playRequest = new AddNewPlayRequest(this.Email, this.LocationPP); foreach (Receiver receiver in Server.Receivers.Where(x => x != this)) { if (receiver.Status == StatusEnum.InPublicPark) { receiver.SendMessage(playRequest); } } JoinPublicParkResponse response = new JoinPublicParkResponse(request, GetAllPlayerInPublicPark(Server.Receivers), this.Email, this.LocationPP); this.SendMessage(response); }
public JoinPublicParkResponse(JoinPublicParkRequest request) : base(request) { }
public void RequestJoinPublicPark() { JoinPublicParkRequest request = new JoinPublicParkRequest(); SendMessage(request); }