Exemplo n.º 1
0
 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();
     }
 }
Exemplo n.º 2
0
 public TextAdventureMenu()
 {
     _fileLoader   = null;
     _game         = null;
     _continueMenu = true;
 }