@@ -0,0 +1,1545 @@
+from axelrod import Player%0A%0Aclass Grumpy(Player):%0A    %22%22%22%0A    A player that defects after a ceratin level of grumpiness. Grumpiness increases when the opponent defects and decreases when the opponent co-operates.%0A    %22%22%22%0A%0A    def __init__(self, starting_state = 'Nice', grumpy_threshold = 10, nice_threshold = -10):%0A        %22%22%22%0A        Player starts of nice be default with set thresholds%0A        %22%22%22%0A%0A        self.history = %5B%5D%0A        self.score = 0%0A        self.state = starting_state%0A        self.grumpy_threshold = grumpy_threshold%0A        self.nice_threshold = nice_threshold%0A%0A    def strategy(self, opponent):%0A        %22%22%22%0A        A player that gets grumpier the more the opposition defects, and nicer the more they cooperate.%0A        Starts off Nice, but becomes grumpy once the grumpiness threshold is hit.%0A        Won't become nice once that grumpy threshold is hit, but must reach a much lower threshold before it becomes nice again.%0A        %22%22%22%0A%0A        self.grumpiness = sum(play=='D' for play in opponent.history) - sum(play=='C' for play in opponent.history) %0A%0A        if self.state == 'Nice':%0A            if self.grumpiness %3E self.grumpy_threshold:%0A                self.state = 'Grumpy'%0A                return 'D'%0A            return 'C'%0A%0A        if self.state == 'Grumpy':%0A            if self.grumpiness %3C self.nice_threshold:%0A                self.state = 'Nice'%0A                return 'C'%0A            return 'D'%0A%0A    def __repr__(self):%0A        %22%22%22%0A        The string method for the strategy:%0A        %22%22%22%0A%0A        return 'Grumpy'%0A

Adding grumpy.py