Fix the divider printing logic (again)
This commit is contained in:
parent
cac812e46f
commit
d20a0bbdf7
1 changed files with 2 additions and 1 deletions
|
@ -203,7 +203,8 @@ class Board(dict):
|
|||
lines.append('\n'.join(box_lines))
|
||||
box_lines = []
|
||||
if x < self.size - 1:
|
||||
box_dividers = ['-' * (square_size * self.box_size + square_size)) for box in range(self.box_size)]
|
||||
# Don't print a divider on the last line.
|
||||
box_dividers = ['-' * ((square_size + 1) * self.box_size - 1) for box in range(self.box_size)]
|
||||
lines.append('\n{}\n'.format('-+-'.join(box_dividers)))
|
||||
return ''.join(lines)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue