Console client: Retrieve player names.

This commit is contained in:
lotodore
2008-12-21 14:23:40 +00:00
parent cc2e0251d3
commit 73778494b7
14 changed files with 493 additions and 89 deletions
+8 -5
View File
@@ -28,14 +28,17 @@ namespace pokerth_console
{
public GameInfoList()
{
m_list = new List<GameInfo>();
m_list = new Dictionary<uint, GameInfo>();
}
public void AddGameInfo(GameInfo info)
{
lock (m_list)
{
m_list.Add(info);
if (m_list.ContainsKey(info.Id))
m_list[info.Id] = info;
else
m_list.Add(info.Id, info);
}
}
@@ -44,15 +47,15 @@ namespace pokerth_console
string outString = "";
lock (m_list)
{
foreach (GameInfo i in m_list)
foreach (KeyValuePair<uint, GameInfo> i in m_list)
{
outString += i.ToString();
outString += i.Value.Name;
outString += '\n';
}
}
return outString;
}
private List<GameInfo> m_list;
private Dictionary<uint, GameInfo> m_list;
}
}