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!"
|
), "Invalid buttons!"
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
result = "\n".join(self.rows)
|
return "\n".join(self.rows) \
|
||||||
result = result\
|
.replace("0", "⚪️") \
|
||||||
.replace("0", "⚪️")\
|
.replace("1", "🟢️") \
|
||||||
.replace("1", "🟢️")\
|
|
||||||
.replace("x", "⚫️")
|
.replace("x", "⚫️")
|
||||||
return result
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def columns(self) -> tuple[str, ...]:
|
def columns(self) -> tuple[str, ...]:
|
||||||
|
|
Loading…
Reference in a new issue