Added DFS support

This commit is contained in:
Magdalena Wilczyńska 2019-05-12 19:38:11 +02:00
parent 0652da713d
commit 9b22d4a166

View File

@ -17,7 +17,7 @@ class GC(Cell):
def move(self, direction, environment):
self.x, self.y = movement(environment, self.x, self.y)[0][direction]
self.update_rect(self.x, self.y)
self.moves_made = self.moves_made + 1
self.moves_made = self.moves_made + 1 #moves counter
print(check_moves(environment, self.x, self.y,direction))
@ -59,4 +59,5 @@ class GC(Cell):
self.moves.pop()
return
self.x, self.y = self.moves.pop()
self.moves_made = self.moves_made + 1 #moves counter
self.update_rect(self.x,self.y)