25 lines
639 B
Python
25 lines
639 B
Python
import pygame
|
|
|
|
from num_map import num_matrix
|
|
|
|
HORIZONTAL = 1250
|
|
VERTICAL = 750
|
|
|
|
TILE_SIZE = 50
|
|
shelf = (138, 126, 74)
|
|
|
|
|
|
class Shelf:
|
|
def __init__(self, window):
|
|
self.window = window
|
|
self.color = shelf
|
|
self.width = 5 * TILE_SIZE
|
|
self.height = TILE_SIZE
|
|
self.image = pygame.image.load('resources/shelf.PNG').convert_alpha()
|
|
|
|
def drawShelves(self):
|
|
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))
|