AIprojekt-wozek/Shelf.py

18 lines
507 B
Python
Raw Normal View History

2022-03-24 20:02:21 +01:00
import pygame
RECT_SIZE = 50
2022-04-04 20:08:45 +02:00
SHELF_COLOR = (143, 68, 33)
2022-03-24 20:02:21 +01:00
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):
2022-04-04 20:08:45 +02:00
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))