package map;

import java.awt.Shape;

public abstract class Obstruction {
	
	public abstract Shape getShape();
}

@@ -29,16 +29,46 @@
 t.Shape;
+%0Aimport java.awt.geom.Point2D;
 %0A%0Apublic
@@ -134,10 +134,686 @@
 hape();%0A
+%09%0A%09public static Obstruction getObstructionFromEntry(Entity e)%09%7B%0A%09%09TemplateXmlParser txmlp = new TemplateXmlParser(e);%0A%09%09if(txmlp.isObstruction())%09%7B%0A%09%09%09Point2D.Float location = txmlp.getObstructionLocation();%0A%09%09%09if(txmlp.isSquare())%09%7B%0A%09%09%09%09return new SquareObstruction(location.x,%0A%09%09%09%09%09%09%09%09%09%09location.y,%0A%09%09%09%09%09%09%09%09%09%09txmlp.getObstructionWidth(),%0A%09%09%09%09%09%09%09%09%09%09txmlp.getObstructionHeight(),%0A%09%09%09%09%09%09%09%09%09%09e.getTheta());%0A%09%09%09%7D%0A%09%09%09else if(txmlp.isCircle())%09%7B%0A%09%09%09%09return new CircleObstruction(location.x,%0A%09%09%09%09%09%09%09%09%09%09%09location.y,%0A%09%09%09%09%09%09%09%09%09%09%09txmlp.getObstructionRadius());%0A%09%09%09%7D%0A%09%09%09else%09%7B%0A%09%09%09%09throw new ParsingException(%22Entity needs to be either a Cirlce or a Square%22);%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return null;%0A%09%7D%0A
 %7D%0A

Add Obstruction.getObstructionFromEntity method