I'm an idiot, they store encoded data for towers, we dont need a separate object unless we want to

This commit is contained in:
2021-11-06 22:18:12 -04:00
parent 7ef9c0d498
commit f23d108fe7
9 changed files with 135 additions and 50 deletions

View File

@@ -6,4 +6,28 @@ namespace TOOHUCardAPI.Data.Enums
Team = 'D',
All = 'T'
}
public static class RankTypeExtensions
{
public static RankType ParseRankType(string rankType)
{
if (rankType == null || rankType.Length > 1)
{
return RankType.All;
}
char identifier = rankType.ToCharArray()[0];
if (identifier == (char) RankType.Single)
{
return RankType.Single;
}
if (identifier == (char) RankType.Team)
{
return RankType.Team;
}
return RankType.All;
}
}
}