@Override
public Point getPositionAt(PositionType type){
switch(type){
case NORTHWEST:
return new Point(position.getX()-width/2,position.getY()-height/2);
case NORTH:
return new Point(position.getX(),position.getY()-height/2);
case NORTHEAST:
return new Point(position.getX()+width/2,position.getY()-height/2);
case WEST:
return new Point(position.getX()-width/2,position.getY());
case CENTER:
return new Point(position);
case EAST:
return new Point(position.getX()+width/2,position.getY());
case SOUTHWEST:
return new Point(position.getX()-width/2,position.getY()+height/2);
case SOUTH:
return new Point(position.getX(),position.getY()+height/2);
case SOUTHEAST:
return new Point(position.getX()+width/2,position.getY()+height/2);
default:
throw new IllegalArgumentException("Wrong dirction argument.");
}
}