from types import FunctionType
from typing import Tuple
from axelrod._strategy_utils import thue_morse_generator
from axelrod.action import Action
from axelrod.player import Player
IllIIIIlIIl, IIIIIIIllI = Action.C, Action.D
class IllllIlIllIlIIIIl(Player):
    def __init__(
        lllIIlIlIIII, IlIlIlIlllIIll: FunctionType, IllIlIlllI: Tuple = ()
    ) -> None:
        super().__init__()
        lllIIlIlIIII.IIIIIIllIlIllllIIl = IlIlIlIlllIIll(*IllIlIlllI)
    @staticmethod
    def IllIIIII(lIIllIIl: int) -> Action:
        if lIIllIIl == 0:
            return IIIIIIIllI
        else:
            return IllIIIIlIIl
    def IIllllIIl(lllIIlIlIIII, llllllIIlIIIIlllII: Player) -> Action:
        for IlIlIIIlIIlIII in lllIIlIlIIII.IIIIIIllIlIllllIIl:
            return lllIIlIlIIII.IllIIIII(IlIlIIIlIIlIII)
    def IIIIlllIIlllIl(lllIIlIlIIII):
        lIlIlIIIII = lllIIlIlIIII.__dict__.copy()
        del lIlIlIIIII["sequence_generator"]
        return lIlIlIIIII
    def lllIIlllIIllIII(lllIIlIlIIII, IIIIlIIIIlIll):
        lllIIlIlIIII.reset()
        lllIIlIlIIII.lIIIIlIII = IIIIlIIIIlIll["_history"]
        lllIIlIlIIII.lIIIIllIlllIIIIllI = IIIIlIIIIlIll["match_attributes"]
        for IIIlIIllIlIIIlIII in lllIIlIlIIII.history:
            next(lllIIlIlIIII.IIIIIIllIlIllllIIl)
class lllIIIllllIIIIll(IllllIlIllIlIIIIl):
    lIlIIIIlllIlIIIll = "strategy"
    lIlIIlIlIlll = {
        "memory_depth": float("inf"),
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def __init__(lllIIlIlIIII) -> None:
        super().__init__(thue_morse_generator, (0,))
class lllIIIIIIllIll(lllIIIllllIIIIll):
    lIlIIIIlllIlIIIll = "strategy"
    lIlIIlIlIlll = {
        "memory_depth": float("inf"),
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def __init__(lllIIlIlIIII) -> None:
        super(lllIIIllllIIIIll, lllIIlIlIIII).__init__(thue_morse_generator, (0,))
    @staticmethod
    def IllIIIII(lIIllIIl: int) -> Action:
        if lIIllIIl == 0:
            return IllIIIIlIIl
        else:
            return IIIIIIIllI