Skip to content

Commit

Permalink
Merge pull request #836 from janga1997/typeHint-alternator
Browse files Browse the repository at this point in the history
Add type hints to alternator
  • Loading branch information
drvinceknight authored Feb 1, 2017
2 parents 747c0c0 + 735f0e3 commit 2526253
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion axelrod/strategies/alternator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from axelrod import Actions, Player
from axelrod.actions import Action

C, D = Actions.C, Actions.D

Expand All @@ -17,7 +18,7 @@ class Alternator(Player):
'manipulates_state': False
}

def strategy(self, opponent):
def strategy(self, opponent: Player) -> Action:
if len(self.history) == 0:
return C
if self.history[-1] == C:
Expand Down

0 comments on commit 2526253

Please sign in to comment.