Example #1
0
 //-----------------------------------
 /// <summary>
 /// Parse the string value to Troops in the following order:
 /// <see cref="Saber"/>, <see cref="Archer"/>, <see cref="Lancer"/>, <see cref="Assassin"/>
 /// </summary>
 /// <param name="theString"></param>
 /// <returns></returns>
 public static Troop[] ParseToTroops(StrongString theString)
 {
     Troop[]        troops    = new Troop[4]; //There is 4 types of Troop.
     StrongString[] myStrings = theString.Split(OutCharSeparator);
     troops[0] = Saber.ParseToSaber(myStrings[0]);
     troops[1] = Archer.ParseToArcher(myStrings[1]);
     troops[2] = Lancer.ParseToLancer(myStrings[2]);
     troops[3] = Assassin.ParseToAssassin(myStrings[3]);
     return(troops);
 }