 //
 
 import Foundation
+import CleanroomLogger
 
 class WindowManager {
     static let `default` = WindowManager()


        // player tracker
        if settings.showPlayerTracker {
            DispatchQueue.main.async { [weak self] in
                self?.playerTracker.update(cards: game.player.playerCardList, reset: reset)
                self?.playerTracker.setWindowSizes()
            }

            if settings.autoPositionTrackers && Hearthstone.instance.isHearthstoneRunning {
                rect = SizeHelper.playerTrackerFrame()


    // MARK: - Updating trackers
    func updateTrackers(reset: Bool = false) {
        lastCardsUpdateRequest = NSDate().timeIntervalSince1970
        let when = DispatchTime.now() + DispatchTimeInterval.milliseconds(100)
        DispatchQueue.main.asyncAfter(deadline: when) { [weak self] in
            guard let strongSelf = self else { return }
            guard Date().timeIntervalSince1970 - strongSelf.lastCardsUpdateRequest > 0.1 else {
                return
            }

            SizeHelper.hearthstoneWindow.reload()

            strongSelf.redrawTrackers(reset: reset)
        }
    }

    private func redrawTrackers(reset: Bool = false) {
        let settings = Settings.instance
        let game = Game.instance

