Madra_smieciarka/main.py
Neerka e02adf16b6 grid works + little adjustments
Signed-off-by: Neerka <jakub.markil1@gmail.com>
2024-03-25 14:26:41 +01:00

32 lines
836 B
Python

from generators import *
W = 30
H = 20
MULT = 32
SIZE = (MULT*W, MULT*H)
pygame.init()
screen = pygame.display.set_mode(SIZE)
tilemap = Tilemap(Tileset("sprites/Tiles/1 Tiles/FieldsTile_38.png"), (W, H))
trashcans = trashcanGenerator()
houses = householdGenerator()
garbagetruck = Garbagetruck().setPredicts(houses).setOthers(allLocations(trashcans, houses))
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
screen.fill((0, 0, 0))
tilemap.render()
screen.blit(tilemap.image, tilemap.rect)
screen.blit(garbagetruck.getImage(), garbagetruck.printme())
for i in trashcans:
screen.blit(i.getImage(), i.printme())
for h in houses:
screen.blit(h.getImage(), h.printme())
pygame.display.update()
pygame.quit()