private void WhizbangDeckIdChange(int id, int value, IGame game)
 {
     if (value == 0)
     {
         return;
     }
     if (!game.Entities.TryGetValue(id, out var entity))
     {
         return;
     }
     if (!entity.IsPlayer)
     {
         return;
     }
     DeckManager.AutoSelectDeckById(game, value);
 }
        public void Handle(LogLine logLine, IGame game)
        {
            var match = LogConstants.BeginBlurRegex.Match(logLine.Line);

            if (match.Success && game.IsInMenu && new[] { TAVERN_BRAWL, TOURNAMENT, DRAFT, FRIENDLY, ADVENTURE, BACON }.Contains(game.CurrentMode))
            {
                game.MetaData.EnqueueTime = logLine.Time;
                Log.Info($"Now in queue ({logLine.Time})");
                if ((DateTime.Now - logLine.Time).TotalSeconds > 5 || !game.IsInMenu || logLine.Time <= _lastQueueTime)
                {
                    return;
                }
                _lastQueueTime = logLine.Time;
                if (game.CurrentMode == DRAFT)
                {
                    game.CurrentSelectedDeck = DeckImporter.ArenaInfoCache?.Deck;
                }
                else
                {
                    var selectedId = GetSelectedDeckId(game.CurrentMode);
                    game.CurrentSelectedDeck = selectedId > 0 ? Reflection.GetDecks()?.FirstOrDefault(deck => deck.Id == selectedId) : null;
                }
                if (!Config.Instance.AutoDeckDetection)
                {
                    return;
                }
                if (new[] { TOURNAMENT, FRIENDLY, ADVENTURE, TAVERN_BRAWL }.Contains(game.CurrentMode))
                {
                    DeckManager.AutoSelectDeckById(game, GetSelectedDeckId(game.CurrentMode));
                }
                else if (game.CurrentMode == DRAFT)
                {
                    AutoSelectArenaDeck();
                }
                else if (game.CurrentMode == BACON)
                {
                    Core.MainWindow.SelectDeck(null, true);
                }
            }
        }
 private void WhizbangDeckIdChange(int id, int value, IGame game)
 {
     if (value == 0)
     {
         return;
     }
     if (!game.Entities.TryGetValue(id, out var entity))
     {
         return;
     }
     if (entity.IsControlledBy(game.Player.Id))
     {
         game.Player.IsPlayingWhizbang = true;
     }
     else if (entity.IsControlledBy(game.Opponent.Id))
     {
         game.Opponent.IsPlayingWhizbang = true;
     }
     if (!entity.IsPlayer)
     {
         return;
     }
     DeckManager.AutoSelectDeckById(game, value);
 }