Beispiel #1
0
 private static void UnitList( UnitMatrix m, XmlWriter writer )
 {
     writer.WriteStartElement( "unit-list" );
     foreach ( TeamUnit u in Utility.UnitList )
     {
         WriteElement( writer, "unitcode", u.UnitCode );
         var exp = m.GetUnit( u.UnitCode );
         WriteElement( writer, "ep", string.Format( "{0:#0.0}", exp[ Constants.K_WEEKS_IN_A_SEASON, 0 ] ) );
     }
     writer.WriteEndElement();
 }
Beispiel #2
0
 private static decimal TallyExperience(UnitMatrix m )
 {
     var tot = 0.0M;
     if (Utility.UnitList == null) Utility.LoadUnits();
     foreach (TeamUnit u in Utility.UnitList)
     {
         var exp = m.GetUnit(u.UnitCode);
         tot += exp[RosterLib.Constants.K_WEEKS_IN_A_SEASON, 0];
     }
     return tot;
 }