image recognition fix

This commit is contained in:
karoel2 2020-06-15 13:01:51 +02:00
parent de49a9d56b
commit 0e22448664

View File

@ -66,6 +66,7 @@ def image_recognition():
if CATEGORIES[idx[0][0]] == waiter.order_list[-1]: if CATEGORIES[idx[0][0]] == waiter.order_list[-1]:
WIN += 1 WIN += 1
break break
waiter.order_list.pop()
print(WIN, LOSSE - WIN) print(WIN, LOSSE - WIN)
# ai settings # ai settings
@ -552,7 +553,7 @@ while True:
restaurant.tiles[waiter.y][waiter.x].clientState = "wait" restaurant.tiles[waiter.y][waiter.x].clientState = "wait"
waiter.orders = (waiter.x, waiter.y) waiter.orders = (waiter.x, waiter.y)
DEFINE += 1 DEFINE += 1
waiter.order_list.append(random.choice(CATEGORIES)) waiter.order_list.insert(0, random.choice(CATEGORIES))
if (waiter.x, waiter.y) == KITCHEN: if (waiter.x, waiter.y) == KITCHEN:
if waiter.orders: if waiter.orders:
restaurant.kitchen.append([waiter.orders[0], waiter.orders[1], 50]) restaurant.kitchen.append([waiter.orders[0], waiter.orders[1], 50])