24 lines
775 B
Python
24 lines
775 B
Python
import pygame
|
|
|
|
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
|
|
|
|
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)) |