Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 145546e

Browse files
authored
Corrected the coordinates for source and target
1 parent e48fc86 commit 145546e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎UniDiAstarSearch.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ def aStarSearch(self, source, target):
406406

407407
successString = colored("Test Passed: ", "green")
408408
print(successString)
409-
print("The coordinates are SOURCE(", item[4], ",", item[5], ") , TARGET(", item[6], ",", item[7], ")", " || The result I'm getting: [", result[1], "] The result I should be getting: [", float(item[8][:-1]), "]")
409+
print("The coordinates are SOURCE(", item[5], ",", item[4], ") , TARGET(", item[7], ",", item[6], ")", " || The result I'm getting: [", result[1], "] The result I should be getting: [", float(item[8][:-1]), "]")
410410
print("The Path is: ", result[0])
411411
print("The number of nodes that have been visited are:", result[2])
412412
correct += 1
@@ -416,15 +416,15 @@ def aStarSearch(self, source, target):
416416

417417
unWalkablePath = colored("Test Failed: ", "blue")
418418
print(unWalkablePath)
419-
print("The coordinates are SOURCE(", item[4], ",", item[5], ") , TARGET(", item[6], ",", item[7], ")", " || The result I'm getting: [", result[1], "] The result I should be getting: [", float(item[8][:-1]), "]")
419+
print("The coordinates are SOURCE(", item[5], ",", item[4], ") , TARGET(", item[7], ",", item[6], ")", " || The result I'm getting: [", result[1], "] The result I should be getting: [", float(item[8][:-1]), "]")
420420
unWalkable += 1
421421
print("")
422422

423423
else:
424424

425425
failureString = colored("Test Failed: ", "red")
426426
print(failureString)
427-
print("The coordinates are SOURCE(", item[4], ",", item[5], ") , TARGET(", item[6], ",", item[7], ")", " || The result I'm getting: [", result[1], "] The result I should be getting: [", float(item[8][:-1]), "]")
427+
print("The coordinates are SOURCE(", item[5], ",", item[4], ") , TARGET(", item[7], ",", item[6], ")", " || The result I'm getting: [", result[1], "] The result I should be getting: [", float(item[8][:-1]), "]")
428428
print("The Path is: ", result[0])
429429
wrong += 1
430430

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /