AL-2020/shelf.py

27 lines
463 B
Python
Raw Normal View History

2020-05-18 17:24:03 +02:00
import pygame
2020-05-18 17:33:48 +02:00
2020-05-18 17:24:03 +02:00
class Shelf:
def __init__(self, x, y):
self.x = x
self.y = y
2020-05-18 17:24:03 +02:00
self.products = []
def add_product(self, product):
self.products.append(product)
def get_product(self):
return self.products[0]
def get_coordinates(self):
c = [self.x, self.y]
return c
def is_empty(self):
if len(self.products) == 0:
return True
else:
return False