예제 #1
0
        public static void CalculateSeparateAverages()
        {
            for (int i = 0; i < ArenaRecordsByWins.Length; i++)
            {
                List <ArenaRecord> list = ArenaRecordsByWins[i];

                if (list.Count == 0)
                {
                    averageValuesByWins[i] = averageVPWByWins[i] = averageProfitByWins[i] = averageDustByWins[i] = 0;
                    continue;
                }

                float totalValue = 0;
                float totalLosses = 0, totalPacks = 0, totalGold = 0, totalDust = 0;
                foreach (ArenaRecord record in list)
                {
                    totalValue  += record.Value;
                    totalLosses += record.Losses;
                    totalPacks  += record.Packs;
                    totalGold   += record.Gold;
                    totalDust   += record.Dust;
                }

                averageRecords[i] = new ArenaRecord(i, totalLosses / list.Count, totalPacks / list.Count, totalGold / list.Count, totalDust / list.Count);

                averageValuesByWins[i] = totalValue / list.Count;
                averageVPWByWins[i]    = averageValuesByWins[i] / i;
                averageProfitByWins[i] = averageValuesByWins[i] - 150;
                averageDustByWins[i]   = totalDust / list.Count;
            }
        }
예제 #2
0
        public static void CalculateROI()
        {
            for (int i = 0; i < 13; i++)
            {
                ArenaRecord record = averageRecords[i];

                if (record == null)
                {
                    continue;
                }

                returnOnInvestment[i].X = (record.Gold - 150) / 150;
                returnOnInvestment[i].Y = (record.Dust - 150) / 150;
                returnOnInvestment[i].Z = (record.Value - 150) / 150;
            }
        }
예제 #3
0
 public static void RemoveRecord(ArenaRecord record)
 {
     ArenaRecord.ArenaRecords.Remove(record);
 }
예제 #4
0
 public static void AddRecord(ArenaRecord record)
 {
     ArenaRecord.ArenaRecords.Add(record);
 }
예제 #5
0
 public static void RemoveRecord(ArenaRecord record)
 {
     ArenaRecord.ArenaRecords.Remove(record);
 }
예제 #6
0
        public static void CalculateSeparateAverages()
        {
            for (int i = 0; i < ArenaRecordsByWins.Length; i++)
            {
                List<ArenaRecord> list = ArenaRecordsByWins[i];

                if (list.Count == 0)
                {
                    averageValuesByWins[i] = averageVPWByWins[i] = averageProfitByWins[i] = averageDustByWins[i] = 0;
                    continue;
                }

                float totalValue = 0;
                float totalLosses = 0, totalPacks = 0, totalGold = 0, totalDust = 0;
                foreach (ArenaRecord record in list)
                {
                    totalValue += record.Value;
                    totalLosses += record.Losses;
                    totalPacks += record.Packs;
                    totalGold += record.Gold;
                    totalDust += record.Dust;
                }

                averageRecords[i] = new ArenaRecord(i, totalLosses / list.Count, totalPacks / list.Count, totalGold / list.Count, totalDust / list.Count);

                averageValuesByWins[i] = totalValue / list.Count;
                averageVPWByWins[i] = averageValuesByWins[i] / i;
                averageProfitByWins[i] = averageValuesByWins[i] - 150;
                averageDustByWins[i] = totalDust / list.Count;
            }
        }
예제 #7
0
 public static void AddRecord(ArenaRecord record)
 {
     ArenaRecord.ArenaRecords.Add(record);
 }