Skip to content

Commit e8b7f49

Browse files
authored
Merge pull request #35 from Axelrod-Python/higher-namespace
Raise namespace of strategies
2 parents f7435c6 + 8e60776 commit e8b7f49

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

README.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,19 @@ Installation
1515
pip install axelrod-fortran
1616

1717

18+
Usage
19+
=====
20+
21+
::
22+
23+
>>> import axelrod_fortran as axlf
24+
>>> import axelrod as axl
25+
>>> p1 = axlf.Player('k31r')
26+
>>> p2 = axlf.Player('k33r')
27+
>>> match = axl.Match((p1, p2), turns=5)
28+
>>> match.play()
29+
[(C, C), (C, C), (C, D), (C, D), (C, C)]
30+
1831
Contributing
1932
============
2033

src/axelrod_fortran/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
__version__ = "0.1.0"
22

33
from .player import Player
4+
from .strategies import characteristics, all_strategies

tests/test_player.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from axelrod_fortran.strategies import characteristics, all_strategies
2-
from axelrod_fortran import Player
1+
from axelrod_fortran import Player, characteristics, all_strategies
32
from axelrod import (Alternator, Cooperator, Defector,
43
Match, Game, basic_strategies, seed)
54
from axelrod.action import Action

tests/test_titfortat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from axelrod_fortran.player import Player
1+
from axelrod_fortran import Player
22
import axelrod as axl
33
from axelrod.action import Action
44

0 commit comments

Comments
 (0)