Ejemplo n.º 1
0
 def put_step(self, command):
     #PutStep <name> <description> <cost_in_hours> <name_of_goal>
     elements = command.split()
     goal_name = elements[1].lower()
     name = elements[2].lower()
     description = ""
     cost = int(elements[3])
     step = Step.build_new_step(name, description, cost)
     # Find the goal in life and add this step to it.
     success = False
     for goal in self.life.get_goals():
         if goal.name == goal_name:
             goal.put_step(step)
             success = True
     if success == False:
         print "Specified goal not found!"