Example #1
0
        internal static BenchmarkAmmoBay Create(IEnumerable <IAmmoBay> enumerable)
        {
            var benchmark = new BenchmarkAmmoBay();

            BenchmarkDamageableComponent.Initialize(benchmark, enumerable);
            return(benchmark);
        }
Example #2
0
        internal static BenchmarkHull Create(string key, TankObjectKey ownerKey, IEnumerable <IHull> hulls)
        {
            var benchmark = new BenchmarkHull();

            benchmark.Key      = key;
            benchmark.OwnerKey = ownerKey;

            BenchmarkDamageableModule.Initialize(benchmark, hulls);
            benchmark.AmmoBay      = BenchmarkAmmoBay.Create(hulls.Select(h => h.AmmoBay));
            benchmark.FrontalArmor = hulls.Average(h => h.FrontalArmor);
            benchmark.RearArmor    = hulls.Average(h => h.RearArmor);
            benchmark.SideArmor    = hulls.Average(h => h.SideArmor);

            return(benchmark);
        }