public static int getDirection(BoardNode node1, BoardNode node2){
		int x1 = node1.getX();
		int y1 = node1.getY();
		int x2 = node2.getX();
		int y2 = node2.getY();
		


		if(isDown(node1, node2) == true){
			node2.setDir(DOWN);
		}
		else if(isUp(node1, node2) == true){
			node2.setDir(UP);
			}
		else if(isLeft(node1, node2) == true){
			node2.setDir(LEFT);
		}
		else if(isRight(node1, node2) == true){
			node2.setDir(RIGHT);
		}
		else if(isDownLeft(node1, node2) == true){
			node2.setDir(DOWNLEFT);
		}
		else if(isDownRight(node1, node2) == true){
			node2.setDir(DOWNRIGHT);
		}
		else if(isUpRight(node1, node2) == true){
			node2.setDir(UPRIGHT);
		}
		else if(isUpLeft(node1, node2) == true){
			node2.setDir(UPLEFT);
		}
		else{
			node2.setDir(-1);
		}

		return node2.getDir();
	
	}