public static List<CombatRank> CalculateCombatRanks(CombatParticipationRecord record, out string missingRequirements)
 {
     var rank = new KnightChampion();
     var results = rank.GetHighestQualifiedRank(record,out missingRequirements);
     return results
         .OfType<CombatRank>()
         .ToList();
 }
 public CombatRank(int sergEP, int SergTW, int KniEP, int KniTW, int KniArmEP, int KniArmTW, int War, int Demo )
 {
     minimumRecordForRank = new CombatParticipationRecord()
     {
         DemonstrationParticipations = Demo,
         KnightsListParticipations = KniEP,
         KnightsListWins = KniTW,
         SergeantsListParticipations = sergEP,
         SergeantsListWins = SergTW,
         KnightsListArmoredParticipations = KniArmEP,
         KnightsListArmoredWins = KniArmTW,
         WarParticipations = War
     };
 }
 public static List<CombatRank> CalculateRanks(int sergEP, int SergTW, int KniEP, int KniTW, int KniArmEP, int KniArmTW, int War, int Demo)
 {
     CombatParticipationRecord record = new CombatParticipationRecord()
     {
         DemonstrationParticipations = Demo,
         KnightsListParticipations = KniEP,
         KnightsListWins = KniTW,
         SergeantsListParticipations = sergEP,
         SergeantsListWins = SergTW,
         KnightsListArmoredParticipations = KniArmEP,
         KnightsListArmoredWins = KniArmTW,
         WarParticipations = War
     };
     string outs = "";
     return CalculateCombatRanks(record, out outs);
 }
        public static CombatParticipationRecord GetCombatRecord(int id)
        {
            var webContent = GetWebContentForId(id);
            var stringContents = webContent.Split(new string[] {Environment.NewLine, "\n"},StringSplitOptions.RemoveEmptyEntries);
            string relevantString = stringContents.First(str => str.Contains("<tr ALIGN=CENTER BGCOLOR=\"#F69679\">"));
            var values = relevantString.Split(new string[] { "<td>", "</td>" }, StringSplitOptions.RemoveEmptyEntries);
            int sillyInt = 0;
            var valArray = values
                            .Where(val => int.TryParse(val, out sillyInt))
                            .Select(val => int.Parse(val))
                            .ToArray();

            CombatParticipationRecord record = new CombatParticipationRecord()
            {
                SergeantsListParticipations = valArray[0],
                SergeantsListWins = valArray[1],
                KnightsListParticipations = valArray[2],
                KnightsListWins = valArray[3],
                KnightsListArmoredParticipations = valArray[4],
                KnightsListArmoredWins = valArray[5],
                WarParticipations = valArray[6],
                DemonstrationParticipations = valArray[7]
            };
            return record;
        }