From b67212a0590bedcd0c0ace15298d51acd6fdb146 Mon Sep 17 00:00:00 2001 From: wbrawner Date: Fri, 26 Jun 2015 17:04:09 -0500 Subject: [PATCH] Added an engine class to automate the process of running all of the functions within the generator class. --- workoutgenerator.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/workoutgenerator.py b/workoutgenerator.py index ade1426..48c7bd3 100755 --- a/workoutgenerator.py +++ b/workoutgenerator.py @@ -289,8 +289,12 @@ class Generator(object): print ("You should take a couple of days per week to rest.") pass +class Engine(object): + def start(Generator): + Generator.get_goal() + Generator.get_preferences() + days = Generator.get_frequency() + Generator.give_workout(days) + gen1 = Generator() -gen1.get_goal() -gen1.get_preferences() -days = gen1.get_frequency() -gen1.give_workout(days) +Engine.start(gen1)