| | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * A*寻路算法Node节点 |
| | | */ |
| | | @Data |
| | | public class NavigateNode implements Comparable<NavigateNode>{ |
| | | public class NavigateNode implements Comparable<NavigateNode>, Cloneable, Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private int x;//坐标x |
| | | private int y;//坐标y |
| | |
| | | return Integer.compare(this.F, o.F); |
| | | } |
| | | |
| | | @Override |
| | | public NavigateNode clone() { |
| | | try { |
| | | return (NavigateNode) super.clone(); |
| | | } catch (CloneNotSupportedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | } |