diff --git a/src/diana/drawer/tikz.py b/src/diana/drawer/tikz.py --- a/src/diana/drawer/tikz.py +++ b/src/diana/drawer/tikz.py @@ -3,7 +3,7 @@ class Tikz: footer = "" extension = "tex" - highNumbers = True + high_numbers = True def __init__(self): self.content = r'''\begin{tikzpicture} @@ -23,17 +23,17 @@ class Tikz: def __str__(self): return self.content+self.footer - def drawStone(self, x, y, color): + def draw_stone(self, x, y, color): fill = "black" if color == "b" else "white" self.content += r' \filldraw[draw=black, fill={0}] ({1}\boardSquare, {2}\boardSquare) circle[radius=0.5\boardSquare];'.format(fill, x, 18-y)+'\n' - def drawMove(self, x, y, label, color): + def draw_move(self, x, y, label, color): fill = "black" if color == "b" else "white" - labelColor = "white" if color == "b" else "black" - if (not self.highNumbers) and isinstance(label, int) and label%100 != 0: + label_color = "white" if color == "b" else "black" + if (not self.high_numbers) and isinstance(label, int) and label%100 != 0: label = label%100 - self.content += r' \filldraw[draw=black, fill={0}] ({1}\boardSquare, {2}\boardSquare) circle[radius=0.5\boardSquare] node[color={3}]{{{4}}};'.format(fill, x, 18-y, labelColor, label)+'\n' + self.content += r' \filldraw[draw=black, fill={0}] ({1}\boardSquare, {2}\boardSquare) circle[radius=0.5\boardSquare] node[color={3}]{{{4}}};'.format(fill, x, 18-y, label_color, label)+'\n' - def getContent(self): + def get_content(self): return self.content+self.footer