Пример #1
0
 public static void AnswerResponse(TcpClients client, Choice playerChoice, int TimeToAnswer)
 {
     SocketHelper.WriteToServer(client, Encapsulation.Serialize(Encapsulation.FromValue(new Answer {
         GameId = GameInfo.UniqueId, RoundId = GameInfo.RoundGuid, TimeToAnswer = TimeToAnswer, playerChoice = playerChoice
     }, MessageType.Answer)));
 }
Пример #2
0
 public static void DiscoverResponse(TcpClients client)
 {
     SocketHelper.WriteToServer(client, Encapsulation.Serialize(Encapsulation.FromValue(new Discover {
         UserName = Environment.UserName
     }, MessageType.Discover)));
 }
Пример #3
0
 public static void SearchingResponse(TcpClients client)
 {
     SocketHelper.WriteToServer(client, Encapsulation.Serialize(Encapsulation.FromValue(new GenericMessage {
         Message = "Looking for a game"
     }, MessageType.Searching)));
 }
Пример #4
0
 public static void DisconnectMessage(TcpClients client)
 {
     SocketHelper.WriteToServer(client, Encapsulation.Serialize(Encapsulation.FromValue(new GenericMessage {
         Message = "Disconnect"
     }, MessageType.Disconnect)));
 }