diff --git a/Common/BulletHelpers.cs b/Common/BulletHelpers.cs index 2cdf18f..3706de7 100644 --- a/Common/BulletHelpers.cs +++ b/Common/BulletHelpers.cs @@ -1,10 +1,10 @@ using System.Linq; -namespace Common +namespace Common; + +public static class BulletHelpers { - public static class BulletHelpers - { - private static readonly string[] blackList = { + private static readonly string[] blackList = { "56dff3afd2720bba668b4567", // 5.45x39 ps "5c0d56a986f774449d5de529", // 9x19mm rip "58864a4f2459770fcc257101", // 9x19mm pso @@ -30,9 +30,8 @@ namespace Common "5e023e88277cce2b522ff2b1" // 7.62x51 ultra nosler }; - public static bool BulletIsOnBlackList(string bullet) - { - return blackList.Any(x => x.Contains(bullet)); - } + public static bool BulletIsOnBlackList(string bullet) + { + return blackList.Any(x => x.Contains(bullet)); } -} +} \ No newline at end of file diff --git a/Common/DiskHelpers.cs b/Common/DiskHelpers.cs index a261a9d..0f571f9 100644 --- a/Common/DiskHelpers.cs +++ b/Common/DiskHelpers.cs @@ -1,16 +1,14 @@ using System.IO; -namespace Common +namespace Common; +public static class DiskHelpers { - public static class DiskHelpers + public static void CreateDirIfDoesntExist(string path) { - public static void CreateDirIfDoesntExist(string path) + if (!Directory.Exists($"{path}")) { - if (!Directory.Exists($"{path}")) - { - //create dump dir - Directory.CreateDirectory($"{path}"); - } + //create dump dir + Directory.CreateDirectory($"{path}"); } } } diff --git a/Common/Extensions/EnumExtensions.cs b/Common/Extensions/EnumExtensions.cs index 1422df2..74400fb 100644 --- a/Common/Extensions/EnumExtensions.cs +++ b/Common/Extensions/EnumExtensions.cs @@ -1,11 +1,10 @@ using Common.Models; using System.Collections.Generic; -namespace Common.Extensions +namespace Common.Extensions; +public static class EnumExtensions { - public static class EnumExtensions - { - private static readonly List bossTypes = new List(){ + private static readonly List bossTypes = new List(){ BotType.bossbully, BotType.bossgluhar, BotType.bosskilla, @@ -14,9 +13,8 @@ namespace Common.Extensions BotType.bosstagilla }; - public static bool IsBoss(this BotType self) - { - return bossTypes.Contains(self); - } + public static bool IsBoss(this BotType self) + { + return bossTypes.Contains(self); } } diff --git a/Common/LoggingHelpers.cs b/Common/LoggingHelpers.cs index 798477e..33de2c6 100644 --- a/Common/LoggingHelpers.cs +++ b/Common/LoggingHelpers.cs @@ -1,28 +1,25 @@ -using System; +namespace Common; -namespace Common +public static class LoggingHelpers { - public static class LoggingHelpers + public static string LogTimeTaken(double totalSeconds) { - public static string LogTimeTaken(double totalSeconds) - { - return Math.Round(totalSeconds, 2, MidpointRounding.ToEven).ToString(); - } + return Math.Round(totalSeconds, 2, MidpointRounding.ToEven).ToString(); + } - public static void LogToConsole(string message, ConsoleColor backgroundColour = ConsoleColor.Green) - { - Console.BackgroundColor = backgroundColour; - Console.ForegroundColor = ConsoleColor.Black; + public static void LogToConsole(string message, ConsoleColor backgroundColour = ConsoleColor.Green) + { + Console.BackgroundColor = backgroundColour; + Console.ForegroundColor = ConsoleColor.Black; - Console.Write(message); - ResetConsoleColours(); - Console.WriteLine(); - } + Console.Write(message); + ResetConsoleColours(); + Console.WriteLine(); + } - private static void ResetConsoleColours() - { - Console.BackgroundColor = ConsoleColor.Black; - Console.ForegroundColor = ConsoleColor.White; - } + private static void ResetConsoleColours() + { + Console.BackgroundColor = ConsoleColor.Black; + Console.ForegroundColor = ConsoleColor.White; } }