MCPcopy Create free account
hub / github.com/MolinDeng/Princeton-algs4 / Node

Method Node

04Lab-8Puzzle/Solver.java:25–30  ·  view source on GitHub ↗
(Board b, Node p, int m)

Source from the content-addressed store, hash-verified

23 final int manhattanScore;
24
25 Node(Board b, Node p, int m) {
26 board = b;
27 prev = p;
28 moves = m;
29 manhattanScore = m + b.manhattan();
30 }
31
32 public int compareTo(Node that) {
33 return Integer.compare(this.manhattanScore, that.manhattanScore);

Callers

nothing calls this directly

Calls 1

manhattanMethod · 0.45

Tested by

no test coverage detected