feat: Search player component implemented. Plus Winrate color schale implementation

This commit is contained in:
Mikhail Shabanov committed 2021-05-18 23:23:39 +02:00
1 parent edfc9aa139
commit 4fb56c3b16
10 files changed
+160 -4

No files matched your search

@@ -0,0 +1,21 @@
namespace WotBlitzStatisticsPro.Blazor.Helpers
{
public static class ScaleHelper
{
public static string ScaleColor(this int winRate)
{
return winRate switch
{
( > 0 ) and ( < 45) => Constants.ScaleVeryBadColor,
( >= 45 ) and ( < 47 ) => Constants.ScaleBadColor,
( >= 47 ) and ( < 49 ) => Constants.ScaleBelowAverageColor,
( >= 49 ) and ( < 52 ) => Constants.ScaleAverageColor,
( >= 52 ) and ( < 54 ) => Constants.ScaleGoodColor,
( >= 54 ) and ( < 56 ) => Constants.ScaleVeryGoodColor,
( >= 56 ) and ( < 60 ) => Constants.ScaleGreatColor,
( >= 60 ) and ( < 65 ) => Constants.ScaleUnicumColor,
_ => Constants.ScaleSuperUnicumColor
};
}
}
}