/// <summary> /// Finds names of remote players that play in sessions. /// </summary> /// <returns></returns> public HashSet <string> FindRemotePlayers() { HashSet <string> remotePlayerNames = new HashSet <string>(); foreach (SessionCfg sc in Sessions) { foreach (PlayerSessionCfg psc in sc.Players) { LocalPlayerCfg localPlayer = LocalPlayers.FirstOrDefault( delegate(LocalPlayerCfg lpc) { return(lpc.Name == psc.Name); }); if (localPlayer != null) { continue; // This is a local player. } if (!remotePlayerNames.Contains(psc.Name)) { remotePlayerNames.Add(psc.Name); } } } return(remotePlayerNames); }
public SessionSuiteCfg() { LocalPlayers = new LocalPlayerCfg[0]; }