Browse Source

Added note about tuple ordering

master
iamsosmart19 3 years ago
parent
commit
27c08293aa
  1. 3
      main.py

3
main.py

@ -1,4 +1,5 @@
#!/usr/bin/env python3
#(height, width)
import random as rnd
from enum import Enum
@ -43,7 +44,7 @@ def nextSquare(passenger, grid):
if manhattanDistance(passenger.dest, i) < manhattanDistance(passenger.dest, passenger.curr):
candidati.append(i)
for i in candidati:
if grid[i[0]][i[1]].typ == SquareType.AISLE: #this should work well enough for one aisle plane
if grid[i[0]][i[1]].typ == SquareType.AISLE and grid[i[0]][i[1]].occupant != None: #this should work well enough for one aisle plane
return i
#todo: implement shufflin'
return candidati[0]

Loading…
Cancel
Save