Exemple #1
0
def release_animal(arboretum):
    animal = None

    print("1. River Dolphins")
    print("2. Pueo")
    print("3. \'Ulae")
    print("4. Gold Dust Day Gecko")
    print("5. Nene Goose")
    print("6. Kikakapu")
    print("7. Ope\'ape\'a")
    print("8. Hawaiian Happy-Face Spider")

    choice = input("Choose animal to release > ")

    if choice == "1":
        animal = RiverDolphin()

    if choice == "2":
        animal = Pueo()

    if choice == "3":
        animal = Ulae()

    if choice == "4":
        animal = Gold_dust_day_gecko()

    if choice == "5":
        animal = Nene_goose()

    if choice == "6":
        animal = Kikakapu()

    if choice == "7":
        animal = Opeapea()

    if choice == "8":
        animal = Hawaiian_happyface_spider()

    all_biomes = arboretum.rivers + arboretum.forests + arboretum.coastlines + \
        arboretum.swamps + arboretum.grasslands + arboretum.mountains
    animal_age_in_months = input("Enter animal age in months > ")
    animal_age_float = float(animal_age_in_months)
    if animal_age_float < animal.minimum_age_in_months:
        print(
            "\n\nAnimal is too young to be released. Please choose a older animal."
        )
        input("\n\nPress any key to continue...")
        release_animal(arboretum)
    else:
        for index, biome in enumerate(all_biomes):
            print(
                f'{index + 1}. {biome.name} {biome.biome_type} ({len(biome.animals)} animals)'
            )
        print("Release the animal into which biome?")
        biome_selection = input("> ")
        biome_to_append = all_biomes[int(biome_selection) - 1]
        biome_to_append.animal_max_capacity(animal, arboretum)
def release_animal(arboretum):
    animal = None
    os.system('cls' if os.name == 'nt' else 'clear')
    print("1. Gold Dust Day Gecko")
    print("2. River Dolphin")
    print("3. Nene Goose")
    print("4. Kikakapu")
    print("5. Pueo")
    print("6. 'Ulae")
    print("7. Ope'ape'a")
    print("8. Happy-Face Spider")

    choice = input("Choose animal to release into the chosen habitat > ")

    if choice == "1":
        animal = Gold_Dust_Day_Gecko()
    if choice == "2":
        animal = RiverDolphin()
    if choice == "3":
        animal = Nene_Goose()
    if choice == "4":
        animal = Kikakapu()
    if choice == "5":
        animal = Pueo()
    if choice == "6":
        animal = Ulae()
    if choice == "7":
        animal = Opeapea()
    if choice == "8":
        animal = Hawaiian_Happy_Face_Spider()
    else:
        input(" That sucked try again! ")
        return

    choice = input("Release the animal into which biome? >")

    if choice == "1":
        River.add_animal()


# *******************************
# Charles To-do Notes
# *******************************
# Dragonfly should not be included in the relaease animals section on line 7
# animals that need to be added to this module:
# 1. Gold Dust Day Gecko
# 3. Nene Goose
# 4. Kīkākapu
# 5. Pueo
# 6. 'Ulae
# 7. Ope'ape'a
# 8. Happy-Face Spider
def feed_animal(arboretum):
    animal = None

    # list of animals that are shouwn to users
    print("1. Gold Dust Day Gecko")
    print("2. River Dolphin")
    print("3. Nene Goose")
    print("4. Kikakapu")
    print("5. Pueo")
    print("6. Ulae")
    print("7. Ope'ape'a")
    print("8. Happy-face Spider")
    # TODO: insert remianing 6 animals

    choice = input("Choose animal to feed > ")
    # logic that creates an instance of the class
    if choice == "2":
        animal = RiverDolphin()
Exemple #4
0
def feed_animal(arboretum):
    animal = None

    print("1. River Dolphin")
    print("2. Pueo")
    print("3. Ulae")
    print("4. Gold Dust Day Gecko")
    print("5. Nene Goose")
    print("6. Kikakapu")
    print("7. Ope'ape'a")
    print("8. Hawaiian Happy-Face Spider")

    choice = input("Choose an animal to feed > ")

    if choice == "1":
        animal = RiverDolphin()
    if choice == "2":
        animal = Pueo()
    if choice == "3":
        animal = Ulae()
    if choice == "4":
        animal = Gold_dust_day_gecko()
    if choice == "5":
        animal = Nene_goose()
    if choice == "6":
        animal = Kikakapu()
    if choice == "7":
        animal = Opeapea()
    if choice == "8":
        animal = Hawaiian_happyface_spider()

    animal.feed(animal)
from actions.feeding import feeding
from animals.gold_gecko import Gold_Dust_Day_Gecko
from animals.pueo import Pueo
from animals.happy_face import Hawaiian_Happy_Face_Spider
from animals.kikakapu import Kikakapu
from animals.nene_goose import Nene_Goose
from animals.river_dolphin import RiverDolphin
from animals.opeapea import Opeapea
from animals.ulae import Ulae
from animals.animal import Animal
from actions.feeding import feeding_other
from actions.feeding import animal_gets_fed
from actions.feeding import other_animal_gets_fed

dolphin = RiverDolphin()
gecko = Gold_Dust_Day_Gecko()
pueo = Pueo()
spider = Hawaiian_Happy_Face_Spider()
kikakapu = Kikakapu()
goose = Nene_Goose()
opeapea = Opeapea()
ulae = Ulae()


def feed_animal_menu():
    print("1. River Dolphin")
    print("2. Happy-Face Spider")
    print("3. Pueo")
    print("4. Ulae")
    print("5. Gold Dust Day Gecko")
    print("6. Nene Goose")