def build_sorted_game_stats_for_moves_by_username(username, moves, white=True): user = models.ChessDotComUser.find_user_by_username(username) games = user.white_games if white else user.black_games games = games.filter(models.ChessDotComGame.uci_moves_string_filter(moves)) return build_sorted_game_stats_at_move_index( games.all(), len(parse_long_uci_string(moves)) )
def build_sorted_game_stats_for_moves_for_all_games(moves): return build_sorted_game_stats_at_move_index( models.ChessDotComGame.query.all(), len(parse_long_uci_string(moves)) )
def build_sorted_game_stats_for_moves_for_all_games(moves): return build_sorted_game_stats_at_move_index( models.ChessDotComGame.query.all(), len(parse_long_uci_string(moves)))
def build_sorted_game_stats_for_moves_by_username(username, moves, white=True): user = models.ChessDotComUser.find_user_by_username(username) games = user.white_games if white else user.black_games games = games.filter(models.ChessDotComGame.uci_moves_string_filter(moves)) return build_sorted_game_stats_at_move_index( games.all(), len(parse_long_uci_string(moves)))
def uci_moves_list(self): return parse_long_uci_string(self.moves)