Beispiel #1
0
        public void PingResponse(string region, Player respondTo, Player p)
        {
            PingResponseComm c   = new PingResponseComm(p.fleetName, respondTo.fleetName);
            string           msg = JsonConvert.SerializeObject(c);

            client.Publish(gametopic + "/" + region, Encoding.ASCII.GetBytes(msg));
        }
Beispiel #2
0
 private void M_PingResponseRecieved(object sender, EventArgs e)
 {
     if (lookingForGame)
     {
         PingResponseComm c = (PingResponseComm)sender;
         if (c.responseTo == me.fleetName)
         {
             //opponent = new Player(c.fleetName);
             StartGame(new Player(c.fleetName));
         }
     }
 }