public NonPlayerCharacterCollection RemoveCharacter(Location location) { NonPlayerCharacterCollection newList = new NonPlayerCharacterCollection(); foreach (NonPlayerCharacter npc in location.CharacterList.Values) if (npc.LifePoints>1) { newList.Add(npc.Name, npc); } return newList; }
public Location() { this.exitCollection = new ExitCollection(); this.items = new Inventory(); this.characterList = new NonPlayerCharacterCollection(); }