2024-03-19 21:08:24 +01:00
|
|
|
from generators import *
|
2024-03-10 14:32:06 +01:00
|
|
|
|
2024-03-25 14:26:41 +01:00
|
|
|
W = 30
|
|
|
|
H = 20
|
2024-04-11 13:55:55 +02:00
|
|
|
MULT = 48
|
2024-03-25 14:26:41 +01:00
|
|
|
SIZE = (MULT*W, MULT*H)
|
2024-03-10 14:32:06 +01:00
|
|
|
pygame.init()
|
2024-03-25 11:21:23 +01:00
|
|
|
screen = pygame.display.set_mode(SIZE)
|
2024-04-11 13:55:55 +02:00
|
|
|
tilemap = Tilemap(Tileset("sprites/Tiles/1 Tiles/FieldsTile_38.png", mult=MULT), mult=MULT, size=(W, H))
|
2024-03-10 18:04:48 +01:00
|
|
|
|
2024-04-11 13:55:55 +02:00
|
|
|
trashcans = trashcanGenerator(MULT)
|
|
|
|
houses = householdGenerator(MULT)
|
|
|
|
garbagetruck = Garbagetruck(MULT).setHouses(houses).setTrashcans(trashcans)
|
2024-03-10 21:19:35 +01:00
|
|
|
|
2024-03-10 14:32:06 +01:00
|
|
|
running = True
|
|
|
|
while running:
|
|
|
|
for event in pygame.event.get():
|
|
|
|
if event.type == pygame.QUIT:
|
|
|
|
running = False
|
|
|
|
|
2024-03-25 11:21:23 +01:00
|
|
|
screen.fill((0, 0, 0))
|
2024-04-11 13:55:55 +02:00
|
|
|
tilemap.render(MULT)
|
2024-03-25 11:21:23 +01:00
|
|
|
screen.blit(tilemap.image, tilemap.rect)
|
2024-03-25 14:26:41 +01:00
|
|
|
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())
|
2024-03-25 11:21:23 +01:00
|
|
|
pygame.display.update()
|
2024-03-10 14:32:06 +01:00
|
|
|
|
|
|
|
pygame.quit()
|