Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion axelrod/strategies/better_and_better.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from axelrod import Actions, Player, random_choice
from axelrod.actions import Action

C, D = Actions.C, Actions.D

Expand All @@ -24,7 +25,7 @@ class BetterAndBetter(Player):
'manipulates_state': False
}

def strategy(self, opponent):
def strategy(self, opponent: Player) -> Action:
current_round = len(self.history) + 1
probability = current_round / 1000
return random_choice(probability)
1 change: 1 addition & 0 deletions type_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ mypy --ignore-missing-imports --follow-imports skip axelrod/strategies/adaptive.
mypy --ignore-missing-imports --follow-imports skip axelrod/strategies/alternator.py
mypy --ignore-missing-imports --follow-imports skip axelrod/strategies/appeaser.py
mypy --ignore-missing-imports --follow-imports skip axelrod/strategies/averagecopier.py
mypy --ignore-missing-imports --follow-imports skip axelrod/strategies/better_and_better.py