From 27c08293aa5d2c735a3a1ddd1f87d6707c69a359 Mon Sep 17 00:00:00 2001 From: iamsosmart19 Date: Wed, 23 Mar 2022 09:42:00 +1100 Subject: [PATCH] Added note about tuple ordering --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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]