Male_zoo_Projekt_SI/Animals/animals.py

47 lines
1.5 KiB
Python
Raw Permalink Normal View History

2024-04-27 19:50:18 +02:00
from elephant import Elephant
from giraffe import Giraffe
from penguin import Penguin
from parrot import Parrot
from bear import Bear
def create_animals():
giraffe1 = Giraffe(0, 0, adult=True)
giraffe2 = Giraffe(0, 0, adult=True)
giraffe3 = Giraffe(0, 0, adult=True)
giraffe4 = Giraffe(0, 0)
giraffe5 = Giraffe(0, 0)
bear1 = Bear(0, 0, adult=True)
bear2 = Bear(0, 0, adult=True)
bear3 = Bear(0, 0)
bear4 = Bear(0, 0)
bear5 = Bear(0, 0)
penguin1 = Penguin(0, 0)
penguin2 = Penguin(0, 0)
penguin3 = Penguin(0, 0)
penguin4 = Penguin(0, 0)
elephant1 = Elephant(0, 0, adult=True)
elephant2 = Elephant(0, 0, adult=True)
elephant3 = Elephant(0, 0)
elephant4 = Elephant(0, 0)
elephant5 = Elephant(0, 0)
parrot1 = Parrot(0, 0)
parrot2 = Parrot(0, 0)
parrot3 = Parrot(0, 0)
parrot4 = Parrot(0, 0)
parrot5 = Parrot(0, 0)
Animals = [giraffe1, giraffe2, giraffe3, giraffe4, giraffe5,
bear1, bear2, bear3, bear4, bear5,
elephant1, elephant2, elephant3, elephant4, elephant5,
penguin1, penguin2, penguin3, penguin4,
parrot1, parrot2, parrot3, parrot4, parrot5]
return Animals
def draw_Animals(Animals, const):
for Animal in Animals:
Animal.draw(const.screen, const.GRID_SIZE)
if Animal.feed() == 'True':
Animal.draw_exclamation(const.screen, const.GRID_SIZE, Animal.x, Animal.y)
else:
Animal.draw_food(const.screen,const.GRID_SIZE,Animal.x,Animal.y)