1
0
forked from s444417/ProjektAI
This commit is contained in:
s444496 2020-05-07 19:06:33 +02:00
commit 56689faa23
5 changed files with 5 additions and 10 deletions

View File

@ -1,10 +1,5 @@
class Drawable:
GREY = (128, 128, 128)
YELLOW = (255, 255, 0)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
def __init__(self, x, y, minX, maxX, minY, maxY, cellSize, offset):
self.__minX = minX
self.__maxX = maxX

View File

@ -117,7 +117,7 @@ class Waiter(Drawable):
def draw(self, screen):
direction = self.getDirection()
imageKind = None
if direction == Direction.LeftUp:
if direction == Direction.LeftUp:
imageKind = Images.WaiterLeftUp
elif direction == Direction.Up:
imageKind = Images.WaiterUp

View File

@ -1,7 +1,7 @@
import random
from threading import Lock
from kelner.src.components.Table import Table, Status
from kelner.src.components.Table import Table
from kelner.src.components.Waiter import Waiter
@ -71,7 +71,7 @@ class DrawableCollection:
def getReservedPlaces(self, waiter):
cols = waiter.getMaxX() - waiter.getMinX() + 1
rows = waiter.getMaxY() - waiter.getMinY() + 1
reservedPlaces = [[0] * cols for i in range(rows)]
reservedPlaces = [[0] * cols for _ in range(rows)]
tables = self.getTables(None)
if tables:
for table in tables:

View File

@ -60,7 +60,7 @@ class ImageCache:
def __getFont(self):
if self.__font is None:
self.__font = font = pygame.font.SysFont('comicsansms', 24, True)
self.__font = pygame.font.SysFont('comicsansms', 24, True)
return self.__font
def getImage(self, imageKind, width, height):

View File

@ -30,6 +30,6 @@ class MenuManager:
def generateOrder(self):
count = random.randint(self.__MinDishes, self.__MaxDishes)
order = []
for i in range(0, count):
for _ in range(0, count):
order += [(self.__menuCard[random.randint(0, len(self.__menuCard) - 1)])]
return order