Example #1
0
 private static string RepOrRepsAssigner(WarmUpSet warmUpSet)
 {
     var repsWord = "rep";
     bool repsWordisPlural = warmUpSet.Repititions > 1;
     if (repsWordisPlural) repsWord = "reps";
     return repsWord;
 }
Example #2
0
        private static double CalculateWeight(WorkingSet workingSet, WarmUpSet warmUpSet)
        {
            var warmUpWeight = (double)warmUpSet.Weight;

            if (warmUpSet.UsePercentage) warmUpWeight = CalculateWeightUsingPercentage(warmUpWeight, workingSet);

            return warmUpWeight;
        }
Example #3
0
        /// <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);
        }
Example #4
0
        /// <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);
        }