2023-03-27 13:33:47 +02:00
|
|
|
import pygame
|
2023-04-16 16:38:04 +02:00
|
|
|
import numpy as np
|
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
|
|
|
|
|
|
|
|
def drawShelves(self):
|
|
|
|
for j in range(0, 5 * TILE_SIZE, 2 * TILE_SIZE):
|
|
|
|
for i in range(TILE_SIZE + 1, HORIZONTAL - TILE_SIZE, 6 * TILE_SIZE):
|
|
|
|
pygame.draw.rect(self.window, shelf, pygame.Rect(i, j, self.width, self.height))
|
|
|
|
|
|
|
|
for k in range(VERTICAL - 5 * TILE_SIZE, VERTICAL, 2 * TILE_SIZE):
|
|
|
|
for l in range(TILE_SIZE + 1, HORIZONTAL - TILE_SIZE, 6 * TILE_SIZE):
|
|
|
|
pygame.draw.rect(self.window, shelf, pygame.Rect(l, k, self.width, self.height))
|