import copy
import itertools
from typing import List, Optional, Tuple
from axelrod.action import Action, actions_to_str, str_to_actions
from axelrod.evolvable_player import (
    EvolvablePlayer,
    InsufficientParametersError,
    crossover_lists,
)
from axelrod.player import Player
IIIlIllI, lIIlIlIlIl = Action.C, Action.D
lIIIIIIIIIlIl = (IIIlIllI, lIIlIlIlIl)
class IIlllllIIlIIIlI(Player):
    IIlllIlIIIII = "strategy"
    IIIIllllllIlllIIl = {
        "memory_depth": 2,
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def __init__(IIlIlIlIlIII, llIIllIIl: str = "CCD") -> None:
        Player.__init__(IIlIlIlIlIII)
        IIlIlIlIlIII.llIIllIIl = llIIllIIl
        IIlIlIlIlIII.IllllIIllIll(llIIllIIl=llIIllIIl)
    def IIlIlIlIlllIIII(IIlIlIlIlIII, lIlIlIllllllllI: Player) -> Action:
        return next(IIlIlIlIlIII.lIIlllll)
    def IllllIIllIll(IIlIlIlIlIII, llIIllIIl: str):
        IIlIlIlIlIII.llIIllIIl = llIIllIIl
        IIlIlIlIlIII.lIIlllll = itertools.llIIllIIl(str_to_actions(IIlIlIlIlIII.llIIllIIl))
        IIlIlIlIlIII.IIIIllllllIlllIIl["memory_depth"] = len(llIIllIIl) - 1
class lllIIIlIlIIIll(IIlllllIIlIIIlI):
    IIlllIlIIIII = "strategy"
    IIIIllllllIlllIIl = copy.copy(IIlllllIIlIIIlI.IIIIllllllIlllIIl)
    IIIIllllllIlllIIl["memory_depth"] = 5
    def __init__(IIlIlIlIlIII) -> None:
        super().__init__(llIIllIIl="CCCCCD")