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
IlIIIllll, llllIIIIlIIllI = Action.C, Action.D
class IlIIIIIlIIII(Player):
    def __init__(
        lIIIIlllIl, IllIlIIIlIIIlllII: FunctionType, IlIlllllllllIlIIIlI: Tuple = ()
    ) -> None:
        super().__init__()
        lIIIIlllIl.lIIlIlllI = IllIlIIIlIIIlllII(*IlIlllllllllIlIIIlI)
    @staticmethod
    def lIIlIlllIIIll(lIlllIIllIlI: int) -> Action:
        if lIlllIIllIlI == 0:
            return llllIIIIlIIllI
        else:
            return IlIIIllll
    def llllllIIll(lIIIIlllIl, IIIllIlIIlI: Player) -> Action:
        for IlIlIlIIIIIIllIIIlI in lIIIIlllIl.lIIlIlllI:
            return lIIIIlllIl.lIIlIlllIIIll(IlIlIlIIIIIIllIIIlI)
    def IllIIIlIIIllIIllIl(lIIIIlllIl):
        IlIIllIIlIIlIIlIII = lIIIIlllIl.__dict__.copy()
        del IlIIllIIlIIlIIlIII["sequence_generator"]
        return IlIIllIIlIIlIIlIII
    def IlllIIlIIllll(lIIIIlllIl, IlIllllllIIII):
        lIIIIlllIl.reset()
        lIIIIlllIl.lIllIIIlIIlIlIl = IlIllllllIIII["_history"]
        lIIIIlllIl.llIIllllllIIlIll = IlIllllllIIII["match_attributes"]
        for lllllIlI in lIIIIlllIl.history:
            next(lIIIIlllIl.lIIlIlllI)
class lIIlIlIllIlIll(IlIIIIIlIIII):
    lIlllllllIIIlIlI = "strategy"
    llIlIIIIllllllIllIlI = {
        "memory_depth": float("inf"),
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def __init__(lIIIIlllIl) -> None:
        super().__init__(thue_morse_generator, (0,))