From fc6a719351738464672f0b41fc0aa86870a89471 Mon Sep 17 00:00:00 2001 From: Kamila Bobkowska Date: Thu, 7 May 2020 16:03:35 +0000 Subject: [PATCH] implementation for 2nd individual project --- Main.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Main.py b/Main.py index 0df3384..ca05049 100644 --- a/Main.py +++ b/Main.py @@ -65,10 +65,10 @@ def drawGrid(grid, size): #glass img = garbageR elif grid[row][column] == 4: - #organic + #cardboard img = garbageBL elif grid[row][column] == 5: - #mixede + #metal img = garbageBLK elif row == TheDump[:,0] and column == TheDump[:,1]: grid[row][column] = 0 @@ -172,15 +172,13 @@ while not done: Xz=np.where(all==x)[0] x =[item for item, count in collections.Counter(Xz).items() if count > 1] predicted=numbering.pred(dumpsters[x[0]].numberx,dumpsters[x[0]].numbery) + + #recognizing whether a house is our client and trying to collect trash if(predicted not in paying_customers): print("House number is: ",predicted," but it is not our customer") - elif GT.collectingTrash(dumpsters, x[0]): - dumpsters[x[0]].empty() - print("House number is: ",predicted) - elif GT.amIFull(): - print("DUMPSTER TRUCK FULL") else: - print("No more space for this kind of trash") + print("House number is: ",predicted) + GT.collectingTrash(dumpsters, x[0])