def all_valid_moves(self): valid_moves = [] all_string_points = get_all_string_points() for new_point in all_string_points: if rulecheck(self.boards_list, self.stone, new_point): valid_moves.append(new_point) if len(valid_moves) <= 1: return ["pass"] return valid_moves
def all_valid_moves(self, boards: List, stone: str): """ Returns a list of valid moves for a given board history and stone """ valid_moves = [] all_string_points = get_all_string_points() for new_point in all_string_points: if rulecheck(boards, stone, new_point): valid_moves.append(new_point) return valid_moves
def all_valid_moves(self, boards: List, stone: str): # -> List[str]: """ Returns a list of valid moves for a given board history and stone """ valid_moves, valid_capture_moves = [], [] all_string_points = get_all_string_points() for new_point in all_string_points: if rulecheck(boards, stone, new_point): valid_moves.append(new_point) if self.find_next_capture_move(boards, new_point, stone): valid_capture_moves.append(new_point) return valid_moves, valid_capture_moves