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