Skip to content

Commit

Permalink
modify board
Browse files Browse the repository at this point in the history
  • Loading branch information
madcpf committed Oct 3, 2023
1 parent 2e57edf commit db36221
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions unitary/examples/quantum_chinese_chess/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
)
from unitary.examples.quantum_chinese_chess.piece import Piece


class Board:
def __init__(self):
self.load_fen()
Expand Down Expand Up @@ -68,7 +69,7 @@ def print(self, lang: Language = Language.EN):
board_string += "%d " % row
for col in "abcdefghi":
piece = self.board[col + "%d" % row]
board_string += piece.symbol(True, lang)
board_string += piece.symbol(lang)
if lang == Language.EN or piece.type_ == Type.EMPTY:
board_string += " "
# Print the row index on the right.
Expand All @@ -82,10 +83,3 @@ def print(self, lang: Language = Language.EN):
def flying_general(self) -> bool:
print("### flying general rule check to be implemented")
return False


board = Board()
board.print() >> abc

board.print(Language.ZH)
print(abc)

0 comments on commit db36221

Please sign in to comment.