Added cardio implementation, but still needs tweaking with printing out sets/reps

This commit is contained in:
William Brawner 2015-07-20 12:41:03 -07:00
parent d1372c20e0
commit 766c9a810d

View file

@ -210,12 +210,13 @@ class Generator(object):
#The following functions print out the exercises for the given muscle #The following functions print out the exercises for the given muscle
#groups. #groups.
def generate_cardio(self, exercises): def generate_cardio(self, quantity):
Generator.header("Cardio Day") Generator.header("Cardio Day")
Generator.section("Warm Ups") Generator.section("Warm Ups")
Generator.section("Workout") Generator.section("Workout")
Generator.column_titles(self) Generator.column_titles(self)
print("I need to add cardio exercises.", file = log) cardio_exercises = sample(Cardio.exercises, quantity)
Generator.print_exercises(self, cardio_exercises)
Generator.section("Cool Down") Generator.section("Cool Down")
def generate_full_body(self, large_muscle, small_muscle): def generate_full_body(self, large_muscle, small_muscle):
@ -361,19 +362,19 @@ class Generator(object):
workout = days // 2 workout = days // 2
cardio = (days % 2) * workout cardio = (days % 2) * workout
if days == 1: if days == 1:
Generator.generate_cardio(self, 1) Generator.generate_cardio(self, 3)
elif days < 5: elif days < 5:
for day in range(workout): for day in range(workout):
Generator.generate_upper_body(self, 1, 1) Generator.generate_upper_body(self, 1, 1)
Generator.generate_lower_body(self, 2, 1) Generator.generate_lower_body(self, 2, 1)
for day in range(cardio): for day in range(cardio):
Generator.generate_cardio(self, 1) Generator.generate_cardio(self, 3)
else: else:
for day in range(0, 2): for day in range(0, 2):
Generator.generate_upper_body(self, 1, 1) Generator.generate_upper_body(self, 1, 1)
Generator.generate_lower_body(self, 2, 1) Generator.generate_lower_body(self, 2, 1)
for day in range(0, days - 4): for day in range(0, days - 4):
Generator.generate_cardio(self, 1) Generator.generate_cardio(self, 3)
Generator.footer() Generator.footer()
elif experience == 3: elif experience == 3:
#Advanced lifters have more specific rules according to how many #Advanced lifters have more specific rules according to how many
@ -400,7 +401,7 @@ class Generator(object):
Generator.generate_legs(self, days, 3, 2) Generator.generate_legs(self, days, 3, 2)
Generator.generate_arms(self, 2) Generator.generate_arms(self, 2)
for day in range(0, days - 4): for day in range(0, days - 4):
Generator.generate_cardio(self, 1) Generator.generate_cardio(self, 3)
Generator.footer() Generator.footer()