Skip to content

Commit b69c969

Browse files
committed
Copilot refactor to comply with the Contributing.md guidelines
1 parent f1eda10 commit b69c969

2 files changed

Lines changed: 666 additions & 711 deletions

File tree

ClientCore/Statistics/GameParsers/RAStatsDumpParser.cs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
using System.IO;
2-
using System;
1+
using System;
2+
using System.IO;
3+
34
using Rampastring.Tools;
45

56
namespace ClientCore.Statistics.GameParsers
@@ -45,12 +46,7 @@ protected override void ParseStatistics(string gamePath)
4546

4647
ps.Name = name;
4748

48-
/* ================= ECONOMY ================= */
49-
5049
ps.Score = Math.Max(0, dump.PlayerMoneyHarvested[i]);
51-
//ps.Economy = 0; // RA score is meaningless
52-
53-
/* ================= BUILT ================= */
5450

5551
int built =
5652
SumStructFields(dump.PlayerVehiclesBought[i]) +
@@ -61,30 +57,22 @@ protected override void ParseStatistics(string gamePath)
6157

6258
ps.Economy = built;
6359

64-
/* ================= LEFT ================= */
65-
6660
int left =
6761
SumStructFields(dump.PlayerVehiclesLeft[i]) +
6862
SumStructFields(dump.PlayerInfantryLeft[i]) +
6963
SumStructFields(dump.PlayerPlanesLeft[i]) +
7064
SumStructFields(dump.PlayerVesselsLeft[i]) +
7165
SumStructFields(dump.PlayerBuildingsLeft[i]);
7266

73-
/* ================= LOSSES ================= */
74-
7567
ps.Losses = Math.Max(0, built - left);
7668

77-
/* ================= KILLS ================= */
78-
7969
ps.Kills =
8070
SumStructFields(dump.PlayerVehiclesKilled[i]) +
8171
SumStructFields(dump.PlayerInfantryKilled[i]) +
8272
SumStructFields(dump.PlayerPlanesKilled[i]) +
8373
SumStructFields(dump.PlayerVesselsKilled[i]) +
8474
SumStructFields(dump.PlayerBuildingsKilled[i]);
8575

86-
/* ================= WIN STATE ================= */
87-
8876
ps.Won =
8977
dump.PlayerDeadStates[i] == 0 &&
9078
dump.PlayersResigned[i] != 1;

0 commit comments

Comments
 (0)