diff --git a/house_0.jpg b/house_0.jpg new file mode 100644 index 0000000..c5699ae Binary files /dev/null and b/house_0.jpg differ diff --git a/house_1.jpg b/house_1.jpg new file mode 100644 index 0000000..b9e6ba6 Binary files /dev/null and b/house_1.jpg differ diff --git a/house_2.jpg b/house_2.jpg new file mode 100644 index 0000000..6436918 Binary files /dev/null and b/house_2.jpg differ diff --git a/house_3.jpg b/house_3.jpg new file mode 100644 index 0000000..896d5c5 Binary files /dev/null and b/house_3.jpg differ diff --git a/house_4.jpg b/house_4.jpg new file mode 100644 index 0000000..a2e7cb1 Binary files /dev/null and b/house_4.jpg differ diff --git a/house_5.jpg b/house_5.jpg new file mode 100644 index 0000000..c6775b5 Binary files /dev/null and b/house_5.jpg differ diff --git a/house_6.jpg b/house_6.jpg new file mode 100644 index 0000000..8f9654f Binary files /dev/null and b/house_6.jpg differ diff --git a/house_7.jpg b/house_7.jpg new file mode 100644 index 0000000..5b64995 Binary files /dev/null and b/house_7.jpg differ diff --git a/main.py b/main.py index 83b1321..ae84efe 100644 --- a/main.py +++ b/main.py @@ -15,7 +15,8 @@ trash_can_images = { } new_garbage_truck_size = (120, 120) -new_trash_can_size = (120, 120) +new_trash_can_size = (90, 90) +new_house_size = (140, 120) garbage_truck_image = garbage_truck_image.convert_alpha() garbage_truck_image = pygame.transform.scale(garbage_truck_image, new_garbage_truck_size) @@ -26,13 +27,26 @@ for key in trash_can_images: garbage_truck_position = [800, 500] trash_cans = [ - {'position': [100, 100], 'type': 'paper'}, - {'position': [1500, 800], 'type': 'metals_and_plastics'}, - {'position': [750, 800], 'type': 'mixed'}, - {'position': [100, 800], 'type': 'bio_waste'}, - {'position': [1500, 100], 'type': 'glass'}, + {'position': [1600, 300], 'type': 'paper'}, + {'position': [1600, 500], 'type': 'metals_and_plastics'}, + {'position': [1600, 700], 'type': 'mixed'}, + {'position': [1600, 900], 'type': 'bio_waste'}, + {'position': [1600, 100], 'type': 'glass'}, ] +houses = [] +house_positions = [[100, 200], [400, 400], [150, 600], [800, 800], [1000, 200], [1200, 700], [700, 100], [500, 800]] + +for i in range(8): + house_image = pygame.image.load(f'house_{i}.jpg') + house_image = pygame.transform.scale(house_image, new_house_size) + house = { + 'position': house_positions[i], + 'image': house_image, + 'trash_bin': [] + } + houses.append(house) + running = True while running: for event in pygame.event.get(): @@ -46,6 +60,8 @@ while running: screen.blit(garbage_truck_image, garbage_truck_position) for trash_can in trash_cans: screen.blit(trash_can_images[trash_can['type']], trash_can['position']) + for house in houses: + screen.blit(house['image'], house['position']) pygame.display.flip()