Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Pengfei Chen committed Oct 18, 2023
1 parent 640b685 commit e8cce5a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions unitary/examples/quantum_chinese_chess/move_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,19 @@


def global_names():
pass


# global board
# board = Board.from_fen(_EMPTY_FEN)


def set_board(positions: List[str]):
global board
board = Board.from_fen(_EMPTY_FEN)
for col in ascii_lowercase[:9]:
for row in digits:
globals()[f"{col}{row}"] = board.board[f"{col}{row}"]


def set_board(positions: List[str]):
for position in positions:
board.board[position].reset(
Piece(position, SquareState.OCCUPIED, Type.ROOK, Color.RED)
Expand Down

0 comments on commit e8cce5a

Please sign in to comment.