diff --git a/main.py b/main.py index 7e5f293..3c04209 100644 --- a/main.py +++ b/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]