refactor Board.__str__()
This commit is contained in:
parent
9c00dd61a4
commit
63596fae3c
1 changed files with 3 additions and 5 deletions
|
@ -46,12 +46,10 @@ class Board:
|
|||
), "Invalid buttons!"
|
||||
|
||||
def __str__(self) -> str:
|
||||
result = "\n".join(self.rows)
|
||||
result = result\
|
||||
return "\n".join(self.rows) \
|
||||
.replace("0", "⚪️") \
|
||||
.replace("1", "🟢️") \
|
||||
.replace("x", "⚫️")
|
||||
return result
|
||||
|
||||
@property
|
||||
def columns(self) -> tuple[str, ...]:
|
||||
|
|
Loading…
Reference in a new issue