public void UpdateClients(Proposal p, string cancelledPlayer) { foreach (string name in p.PlayerNames) { List<Proposal> proposals = GetProposalsForPlayer(name); Clients["LOBBY_"+name].updateProposals(proposals); } if (cancelledPlayer != null) { List<Proposal> proposals = GetProposalsForPlayer(cancelledPlayer); Clients["LOBBY_"+cancelledPlayer].updateProposals(proposals); } }
public void NewProposal(string hostPlayer, List<string> opponents, int versionId, string gameName) { Proposal p = new Proposal(hostPlayer, opponents, gameName, versionId); activeProposals.Add(p); UpdateClients(p,null); return; }