# pvpController

# views
from views.PVP.chooseCharacterUI import ChooseCharacterUI
from views.PVP.arenaUI import ArenaUI

# models
from models.heroes.hero import Hero
from models.heroes.archery import Archery
from models.heroes.warrior import Warrior
from models.heroes.wizard import Wizard

# pour éviter les pb d'import circulaire
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from controllers.mainController import MainController


class PvpController:
    def __init__(self, mController: "MainController") -> None:
        self.mController = mController
        self.db = self.mController.db

        self.hero: Hero | Archery | Warrior | Wizard = ChooseCharacterUI(
            self, False
        ).hero

        print("---------------")
        print("Création du personnage")
        self.opponent: Hero | Archery | Warrior | Wizard = ChooseCharacterUI(
            self, True
        ).hero

        print("---------------")

        ArenaUI(self)
