Skip to content

Commit

Permalink
[Shogi] Extract logic functions (#1269)
Browse files Browse the repository at this point in the history
  • Loading branch information
sotetsuk authored Oct 31, 2024
1 parent e9d7c87 commit 08e1b93
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 93 deletions.
2 changes: 1 addition & 1 deletion pgx/_src/dwg/shogi.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def _make_shogi_dwg(dwg, state: ShogiState, config): # noqa: C901
if state._x.turn == 1:
from pgx.shogi import _flip

state = _flip(state)
state = ShogiState(_x=_flip(state._x)) # type: ignore
# fmt: off
PIECES = ["歩", "香", "桂", "銀", "角", "飛", "金", "玉", "と", "成香", "成桂", "成銀", "馬", "龍"] * 2
NUM_TO_CHAR = ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十"]
Expand Down
Loading

0 comments on commit 08e1b93

Please sign in to comment.