def get_action(self, board):
try:
location = input("Your move: ")
if isinstance(location, str): # for python3
location = [int(n, 10) for n in location.split(",")] #分割两个数字
move = board.location_to_move(location)
except \
Exception as e:
move = -1
if move == -1 or move not in board.availables:
print("invalid move")
move = self.get_action(board)
return move
board 是函数的参数,可是move那里,board却调用了另外一个函数,实在不懂,请指教。