Skip to content

Commit 59ee9db

Browse files
authored
change this to that in compareTo method
1 parent f794b64 commit 59ee9db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Week4 - 8 Puzzle/src/Solver.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public int compareTo(SearchNode that)
5555
// When two search nodes have the same Manhattan priority,
5656
// break ties by comparing the Manhattan distances of the two boards.
5757
if (this.priority == that.priority)
58-
return this.bd.manhattan() - this.bd.manhattan();
58+
return this.bd.manhattan() - that.bd.manhattan();
5959
else
6060
return this.priority - that.priority;
6161
}

0 commit comments

Comments
 (0)