Ejemplo n.º 1
0
def commandLinePrompt(current_steps, current_ingredients):
    user_input = float(commandLineIntro(current_steps, current_ingredients))

    #Ingredients
    if user_input == 0:
        Ingredients.main(current_ingredients)
        user_input = commandLinePrompt(current_steps, current_ingredients)
    elif user_input == 1:
        Steps.tools(current_steps, current_ingredients)
        user_input = commandLinePrompt(current_steps, current_ingredients)
    elif user_input == 2:
        Steps.methods(current_steps, current_ingredients)
        user_input = commandLinePrompt(current_steps, current_ingredients)
    elif user_input == 3:
        Steps.steps(current_steps, current_ingredients)
        user_input = commandLinePrompt(current_steps, current_ingredients)
    elif user_input == 4:
        current_ingredients = ServingSizeTransform.main(current_ingredients)
        user_input = commandLinePrompt(current_steps, current_ingredients)

    # Healthier
    elif user_input == 5:
        current_ingredients, current_steps = Transformations.main(
            3, current_steps, current_ingredients)
        user_input = commandLinePrompt(current_steps, current_ingredients)
    # Less Healthy
    elif user_input == 6:
        current_ingredients, current_steps = Transformations.main(
            4, current_steps, current_ingredients)
        user_input = commandLinePrompt(current_steps, current_ingredients)
    # Vegetarian
    elif user_input == 7:
        current_ingredients, current_steps = Transformations.main(
            1, current_steps, current_ingredients)
        user_input = commandLinePrompt(current_steps, current_ingredients)
    # Non-Vegetarian
    elif user_input == 8:
        current_ingredients, current_steps = Transformations.main(
            2, current_steps, current_ingredients)
        user_input = commandLinePrompt(current_steps, current_ingredients)
    elif user_input == 9:
        return
    elif user_input == 10:
        current_ingredients, current_steps = Transformations.main(
            5, current_steps, current_ingredients)
        user_input = commandLinePrompt(current_steps, current_ingredients)