コード例 #1
0
hee_haw = Donkey('Hee Haw', 'mountain donkey', 'midday', 'apples', 908790)
satan = Goat('Satan', 'pygmy goat', 'afternoon', 'grass', 8654675)
perm = Sheep('Perm', 'curly sheep', 'morning', 'grass', 837594)
ed = Horse('Mr. Ed', 'Tennessee walking horse', 'midday', 'oats', 957983)
cuddles = Ratsnake('Cuddles', 'Ratsnake', 'mice', 87676)
kissy = Copperhead('Kissy', 'Copperhead', 'mice', 4657)
monty = Python('Monty', 'python', 'rats', 665679)
cotton = Moccassin('Cotton', 'cotton mouth', 'frogs', 356554)
rainbow = Coralsnake('Rainbow', 'coral snake', 'roaches', 108375)
tangerine = Goldfish('Tangerine', 'goldfish', 'fish flakes', 23987)
waddle = Duck('Waddle', 'mallard', 'corn kernels', 487589)
ki = Coy('Ki', 'coy', 'fish flakes', 87984)
ribbit = Frog('Ribbit', 'bull frog', 'flies', 58769)
the_devil = Goose('The Devil', 'goose', 'corn kernels', 63495)

varmint_village.add(miss_fuzz)
varmint_village.add(hee_haw)
varmint_village.add(satan)
varmint_village.add(perm)
varmint_village.add(ed)
slither_inn.add(cuddles)
slither_inn.add(kissy)
slither_inn.add(monty)
slither_inn.add(cotton)
slither_inn.add(rainbow)
critter_cove.add(tangerine)
critter_cove.add(waddle)
critter_cove.add(ki)
critter_cove.add(ribbit)
critter_cove.add(the_devil)
コード例 #2
0
from animals import Carp, Catfish, Copperhead, CoralSnake, Cottonmouth, Crocodile, Donkey, Goat, Llama, Monkey, Python, RattleSnake, Seal, Tiger, Turtle
from attractions import PettingZoo, SnakePit, Wetlands

# Naming attractions
varmint_village = PettingZoo('Varmint Village')
the_slither_inn = SnakePit('The Slither Inn')
critter_cove = Wetlands('Critter Cove')

# Naming animals and adding them to Petting Zoo
mizz_fuzz = Llama("Miss Fuzz", "domestic llama", "morning", "llama chow", 34)
billy = Goat("Billy", "american pygmy", "midday", "goat chow", 12)
tony = Tiger("Tony", "bengal tiger", "midday", "tiger chow", 32)
george = Monkey("George", "spider monkey", "night", "monkey chow", 23)
geoff = Donkey("Geoff", "donkey", "night", "donkey chow", 14)
varmint_village.add(mizz_fuzz)
varmint_village.add(billy)
varmint_village.add(tony)
varmint_village.add(george)
varmint_village.add(geoff)

# Naming animals and adding them to Wetlands
bruce = Turtle("Bruce", "turtle", "turtle chow", 65)
croc = Crocodile("Croc", "crocodile", "fish chow", 66)
willy = Catfish("Willy", "blue catfish", "fish chow", 67)
lucile = Seal("Lucile", "seal", "fish chow", 68)
big_mouth = Carp("Big Mouth", "asian carp", "fish chow", 69)
critter_cove.add(bruce)
critter_cove.add(croc)
critter_cove.add(willy)
critter_cove.add(lucile)
critter_cove.add(big_mouth)
コード例 #3
0
ファイル: index.py プロジェクト: atphy/petting_zoo
lucy = Diamondback("Lucy", "diamondback", "cashews", 2)
donkeh = Donkey("Donkeh", "donkey", "morning", "waffles", 3)
fsh = Fish_With_No_Eyes("Fsh", "fish with no eyes", "carrots", 4)
g****e = Goat("G****e", "goat", "afternoon", "goat snacks", 5)
silver = Goldfish("Silver", "goldfish", "Goldfish", 6)
euryale = Gorgon("Euryale", "gorgon", "gorgonzola", 7)
mav = Goose("Mav", "Canada goose", "watercress sandwiches", 16)
peanut_butter = Jellyfish("Peanut Butter", "jellyfish", "sandwiches", 8)
miss_fuzz = Llama("Miss Fuzz", "llama", "evening", "llamagranates", 9)
mallory = Mallard("Mallory", "mallard", "mallort", 10)
tang = Orangutan("Tang", "orangutan", "midnight", "Tang", 11)
snat_rake = Rat_Snake("Snat Rake", "rat snake", "Rat Snacks(TM)", 12)
maracas = Rattlesnake("Maracas", "rattlesnake", "rattlesnacks", 13)
jaws = Shark("Jaws", "shark", "bigger boats", 14)
little_sebastian = Small_Horse("Little Sebastian", "small horse", "sunrise",
                               "hay-zelnuts", 15)

varmint_village = PettingZoo("Varmint Village",
                             "cute and fuzzy critters to cuddle")
snake_hole = SnakePit("The Snake Hole",
                      "unlovable and slithery critters to avoid")
soggy_bottoms = Wetlands("Soggy Bottoms", "wet and wild critters in your area")

varmint_village.add([donkeh, g****e, miss_fuzz, tang, little_sebastian])
snake_hole.add([steve_url, lucy, euryale, snat_rake, maracas])
soggy_bottoms.add([fsh, silver, peanut_butter, mallory, jaws])

varmint_village.add_animal_type_check(mav)

for animal in varmint_village.animals:
    print(animal)