.
.
This commit is contained in:
parent
2dadd020c6
commit
aee0fcf2f5
14
board
14
board
@ -231,24 +231,26 @@ if __name__ == '__main__':
|
||||
|
||||
if currentNode.xPos != parentNode.xPos:
|
||||
if currentNode.xPos > parentNode.xPos:
|
||||
direction = "E"
|
||||
direction = "EAST"
|
||||
objectArray[0].xPos = objectArray[0].xPos + 1
|
||||
else:
|
||||
direction = "W"
|
||||
direction = "WEST"
|
||||
objectArray[0].xPos = objectArray[0].xPos - 1
|
||||
else:
|
||||
if currentNode.yPos > parentNode.yPos:
|
||||
direction = "S"
|
||||
direction = "SOUTH"
|
||||
objectArray[0].yPos = objectArray[0].yPos + 1
|
||||
else:
|
||||
direction = "N"
|
||||
direction = "NORTH"
|
||||
objectArray[0].yPos = objectArray[0].yPos - 1
|
||||
time.sleep(1)
|
||||
print("NEXT DIRECTION: " + direction)
|
||||
print("ACTION: TURN TO " + direction)
|
||||
### OPIDSZ TUTAJ
|
||||
|
||||
draw(15, objectArray, pathToTarget, 1)
|
||||
pygame.display.update()
|
||||
print(index)
|
||||
drawFull(index)
|
||||
|
||||
time.sleep(5)
|
||||
quit()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user