public static void extendHorizontal(PathPart pp){
		Point first = pp.first;
		Point second = pp.last;
		if(!first.up.isObstacle && !second.up.isObstacle){
			i.previous();
			PathPart one = new PathPart(first, first.up);
			i.add(one);
			PathPart two = new PathPart(first.up, second.up);
			first.up.isObstacle = true;
			second.up.isObstacle = true;
			first.up.inPath = true;
			second.up.inPath = true;
			i.next();
			i.set(two);
			PathPart three = new PathPart(second.up, second);
			i.add(three);
			for(int j = 0; j < 4; ++j){
				i.previous();
			}
		}
		if(!first.down.isObstacle && !second.down.isObstacle){
			i.previous();
			PathPart one = new PathPart(first, first.down);
			i.add(one);
			PathPart two = new PathPart(first.down, second.down);
			first.down.isObstacle = true;
			second.down.isObstacle = true;
			first.down.inPath = true;
			second.down.inPath = true;
			i.next();
			i.set(two);
			PathPart three = new PathPart(second.down, second);
			i.add(three);
			for(int j = 0; j < 4; ++j){
				i.previous();
			}
		}
	}