public void DeleteGame(string code) { Game.Game gm = null; if (Matches.TryGetValue(code, out gm)) { gm.StopGameEngine(); Matches.Remove(code); } Matches.Remove(code); }