mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-12 02:08:27 -04:00
Kotz's editorconfig styles slightly modified. Target typed new usage. Brackets in expressions used for clarity.
This commit is contained in:
@@ -4,7 +4,7 @@ namespace NadekoBot.Modules.Games.Common.Trivia;
|
||||
|
||||
public class TriviaGame
|
||||
{
|
||||
private readonly SemaphoreSlim _guessLock = new SemaphoreSlim(1, 1);
|
||||
private readonly SemaphoreSlim _guessLock = new(1, 1);
|
||||
private readonly IDataCache _cache;
|
||||
private readonly IBotStrings _strings;
|
||||
private readonly DiscordSocketClient _client;
|
||||
@@ -18,9 +18,9 @@ public class TriviaGame
|
||||
private CancellationTokenSource _triviaCancelSource;
|
||||
|
||||
public TriviaQuestion CurrentQuestion { get; private set; }
|
||||
public HashSet<TriviaQuestion> OldQuestions { get; } = new HashSet<TriviaQuestion>();
|
||||
public HashSet<TriviaQuestion> OldQuestions { get; } = new();
|
||||
|
||||
public ConcurrentDictionary<IGuildUser, int> Users { get; } = new ConcurrentDictionary<IGuildUser, int>();
|
||||
public ConcurrentDictionary<IGuildUser, int> Users { get; } = new();
|
||||
|
||||
public bool GameActive { get; private set; }
|
||||
public bool ShouldStopGame { get; private set; }
|
||||
|
@@ -6,11 +6,12 @@ namespace NadekoBot.Modules.Games.Common.Trivia;
|
||||
public class TriviaQuestion
|
||||
{
|
||||
//represents the min size to judge levDistance with
|
||||
private static readonly HashSet<Tuple<int, int>> strictness = new HashSet<Tuple<int, int>> {
|
||||
new Tuple<int, int>(9, 0),
|
||||
new Tuple<int, int>(14, 1),
|
||||
new Tuple<int, int>(19, 2),
|
||||
new Tuple<int, int>(22, 3),
|
||||
private static readonly HashSet<Tuple<int, int>> strictness = new()
|
||||
{
|
||||
new(9, 0),
|
||||
new(14, 1),
|
||||
new(19, 2),
|
||||
new(22, 3),
|
||||
};
|
||||
public const int maxStringLength = 22;
|
||||
|
||||
|
@@ -5,7 +5,7 @@ public class TriviaQuestionPool
|
||||
private readonly IDataCache _cache;
|
||||
private readonly int maxPokemonId;
|
||||
|
||||
private readonly NadekoRandom _rng = new NadekoRandom();
|
||||
private readonly NadekoRandom _rng = new();
|
||||
|
||||
private TriviaQuestion[] Pool => _cache.LocalData.TriviaQuestions;
|
||||
private IReadOnlyDictionary<int, string> Map => _cache.LocalData.PokemonMap;
|
||||
|
Reference in New Issue
Block a user