diff --git a/archeryutils/classifications/agb_indoor_classifications.py b/archeryutils/classifications/agb_indoor_classifications.py index 9d9f5b2..e5343b5 100644 --- a/archeryutils/classifications/agb_indoor_classifications.py +++ b/archeryutils/classifications/agb_indoor_classifications.py @@ -16,7 +16,7 @@ import numpy.typing as npt from archeryutils import load_rounds -from archeryutils.handicaps import handicap_equations as hc_eq +import archeryutils.handicaps as hc import archeryutils.classifications.classification_utils as cls_funcs @@ -281,17 +281,15 @@ def agb_indoor_classification_scores( group_data = agb_indoor_classifications[groupname] hc_scheme = "AGB" - hc_params = hc_eq.HcParams() # Get scores required on this round for each classification # Enforce full size face class_scores = [ - hc_eq.score_for_round( + hc.score_for_round( ALL_INDOOR_ROUNDS[cls_funcs.strip_spots(roundname)], group_data["class_HC"][i], hc_scheme, - hc_params, - round_score_up=True, + rounded_score=True, ) for i, class_i in enumerate(group_data["classes"]) ] @@ -305,12 +303,11 @@ def agb_indoor_classification_scores( for i, (score, handicap) in enumerate( zip(int_class_scores, group_data["class_HC"]) ): - next_score = hc_eq.score_for_round( + next_score = hc.score_for_round( ALL_INDOOR_ROUNDS[cls_funcs.strip_spots(roundname)], np.floor(handicap) + 1, hc_scheme, - hc_params, - round_score_up=True, + rounded_score=True, ) if next_score == score: # If already at max score this classification is impossible diff --git a/archeryutils/classifications/agb_old_indoor_classifications.py b/archeryutils/classifications/agb_old_indoor_classifications.py index a989fec..fc57bfb 100644 --- a/archeryutils/classifications/agb_old_indoor_classifications.py +++ b/archeryutils/classifications/agb_old_indoor_classifications.py @@ -14,7 +14,7 @@ from typing import TypedDict from archeryutils import load_rounds -from archeryutils.handicaps import handicap_equations as hc_eq +import archeryutils.handicaps as hc import archeryutils.classifications.classification_utils as cls_funcs @@ -245,16 +245,13 @@ def agb_old_indoor_classification_scores( groupname = cls_funcs.get_groupname(bowstyle, gender, age_group) group_data = agb_old_indoor_classifications[groupname] - hc_params = hc_eq.HcParams() - # Get scores required on this round for each classification class_scores = [ - hc_eq.score_for_round( + hc.score_for_round( ALL_INDOOR_ROUNDS[roundname], group_data["class_HC"][i], "AGBold", - hc_params, - round_score_up=True, + rounded_score=True, ) for i, class_i in enumerate(group_data["classes"]) ] diff --git a/archeryutils/classifications/agb_outdoor_classifications.py b/archeryutils/classifications/agb_outdoor_classifications.py index 66f3e8f..fe91e40 100644 --- a/archeryutils/classifications/agb_outdoor_classifications.py +++ b/archeryutils/classifications/agb_outdoor_classifications.py @@ -16,7 +16,7 @@ import numpy.typing as npt from archeryutils import load_rounds -from archeryutils.handicaps import handicap_equations as hc_eq +import archeryutils.handicaps as hc import archeryutils.classifications.classification_utils as cls_funcs @@ -536,16 +536,13 @@ def agb_outdoor_classification_scores( groupname = cls_funcs.get_groupname(bowstyle, gender, age_group) group_data = agb_outdoor_classifications[groupname] - hc_params = hc_eq.HcParams() - # Get scores required on this round for each classification class_scores = [ - hc_eq.score_for_round( + hc.score_for_round( ALL_OUTDOOR_ROUNDS[cls_funcs.strip_spots(roundname)], group_data["class_HC"][i], "AGB", - hc_params, - round_score_up=True, + rounded_score=True, ) for i in range(len(group_data["classes"])) ]