public WallContainer(Inventory parentInventory) : base(parentInventory: parentInventory) { Noun = new GNoun("mur", Genre.masuclin); sayOnTryToGo = "Oui de fait, je pense que vous allez dans le mur..."; HasAboveContainer = true; aboveInventory = new OnInventory(this); }
public bool IsExisting(GNoun nounToFind) { foreach (var noun in nouns) { if (noun.Singular == nounToFind.Singular) { return(true); } } return(false); }
public Oobject(Inventory parentInventory) { ParentInventory = parentInventory; HasAboveContainer = false; HasInsideContainer = false; HasUnderContainer = false; Id = IdCounter++; Noun = new GNoun("", Genre.masuclin); //Synonyms = new string[] { Name }; }
public CeilingContainer(Inventory parentInventory) : base(parentInventory: parentInventory) { Noun = new GNoun("plafond", Genre.masuclin); GenreSynonyms = new Genre[] { Genre.masuclin }; sayOnTryToGo = "Mais bien sûr..."; HasUnderContainer = true; underInventory = new UnderInventory(this); }
public FloorContainer(Inventory parentInventory) : base(parentInventory: parentInventory) { //Synonyms = new string[] {"sol" }; Noun = new GNoun("sol", Genre.masuclin); sayOnTryToGo = "Vous compter creuser??"; HasAboveContainer = true; aboveInventory = new OnInventory(this); }
public VoidContainer(Inventory parentInventory, Location location) : base(parentInventory: parentInventory) { Location = location; //Synonyms = new string[] { "void" }; Noun = new GNoun("Void", Genre.masuclin); HasAboveContainer = false; HasInsideContainer = true; HasUnderContainer = false; insideInventory = new InsideInventory(this); }
public PlayerContainer(Inventory parentInventory, Player _player) : base(parentInventory: parentInventory) { Player = Player; //Synonyms = new string[] { "joueur" }; GenreSynonyms = new Genre[] { Genre.masuclin }; Noun = new GNoun("Moi", Genre.masuclin); Adjective = null; HasAboveContainer = false; HasInsideContainer = true; HasUnderContainer = false; insideInventory = new InsideInventory(this); }
public void EditNoun(GNoun newNoun) { int nounIdToEdit = newNoun.ID; GNoun nounToRemove = null; foreach (var noun in nouns) { if (nounIdToEdit == noun.ID) { nounToRemove = noun; } } if (nounToRemove == null) { throw new NotImplementedException(); } else { nouns.Remove(nounToRemove); nouns.Add(newNoun); newNoun.ID = nounIdToEdit; } }
public WordDictionary LoadDictionary(string CompletePath) { WordDictionary wordDictionary = new WordDictionary(); XDocument doc; doc = XDocument.Load(CompletePath); foreach (XElement element in doc.Root.Element("World").Element("Nouns").Descendants("Noun")) { string genre = element.Attribute("Genre").Value; Genre genreBool = genre == "masculine" ? Genre.masuclin : Genre.feminin; GNoun noun = new GNoun(element.Attribute("Singular").Value, genreBool, Int32.Parse(element.Attribute("Id").Value), true);//to change, isSingular is always true!!! noun.Elision = bool.Parse(element.Attribute("Elision").Value); noun.Plural = element.Attribute("Plural").Value; wordDictionary.Add(noun); } return(wordDictionary); }
public void Add(GNoun noun) { nounsIdCounter++; noun.ID = nounsIdCounter; nouns.Add(noun); }