add tiles with more cost

This commit is contained in:
s463041 2024-05-08 20:47:40 +02:00
parent 94e2175859
commit b6879f3c77
1 changed files with 15 additions and 1 deletions

16
main.py
View File

@ -193,12 +193,26 @@ def kuchnia(x, y):
def menu(x, y):
screen.blit(menuImg, (x * blockSize, y * blockSize))
kosztKosztownejPlytki = 5
def kosztownaPlytka(x, y):
if x > 60*4 and x < 60*7 and y < 60*9:
return True
if x > 60*13 and x < 60*16 and y > 60*5:
return True
if x > 60*20 and y < 60*9 and y > 60*3:
return True
return False
def wypiszOkno():
screen.fill((0, 0, 0))
for x in range(0, width, blockSize):
for y in range(0, height, blockSize):
rect = pygame.Rect(x, y, blockSize, blockSize)
pygame.draw.rect(screen, (200, 200, 200), rect, 1) #-------------Wypisz kratę -TA
if kosztownaPlytka(x, y):
pygame.draw.rect(screen, (200, 0, 0), rect, 1)
else:
pygame.draw.rect(screen, (200, 200, 200), rect, 1) #-------------Wypisz kratę -TA
run = True