public void analyzePath() {
		addedLength = actualLongestPath.getLength();
		Direction dir = board.getWaterDirection();
		List<Pipe> path = actualLongestPath.getPath();
		for (int i = 0; i < path.size(); i++) {
			if (path.get(i).isCorner()) {
				if (!replaceWithCross(path.get(i), i, dir))
					if (i + 1 < path.size() && path.get(i + 1).isCorner())
						if (twoCorners(path.get(i), path.get(i + 1), dir))
							addStraightPipes(path, i, dir);
			}
			dir = path.get(i).modifyDirection(dir);
		}
		actualLongestPath.setPath(path);
		actualLongestPath.setLength(addedLength);
		if (longestPath == null
				|| longestPath.getLength() < actualLongestPath.getLength())
			longestPath = actualLongestPath;
	}