def strategy(self, opponent):
        """
        If the opponent has played D to my C more often than x% of the time
        that I've done the same to him, retaliate by playing D but stop doing
        so once I've hit the retaliation limit.
        """

        if len(self.history):
            last_round = (self.history[-1], opponent.history[-1])
            self.play_counts[last_round] += 1
        CD_count = self.play_counts[(C, D)]
        DC_count = self.play_counts[(D, C)]
        if DC_count * self.retaliation_threshold > CD_count:
            self.retaliating = True
        else:
            self.retaliating = False
            self.retaliation_count = 0

        if self.retaliating:
            if self.retaliation_count < self.retaliation_limit:
                self.retaliation_count += 1
                return D
            else:
                self.retaliation_count = 0
                self.retaliating = False

        return C
dataset/ETHPy150Open Axelrod-Python/Axelrod/axelrod/strategies/retaliate.py/LimitedRetaliate.strategy/swapped operands of `>`