
package pathfinder;

public class PathPoint {
    public int x;
    public int y;
    public float distance;
    public Point zBodu;
    public int index1=0;
    public int index2=0;
    
 
    
 public PathPoint(int x, int y,int distance, Point zBodu){
 this.x=x;
 this.y=y;
 this.distance=distance;
 this.zBodu=zBodu;
 }

 public Point retPoint(){
 return(new Point(this.x,this.y));
 }
 
 public float distance(Point y){
     float pom1=Math.abs(this.x -y.getX());
     float pom2=Math.abs(this.y -y.getY());
     
 return(this.distance + (float)Math.sqrt((double)(pom1*pom1+pom2*pom2)));
 }
 public void tlac(){
      System.out.print("[" + x + "," +y+"] distance= "+distance+ ", z bodu ");
      this.zBodu.tlac();
      System.out.print(" index ["+index1+","+index2+"]");
      System.out.println();
}
}