import pygame RECT_SIZE = 50 SHELF_COLOR = (143, 68, 33) class Shelf: def __init__(self, window, x, y): self.window = window self.width = RECT_SIZE self.length = 6*RECT_SIZE self.x = x self.y = y self.block = pygame.Rect(self.x, self.y, self.width, self.length) def draw(self): pygame.draw.rect(self.window, SHELF_COLOR, self.block) # pygame.draw.line(self.window, (255, 255, 255), (self.x, self.y), (self.x, self.y + self.length))