diff --git a/Animals/animal.py b/Animals/animal.py index 677f05b..f8293b6 100644 --- a/Animals/animal.py +++ b/Animals/animal.py @@ -3,6 +3,16 @@ import pygame from abc import abstractmethod class Animal: + + def choose_picture(self, name): + ran = random.randint(0, 1) + if ran == 0: + path = f'images/{name}.png' + return path + else: + path = f'images/{name}2.png' + return path + def __init__(self, x, y,name, image, food_image, food, environment, activity, ill=False, adult=False,): self.x = x - 1 self.y = y - 1 diff --git a/Animals/bat.py b/Animals/bat.py index f246ee9..766eace 100644 --- a/Animals/bat.py +++ b/Animals/bat.py @@ -4,8 +4,8 @@ from datetime import datetime class Bat(Animal): def __init__(self, x, y, adult=False): - Bat_image = pygame.image.load('images/bat.png') name = 'bat' + Bat_image = pygame.image.load(self.choose_picture(name)) environment = "medium" food_image = 'images/grains.png' parrot_food = 'grains' diff --git a/Animals/bear.py b/Animals/bear.py index 8bd806b..a940095 100644 --- a/Animals/bear.py +++ b/Animals/bear.py @@ -4,8 +4,8 @@ from datetime import datetime class Bear(Animal): def __init__(self, x, y, adult=False): - Bear_image = pygame.image.load('images/bear.png') name = 'bear' + Bear_image = pygame.image.load(self.choose_picture(name)) environment = "cold" activity = 'nocturnal' ill = self.is_ill() diff --git a/Animals/elephant.py b/Animals/elephant.py index 005d3cf..1486605 100644 --- a/Animals/elephant.py +++ b/Animals/elephant.py @@ -4,8 +4,8 @@ from datetime import datetime class Elephant(Animal): def __init__(self, x, y, adult=False): - Elephant_image = pygame.image.load('images/elephant.png') name = 'elephant' + Elephant_image = pygame.image.load(self.choose_picture(name)) environment = "hot" activity = 'diurnal' ill = self.is_ill() diff --git a/Animals/giraffe.py b/Animals/giraffe.py index ef88e45..4a4e3c8 100644 --- a/Animals/giraffe.py +++ b/Animals/giraffe.py @@ -4,8 +4,8 @@ from datetime import datetime class Giraffe(Animal): def __init__(self, x, y, adult=False): - Giraffe_image = pygame.image.load('images/giraffe.png') name = 'giraffe' + Giraffe_image = pygame.image.load(self.choose_picture(name)) environment = "hot" activity = 'diurnal' ill = self.is_ill() diff --git a/Animals/owl.py b/Animals/owl.py index 23d5fd1..08ecfc9 100644 --- a/Animals/owl.py +++ b/Animals/owl.py @@ -4,8 +4,8 @@ from datetime import datetime class Owl(Animal): def __init__(self, x, y, adult=False): - Owl_image = pygame.image.load('images/owl.png') name = 'owl' + Owl_image = pygame.image.load(self.choose_picture(name)) environment = "medium" food_image = 'images/grains.png' parrot_food = 'grains' diff --git a/Animals/parrot.py b/Animals/parrot.py index 7449ca5..e925c5f 100644 --- a/Animals/parrot.py +++ b/Animals/parrot.py @@ -4,8 +4,8 @@ from datetime import datetime class Parrot(Animal): def __init__(self, x, y, adult=False): - Parrot_image = pygame.image.load('images/parrot.png') name = 'parrot' + Parrot_image = pygame.image.load(self.choose_picture(name)) environment = "medium" activity = 'diurnal' ill = self.is_ill() diff --git a/Animals/penguin.py b/Animals/penguin.py index d09de58..84a7550 100644 --- a/Animals/penguin.py +++ b/Animals/penguin.py @@ -4,8 +4,8 @@ from datetime import datetime class Penguin(Animal): def __init__(self, x, y, adult=False): - Penguin_image = pygame.image.load('images/penguin.png') name = 'penguin' + Penguin_image = pygame.image.load(self.choose_picture(name)) environment = "cold" activity = 'diurnal' ill = self.is_ill() diff --git a/images/bat.png b/images/bat.png index 3065123..2dd676a 100644 Binary files a/images/bat.png and b/images/bat.png differ diff --git a/images/bat2.png b/images/bat2.png new file mode 100644 index 0000000..3a6d087 Binary files /dev/null and b/images/bat2.png differ diff --git a/images/bear2.png b/images/bear2.png new file mode 100644 index 0000000..75d8b71 Binary files /dev/null and b/images/bear2.png differ diff --git a/images/elephant2.png b/images/elephant2.png new file mode 100644 index 0000000..532d6b6 Binary files /dev/null and b/images/elephant2.png differ diff --git a/images/giraffe2.png b/images/giraffe2.png new file mode 100644 index 0000000..c1b0b63 Binary files /dev/null and b/images/giraffe2.png differ diff --git a/images/owl.png b/images/owl.png index 8824fc8..039dbd0 100644 Binary files a/images/owl.png and b/images/owl.png differ diff --git a/images/owl2.png b/images/owl2.png new file mode 100644 index 0000000..5a836c1 Binary files /dev/null and b/images/owl2.png differ diff --git a/images/parrot2.png b/images/parrot2.png new file mode 100644 index 0000000..99bc134 Binary files /dev/null and b/images/parrot2.png differ diff --git a/images/penguin2.png b/images/penguin2.png new file mode 100644 index 0000000..d0eea2d Binary files /dev/null and b/images/penguin2.png differ diff --git a/tree.png b/tree.png index d608b6e..7e9d4ef 100644 Binary files a/tree.png and b/tree.png differ