private static string RepOrRepsAssigner(WarmUpSet warmUpSet) { var repsWord = "rep"; bool repsWordisPlural = warmUpSet.Repititions > 1; if (repsWordisPlural) repsWord = "reps"; return repsWord; }
private static double CalculateWeight(WorkingSet workingSet, WarmUpSet warmUpSet) { var warmUpWeight = (double)warmUpSet.Weight; if (warmUpSet.UsePercentage) warmUpWeight = CalculateWeightUsingPercentage(warmUpWeight, workingSet); return warmUpWeight; }
/// <summary> /// Inserts an already validated Warm-up set into the Warm-up sets list at the given location. /// </summary> /// <param name="warmUpSets"></param> /// <param name="warmUpSetNumber"></param> /// <param name="repititions"></param> /// <param name="weight"></param> /// <returns></returns> private static List <WarmUpSet> InsertValidWarmUpSet(List <WarmUpSet> warmUpSets, int warmUpSetNumber, int repititions, double weight, bool usePercentage) { var set = new WarmUpSet { Repititions = repititions, Weight = weight, UsePercentage = usePercentage }; warmUpSets.Insert((warmUpSetNumber - 1), set); return(warmUpSets); }
/// <summary> /// Adds an already validated Warm-up set onto our current Warm-up set list. /// </summary> /// <param name="warmUpSets"></param> /// <param name="repititions"></param> /// <param name="weight"></param> /// <returns></returns> private static List <WarmUpSet> AddValidWarmUpSet(List <WarmUpSet> warmUpSets, int repititions, double weight, bool usePercentage) { // TODO simplify parameters by creating the WarmUpSet separately and passing that through. var set = new WarmUpSet { Repititions = repititions, Weight = weight, UsePercentage = usePercentage }; warmUpSets.Add(set); return(warmUpSets); }