We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f794b64 commit 59ee9dbCopy full SHA for 59ee9db
Week4 - 8 Puzzle/src/Solver.java
@@ -55,7 +55,7 @@ public int compareTo(SearchNode that)
55
// When two search nodes have the same Manhattan priority,
56
// break ties by comparing the Manhattan distances of the two boards.
57
if (this.priority == that.priority)
58
- return this.bd.manhattan() - this.bd.manhattan();
+ return this.bd.manhattan() - that.bd.manhattan();
59
else
60
return this.priority - that.priority;
61
}
0 commit comments