Skip to content

Commit 43ab759

Browse files
committed
Change paramter names from character to symbol
1 parent 5b7beeb commit 43ab759

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

axelrod/match.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# -*- coding: utf-8 -*-
22

33

4-
def sparkline(actions, c_character=u'█', d_character=u' '):
4+
def sparkline(actions, c_symbol=u'█', d_symbol=u' '):
55
return u''.join([
6-
c_character if play == 'C' else d_character for play in actions])
6+
c_symbol if play == 'C' else d_symbol for play in actions])
77

88

99
class Match(object):
@@ -94,8 +94,8 @@ def play(self):
9494
self.result = result
9595
return result
9696

97-
def sparklines(self, c_character=u'█', d_character=u' '):
97+
def sparklines(self, c_symbol=u'█', d_symbol=u' '):
9898
return (
99-
sparkline(self._player1.history, c_character, d_character) +
99+
sparkline(self._player1.history, c_symbol, d_symbol) +
100100
u'\n' +
101-
sparkline(self._player2.history, c_character, d_character))
101+
sparkline(self._player2.history, c_symbol, d_symbol))

docs/tutorials/further_topics/creating_matches.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,6 @@ but you can use any characters you like::
6161
>>> match = axl.Match(players, 25)
6262
>>> match.play()
6363
[('C', 'C'), ('C', 'D'), ('C', 'C'), ('C', 'D'), ('C', 'C'), ('C', 'D'), ('C', 'C'), ('C', 'D'), ('C', 'C'), ('C', 'D'), ('C', 'C'), ('C', 'D'), ('C', 'C'), ('C', 'D'), ('C', 'C'), ('C', 'D'), ('C', 'C'), ('C', 'D'), ('C', 'C'), ('C', 'D'), ('C', 'C'), ('C', 'D'), ('C', 'C'), ('C', 'D'), ('C', 'C')]
64-
>>> print(match.sparklines(c_character='|', d_character='-'))
64+
>>> print(match.sparklines(c_symbol='|', d_symbol='-'))
6565
|||||||||||||||||||||||||
6666
|-|-|-|-|-|-|-|-|-|-|-|-|

0 commit comments

Comments
 (0)