public FormBambulanci() { InitializeComponent(); clientConnecter = new ClientConnecter(this); hostConnecter = new HostConnecter(this); ChangeGameState(GameState.Intro); }
/// <summary> /// Starts host's client and adds him to host's clientList. /// </summary> private void AddHostsClient(HostConnecter waiterHost) { //start host's client int sendPort = waiterHost.ListenPort; clientConnecter.HostStartIngameClient(sendPort); //add host's client waiterHost.ConnectedClients.Add(new ClientInfo(null, new IPEndPoint(IPAddress.Loopback, Client.listenPort), 0, null)); }