Fix going to target in goToTarget method
Disabled trying to retrieve moves from empty movement list.
This commit is contained in:
parent
d5c9f5f801
commit
ab1b4e9efc
@ -28,6 +28,7 @@ class AutomaticMovement:
|
||||
self.targetCoords = (self.actualTarget.rect.x - self.leftUiWidth, self.actualTarget.rect.y)
|
||||
self.movesList = self.a_Star()
|
||||
if self.movesList is not None:
|
||||
if len(self.movesList) > 0:
|
||||
self.nextMove = self.movesList[0]
|
||||
else:
|
||||
self.actualTarget = None
|
||||
|
Loading…
Reference in New Issue
Block a user