wozek-projekt/Shelf.py

25 lines
639 B
Python
Raw Permalink Normal View History

2023-03-27 13:33:47 +02:00
import pygame
2023-05-05 06:13:03 +02:00
from num_map import num_matrix
2023-03-27 13:33:47 +02:00
HORIZONTAL = 1250
VERTICAL = 750
TILE_SIZE = 50
shelf = (138, 126, 74)
2023-04-16 16:38:04 +02:00
2023-03-27 13:33:47 +02:00
class Shelf:
def __init__(self, window):
self.window = window
self.color = shelf
self.width = 5 * TILE_SIZE
self.height = TILE_SIZE
2023-05-05 06:13:03 +02:00
self.image = pygame.image.load('resources/shelf.PNG').convert_alpha()
2023-03-27 13:33:47 +02:00
def drawShelves(self):
2023-05-05 06:13:03 +02:00
for j in range(0, int(VERTICAL / TILE_SIZE)):
for i in range(0, int(HORIZONTAL / TILE_SIZE)):
if str(num_matrix[j][i]) in 's':
self.window.blit(self.image, (i * TILE_SIZE, j * TILE_SIZE))