public void AddToPacket(JoviosUserID jUID, string addition) { if (packetJSON.ContainsKey(jUID.GetIDNumber())) { packetJSON[jUID.GetIDNumber()].Add("{'deviceID':" + parser.GetDeviceID() + ",'packet':{" + addition + "}}"); } else { packetJSON.Add(jUID.GetIDNumber(), new List <string>()); packetJSON[jUID.GetIDNumber()].Add("{'deviceID':" + parser.GetDeviceID() + ",'packet':{" + addition + "}}"); } }
public JoviosPlayer GetPlayer(JoviosUserID jUID) { if (deviceIDToPlayerNumber.ContainsKey(jUID.GetIDNumber())) { if (players.Count > deviceIDToPlayerNumber[jUID.GetIDNumber()]) { return(players[deviceIDToPlayerNumber[jUID.GetIDNumber()]]); } else { return(null); } } else { return(null); } }