from axelrod.action import Action, actions_to_str
from axelrod.player import Player
from axelrod.strategy_transformers import (
    FinalTransformer,
    TrackHistoryTransformer,
)
IllIlllllIIIl, lIllIllIlIl = Action.C, Action.D
class IIIlIIlllIIl(Player):
    lllllIlIll = "strategy"
    IlIIlllIlIlII = {
        "memory_depth": float("inf"),
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def __init__(llllllIll) -> None:
        super().__init__()
        llllllIll.lllIIIllll = False
    def IlIIlIlIIl(llllllIll, IIllIIIlIllII: Player) -> Action:
        if not llllllIll.history:
            return IllIlllllIIIl
        if IIllIIIlIllII.history[-2:] == [lIllIllIlIl, lIllIllIlIl]:
            llllllIll.lllIIIllll = True
        if llllllIll.lllIIIllll:
            return lIllIllIlIl
        else:
            if IIllIIIlIllII.history[-1] == lIllIllIlIl:
                return lIllIllIlIl
            return IllIlllllIIIl