Skip to content

Commit

Permalink
初期局面集に開始局面(startpos)も指定可能にする
Browse files Browse the repository at this point in the history
  • Loading branch information
TadaoYamaoka committed Feb 14, 2024
1 parent 1b6e53e commit 938924f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cshogi/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,12 @@ def __call__(self, line):
if opening:
opening_list = []
with open(opening) as f:
opening_list = [line.strip()[15:].split(' ') for line in f]
for line in f:
moves = line.strip()[15:]
if moves:
opening_list.append(moves.split(' '))
else:
opening_list.append([])
# インデックス指定
if opening_index is not None:
opening_list = [opening_list[opening_index]]
Expand Down

0 comments on commit 938924f

Please sign in to comment.