app/strategies/relay_swimmers_combiner.rb
# Find swimmer suggested time
# Assumes tha a swimmer has a valid badge for the meeting
#
Find swimmer suggested time
Assumes tha a swimmer has a valid badge for the meeting
Find swimmer suggested time Assumes tha a swimmer has a valid badge for the meeting
def find_suggested_time( swimmer, badge, use_default = false, phase = 0 )
    event_type = @relay_phases[phase][0]
    best_finder = SwimmerPersonalBestFinder.new( swimmer )
    suggested_time = best_finder.get_entry_best_timing(
      badge,
      @meeting,
      event_type,
      @pool_type,
      true 
    )
    if suggested_time == nil && use_default
      score_calculation = ScoreCalculator.new( @meeting.season, swimmer.gender_type, badge.category_type, @pool_type, event_type )
      suggested_time = score_calculation.get_fin_timing( @default_points )
    end
    suggested_time
  end
def find_suggested_time ( swimmer , badge , use_default = false , phase = 0 ) event_type = @relay_phases [ phase ] [ 0 ] best_finder = SwimmerPersonalBestFinder . new ( swimmer ) suggested_time = best_finder . get_entry_best_timing ( badge , @meeting , event_type , @pool_type , true ) if suggested_time == nil && use_default score_calculation = ScoreCalculator . new ( @meeting . season , swimmer . gender_type , badge . category_type , @pool_type , event_type ) suggested_time = score_calculation . get_fin_timing ( @default_points ) end suggested_time end
Find swimmer suggested time
Assumes tha a swimmer has a valid badge for the meeting
Find swimmer suggested time Assumes tha a swimmer has a valid badge for the meeting
# Check for suggested time (searche usimg method set on badge prefernces) # convert_pool_type # If non suggested time found and should use default, calculate default
swimmer
<not_specific>
badge
<not_specific>
use_default
<not_specific>
phase
<not_specific>