Ejemplo n.º 1
0
 /// <summary>
 /// Reads the file which is in the MWS format, and returns a ConverterDeck which is populated with all cards and deck name.
 /// </summary>
 /// <param name="fullPathName">The full path name of the Deck file to convert</param>
 /// <param name="deckSectionNames">List of the name of each section for the deck being converted.</param>
 /// <returns>A ConverterDeck object populated with all cards and deck name</returns>
 public override ConverterDeck Convert(string fullPathName, IEnumerable <string> deckSectionNames)
 {
     return(MWS.ConvertMTGDeckWithSideBoardCardsListedEachLine(fullPathName, deckSectionNames));
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Reads the file which has Sideboard cards denoted on each line, and returns a ConverterDeck which is populated with all cards and deck name.
        /// </summary>
        /// <param name="fullPathName">The full path name of the Deck file to convert</param>
        /// <param name="deckSectionNames">List of the name of each section for the deck being converted.</param>
        /// <returns>A ConverterDeck object populated with all cards and deck name</returns>
        public static ConverterDeck ConvertMTGDeckWithSideBoardCardsListedEachLine(string fullPathName, IEnumerable <string> deckSectionNames)
        {
            string contents = System.IO.File.ReadAllText(fullPathName);

            return(MWS.ConvertMTGDeckWithSideBoardCardsListedEachLine(TextConverter.SplitLines(contents), deckSectionNames));
        }
 /// <summary>
 /// Reads the lines which is in the Apprentice format, and returns a ConverterDeck which is populated with all cards and deck name.
 /// </summary>
 /// <param name="fullPathName">The full path name of the Deck file to convert</param>
 /// <param name="deckSectionNames">List of the name of each section for the deck being converted.</param>
 /// <returns>A ConverterDeck object populated with all cards and deck name</returns>
 public override ConverterDeck Convert(string fullPathName, IEnumerable <string> deckSectionNames)
 {
     // Apprentice's format is identical to MWS
     return(MWS.ConvertMTGDeckWithSideBoardCardsListedEachLine(fullPathName, deckSectionNames));
 }