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): # -> List[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 make_move(self, Point: str, Boards: List[List]): if rulecheck(Boards, self.get_stone(), Point): return makemove(Boards[0], self.get_stone(), Point) return None