/*
 * A Node wraps a Cell from the Map and includes
 * links to the neighbouring Nodes.
 */

public class Node
{
    public Node (Coordinate coord)
    {
        this(new Cell(coord));
    }
    
    public Node (Cell theCell)
    {
        this(theCell, null, null, null, null);
    }

    public Node (Cell theCell, Node up, Node down, Node left, Node right)
    {
        _theCell = theCell;
        _up = up;
        _down = down;
        _left = left;
        _right = right;
    }

    public Cell getCell ()
    {
        return _theCell;
    }

    @Override
    public int hashCode ()
    {
        return _theCell.hashCode();
    }

    @Override
    public boolean equals (Object obj)
    {
        if (obj == null)
            return false;

        if (this == obj)
            return true;
        
        if (getClass() == obj.getClass())
        {
            Node temp = (Node) obj;

            return temp._theCell.equals(_theCell);
        }

        return false;
    }

    private Cell _theCell;
    private Node _up;
    private Node _down;
    private Node _left;
    private Node _right;
}
@@ -128,23 +128,19 @@
 e (C
-oordinate coord
+ell theCell
 )%0A  
@@ -155,37 +155,34 @@
     
+_
 th
-is(new Cell(coord))
+eCell = theCell
 ;%0A    %7D%0A
     
@@ -177,20 +177,16 @@
 ;%0A    %7D%0A
-    
 %0A    pub
@@ -193,257 +193,227 @@
 lic 
-Node (Cell theCell)%0A    %7B%0A        this(theCell, null, null, null, null);%0A    %7D%0A%0A    public Node (Cell theCell, Node up, Node down, Node left, Node right)%0A    %7B%0A        _theCell = theCell
+void setUp (Node n)%0A    %7B%0A        _up = n;%0A    %7D%0A%0A    public void setDown (Node n)%0A    %7B%0A        _down = n
 ;%0A    
+%7D%0A%0A
     
-_up = up;%0A        _down = dow
+public void setLeft (Node n)%0A    %7B%0A        _left = 
 n;%0A    
+%7D%0A%0A
     
-_left = left;
+public void setRight (Node n)%0A    %7B
 %0A   
@@ -426,21 +426,17 @@
 right = 
-right
+n
 ;%0A    %7D%0A
@@ -962,24 +962,31 @@
 ell _theCell
+ = null
 ;%0A    privat
@@ -995,16 +995,23 @@
 Node _up
+ = null
 ;%0A    pr
@@ -1026,16 +1026,23 @@
 de _down
+ = null
 ;%0A    pr
@@ -1057,16 +1057,23 @@
 de _left
+ = null
 ;%0A    pr
@@ -1089,11 +1089,18 @@
 e _right
+ = null
 ;%0A%7D

Update Node.java