| | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Objects; |
| | | import java.util.Optional; |
| | | |
| | | /** |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public boolean equals(Object obj) { |
| | | if (this == obj) return true; |
| | | if (!(obj instanceof NavigateNode)) return false; |
| | | NavigateNode that = (NavigateNode) obj; |
| | | return this.x == that.x && this.y == that.y; |
| | | } |
| | | |
| | | @Override |
| | | public int hashCode() { |
| | | return Objects.hash(x, y); |
| | | } |
| | | |
| | | public void reset() { |
| | | this.F = 0; |
| | | this.G = 0; |
| | | this.H = 0; |
| | | this.parent = null; |
| | | this.turningPoint = null; |
| | | this.direction = null; |
| | | this.lastDistance = null; |
| | | this.moveDistance = null; |
| | | this.weight = null; |
| | | this.codeData = null; |
| | | } |
| | | |
| | | } |