Skip to content

Commit 849248a

Browse files
Merge pull request #17 from Axelrod-Python/issue-15
Refactor strategies dict
2 parents 6ac8e8c + e9674f6 commit 849248a

File tree

3 files changed

+354
-73
lines changed

3 files changed

+354
-73
lines changed

src/axelrod_fortran/player.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from axelrod.action import Action
66
from axelrod import Game
77
from ctypes import cdll, c_int, c_float, byref, POINTER
8+
from .strategies import characteristics
89

910
C, D = Action.C, Action.D
1011
strategies = cdll.LoadLibrary('libstrategies.so')
@@ -30,6 +31,9 @@ def __init__(self, original_name, game=Game()):
3031
self.original_name = original_name
3132
self.original_function = self.original_name
3233
self.game = game
34+
is_stochastic = characteristics[self.original_name]['stochastic']
35+
if is_stochastic is not None:
36+
self.classifier['stochastic'] = is_stochastic
3337

3438
def __enter__(self):
3539
return self

0 commit comments

Comments
 (0)