예제 #1
0
flipper = Dolphin("Flipper", "wild dolphin", "afternoon", "plants", 2345)
buddha = Starfish("Buddha", "golden starfish", "morning", "fish food", 6723)
ed = Eel("Ed", "electric eel", "evening", "algae", 8976234)
gus = Octopus("Gus", "wild octopus", "evening", "pond scum", 9087234)
jerry = Goldfish("Jerry", "wild octopus", "morning", "fish food", 9873)
carl = Copperhead("Carl", "copperhead snake", "morning", "mice", 987234)
ren = Rat_Snake("Ren", "poisonous rattler", "afternoon", "mice", 234345)
sally = Salamander("Sally", "domestic salamander", "afternoon", "plants", 1)
charlie = Snail("Charile", "domestic snail", "afternoon", "bugs", 7)
al = Alligator("Al", "dangerous gator", "afternoon", "anything", 43)

varmint_village = PettingZoo("Varmint Village")
slither_inn = SnakePit("Slither Inn")
water_town = Wetlands("Water Town")

slither_inn.add_animal(carl)
slither_inn.add_animal(ren)
slither_inn.add_animal(sally)
slither_inn.add_animal(charlie)
slither_inn.add_animal(al)
varmint_village.add_animal(miss_fuzz)
varmint_village.add_animal(tony)
varmint_village.add_animal(ned)
varmint_village.add_animal(henry)
varmint_village.add_animal(george)
water_town.add_animal(flipper)
water_town.add_animal(buddha)
water_town.add_animal(ed)
water_town.add_animal(gus)
water_town.add_animal(jerry)
예제 #2
0
#swimming🐠
nemo = Fish("Nemo", "Fish", "morning", "plankton", 101010)
alan = Alligator("Alan", "Alligator","afternoon", "steak", 788789)
cedric = Seahorse("Cedric", "Seahorse", "afternoon", "plankton", 555666)
fred = Frog("Fred", "Frog", "morning", "flies", 789321)
pedro = Platypus("Pedro", "Platypus", "morning", "gummie bears", 5556666555)

varmint_village = PettingZoo("Varmint Village", "cute and fuzzy critters to cuddle")
slither_inn = SnakePit("Slither Inn", "sleek and slithering creatures all around you")
critter_cove = Wetlands("Critter Cove", "If it swims and can be caught, it's in here")

varmint_village.add_animal(june)
varmint_village.add_animal(johnny)
varmint_village.add_animal(alan)

slither_inn.add_animal(sam)
slither_inn.add_animal(errol)
slither_inn.add_animal(sal)
slither_inn.add_animal(pippin)
slither_inn.add_animal(bruce)

critter_cove.add_animal(nemo)
critter_cove.add_animal(alan)
critter_cove.add_animal(cedric)
critter_cove.add_animal(fred)
critter_cove.add_animal(pedro)



for animal in varmint_village.animals:
    print(animal)
예제 #3
0
monty = Python(13, "Monty", "domestic python")
shake = Rattlesnake(14,"Shake", "domestic rattlesnake")
louis = Kingsnake(15, "King Louis", "domestic kingsnake")

varmint_village = PettingZoo("Varmint Village", "cute and fuzzy critters to cuddle")
pit_of_doom = SnakePit("Pit of Doom", "cute and scaley critters")
waterworld = Wetlands("Waterworld", "cute and wet critters")

varmint_village.add_animal(mama)
varmint_village.add_animal(billy)
varmint_village.add_animal(waffles)
varmint_village.add_animal(chris)
varmint_village.add_animal(para)
# varmint_village.add_animal(goose)

pit_of_doom.add_animal(cheese)
pit_of_doom.add_animal(bronze)
pit_of_doom.add_animal(monty)
pit_of_doom.add_animal(shake)
pit_of_doom.add_animal(louis)

waterworld.add_animal(dude)
waterworld.add_animal(shocky)
waterworld.add_animal(towel)
waterworld.add_animal(finn)
waterworld.add_animal(boo)

for animal in varmint_village.animals:
    print(f'You can find {animal.name} the {animal.species} in {varmint_village.attraction_name}')

# for animal in pit_of_doom.animals:
frogger = Frog("Frogger", "Green Frog", "midday", "Frog Chow", 45678)

mr_toad = Toad("Mr. Toad", "Common Toad", "afternoon", "Toad Chow", 45679)

donald = Duck("Donald", "American Pekin Duck", "morning", "Duck Chow", 56789)

# Create a Goose
bob = Goose("Bob", "Canada goose", "watercress sandwiches", 12341)
bob.run()
bob.swim()

# Create an attraction
varmint_village = PettingZoo("Varmint Village", "critters that like to dig and scurry")
varmint_village.add_animal(bob)


for animal in varmint_village.animals:
    print(animal)

snake_pit = SnakePit("Snake Pit", "snakes and stuff")
snake_pit.add_animal(bertha)

for animal in snake_pit.animals:
    print(animal)

wet_lands = Wetlands("Wetlands", "wide variety of animals in here")
wet_lands.add_animal(nemo)

for animal in wet_lands.animals:
    print(animal)