package model.areas;

import model.Position;

import javafx.scene.paint.Color;

import java.util.List;

/**
 * Created by tgdflto1 on 30/09/16.
 */
public class GoalArea extends Area {
    private double height;
    private double width;
    private Position position;

	public GoalArea(double width, double height, Position position) {
        this.position = position;
        this.height = height;
        this.width = width;
		this.relocate(position.getX(), position.getY());
		this.setFill(Color.GREEN);
		this.getPoints().addAll(new Double[] { 0.0, 0.0, width, 0.0, width, height, 0.0, height });
	}

    @Override
    public List<Position> getEdges() {
        edges.add(new Position(this.width, this.height));
        return edges;
    }
}

@@ -26,22 +26,22 @@
 ort 
-model.Position
+java.util.List
 ;%0A%0Ai
@@ -72,38 +72,37 @@
 .Color;%0A
-%0A
 import 
-java.util.List
+model.Position
 ;%0A%0A/**%0A 
@@ -177,20 +177,17 @@
  Area %7B%0A
-    
+%09
 private 
@@ -201,20 +201,17 @@
 height;%0A
-    
+%09
 private 
@@ -224,20 +224,17 @@
  width;%0A
-    
+%09
 private 
@@ -320,24 +320,18 @@
 tion) %7B%0A
-        
+%09%09
 this.pos
@@ -348,24 +348,18 @@
 sition;%0A
-        
+%09%09
 this.hei
@@ -372,24 +372,18 @@
 height;%0A
-        
+%09%09
 this.wid
@@ -572,20 +572,17 @@
 %7D);%0A%09%7D%0A%0A
-    
+%09
 @Overrid
@@ -583,20 +583,17 @@
 verride%0A
-    
+%09
 public L
@@ -619,24 +619,18 @@
 ges() %7B%0A
-        
+%09%09
 edges.ad
@@ -644,16 +644,39 @@
 osition(
+this.position.getX() + 
 this.wid
@@ -681,33 +681,58 @@
 idth
+ / 2
 , this.
-height));%0A        
+position.getY() + this.height / 2));%0A%09%09
 retu
@@ -745,12 +745,9 @@
 es;%0A
-    
+%09
 %7D%0A%7D%0A

better goal point