Skip to content

Commit 3b60e9f

Browse files
committed
Create list for players in the original second tournament
1 parent 1f3dfe1 commit 3b60e9f

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

README.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ Running an instance of Axelrod's second tournament:
3636
3737
>>> import axelrod_fortran as axlf
3838
>>> import axelrod as axl
39-
>>> players = [axlf.Player(name) for name in axlf.characteristics.keys()
40-
>>> if axlf.characteristics[name]["original_rank"] is not None]
39+
>>> players = [axlf.Player(name) for name in axlf.second_tournament_strategies]
4140
>>> print(len(players), "players")
4241
62 players
4342
>>> tournament = axl.Tournament(players, repetitions=1, turns=200)

src/axelrod_fortran/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
__version__ = "0.1.0"
22

33
from .player import Player
4-
from .strategies import characteristics, all_strategies
4+
from .strategies import (all_strategies, characteristics,
5+
second_tournament_strategies)

src/axelrod_fortran/strategies.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,3 +349,8 @@
349349
}
350350

351351
all_strategies = characteristics.keys()
352+
353+
# Players from Axelrod's second tournament.
354+
second_tournament_strategies = [
355+
name for name in characteristics.keys()
356+
if characteristics[name]["original_rank"] is not None]

0 commit comments

Comments
 (0)