private void SetXmlGamepath() { try { Console.Write("Enter the xml filename: "); string xmlpath = Directory.GetCurrentDirectory(); xmlpath += "/XML/"; string fileName = Console.ReadLine(); xmlpath += fileName + ".xml"; _fileLoader = new TextAdventureFileLoader(xmlpath); _fileLoader.BuildGameObjects(); _game = new TextAdventureGame(_fileLoader.GetCharacters()); } catch (System.IO.FileNotFoundException e) { Console.WriteLine(e.Message); SetXmlGamepath(); } }
public TextAdventureMenu() { _fileLoader = null; _game = null; _continueMenu = true; }