def strike_condition(self, env): if env.me.swing_ticks >= env.game.max_effective_swing_ticks: return True if env.me.state == HockeyistState.SWINGING: next_puck = prediction.next_puck_position(env) next_me = prediction.next_hockeyist_position(env, env.me, 1) # HARDCODE next_me.swing_ticks = min(20, env.me.swing_ticks + 1) after_strike = assessments.puck_after_strike(env, hockeyist=next_me, puck=next_puck) if prediction.goalie_can_save_straight(env, puck=after_strike): return True return False
def swing_condition(self, env): if self.can_run(env): return False puck = assessments.puck_after_strike(env) return not prediction.goalie_can_save_straight(env, puck=puck)