add walk to new guest
This commit is contained in:
parent
74af28c7c2
commit
6790341472
21
main.py
21
main.py
@ -65,18 +65,21 @@ if __name__ == "__main__":
|
|||||||
plate.changePlate('plate-empty.png', 'test-{}'.format(randomPlate))
|
plate.changePlate('plate-empty.png', 'test-{}'.format(randomPlate))
|
||||||
|
|
||||||
def addGuest():
|
def addGuest():
|
||||||
if randrange(15) == 8:
|
if randrange(10) == 5 and path == '':
|
||||||
newGuests.append(Guest(graphics))
|
newGuests.append(Guest(graphics))
|
||||||
|
|
||||||
guest = newGuests[0]
|
guest = newGuests[len(newGuests) - 1]
|
||||||
goal = [0, 0]
|
goal = [0, 0]
|
||||||
|
|
||||||
if guest.cord[0] == 2 or guest.cord[1] == 9:
|
# if guest.cord[0] == 2 or guest.cord[1] == 9:
|
||||||
goal[0] = guest.cord[0] - 1
|
# goal[0] = guest.cord[0] - 1
|
||||||
goal[1] = guest.cord[1]
|
# goal[1] = guest.cord[1]
|
||||||
else:
|
#
|
||||||
goal[0] = guest.cord[0] + 1
|
# else:
|
||||||
goal[1] = guest.cord[1]
|
# goal[0] = guest.cord[0] + 1
|
||||||
|
# goal[1] = guest.cord[1]
|
||||||
|
goal[0] = guest.cord[0]
|
||||||
|
goal[1] = guest.cord[1]
|
||||||
|
|
||||||
tree.TasksList('order', goal, [waiter.X, waiter.Y])
|
tree.TasksList('order', goal, [waiter.X, waiter.Y])
|
||||||
|
|
||||||
@ -103,8 +106,6 @@ if __name__ == "__main__":
|
|||||||
sys.exit()
|
sys.exit()
|
||||||
break
|
break
|
||||||
|
|
||||||
if event.key == pygame.K_d:
|
|
||||||
print(queue)
|
|
||||||
if event.key == pygame.K_s:
|
if event.key == pygame.K_s:
|
||||||
waitPosition = [waiter.X, waiter.Y]
|
waitPosition = [waiter.X, waiter.Y]
|
||||||
tree.TasksList('check', [2, 3], waitPosition)
|
tree.TasksList('check', [2, 3], waitPosition)
|
||||||
|
Loading…
Reference in New Issue
Block a user