private void RemoveExitCommands(Location l) { if (l == null) { return; } foreach (var ex in l.Exits) { _Commands.Remove(ex.Name); } }
public void RemoveTest() { var AT = new AlphaTrie <string>(); AT.Insert("first", "word"); AT.Insert("firsts", "awesome"); AT.Insert("second", "time"); AT.Insert("seconds", "matter"); AT.Insert("secondary", "place"); Assert.IsTrue(AT.Remove("first")); Assert.IsTrue(AT.Remove("seconds")); Assert.IsFalse(AT.Remove("seconds")); AT.Insert("seconds", "matter"); Assert.IsTrue(AT.Remove("seconds")); Assert.IsFalse(AT.Remove("pancakes")); Assert.IsNotNull(AT.FindByKeyExact("firsts")); Assert.IsNotNull(AT.FindByKeyExact("second")); Assert.IsNotNull(AT.FindByKeyExact("secondary")); }