(Node block, Block start, Block end, int x, int y, int z)
| 486 | } |
| 487 | |
| 488 | private static Node getRelative(Node block, Block start, Block end, int x, int y, int z) { |
| 489 | Block b = block.block.getRelative(x, y, z); |
| 490 | int score = score(block, start, end); |
| 491 | Node node = new Node(b, score); |
| 492 | node.parent = block; |
| 493 | return node; |
| 494 | } |
| 495 | |
| 496 | private static int score(Node node, Block start, Block end) { |
| 497 | return distance(node.block, start) + distance(node.block, end) * 2; |