Ejemplo n.º 1
0
 def count_prev_games(home_team, away_team, date):
     '''
     count_prev_games: returns the number of previous games played by each
     team. Used to check history criteria.
     '''
     return min(utilities.count_prev_games(home_team.dates, date),
                utilities.count_prev_games(away_team.dates, date))
Ejemplo n.º 2
0
 def count_prev_games(home_team, away_team, date):
     '''
     count_prev_games: returns the number of previous games played by each
     team. Used to check history criteria.
     '''
     return min(utilities.count_prev_games(home_team.dates, date), utilities.count_prev_games(away_team.dates, date))
Ejemplo n.º 3
0
    def player_history_met(player, date, min_games):
        # count number of history games for current player
        game_count = utilities.count_prev_games(player.dates, date)
        shot_count = utilities.count_prev_games(player.shots_dates, date)

        return (min(game_count, shot_count) >= min_games)
Ejemplo n.º 4
0
    def player_history_met(player, date, min_games):
        # count number of history games for current player
        game_count = utilities.count_prev_games(player.dates, date)
        shot_count = utilities.count_prev_games(player.shots_dates, date)

        return (min(game_count, shot_count) >= min_games)