Record Class GoalY
java.lang.Object
java.lang.Record
com.zenith.feature.pathfinder.goals.GoalY
- All Implemented Interfaces:
Goal
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doublecalculate(int goalY, int currentY) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleheuristic(int x, int y, int z) booleanisInGoal(int x, int y, int z) intlevel()Returns the value of thelevelrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GoalY
public GoalY(int level) Creates an instance of aGoalYrecord class.- Parameters:
level- the value for thelevelrecord component
-
-
Method Details
-
isInGoal
-
heuristic
-
calculate
public static double calculate(int goalY, int currentY) -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
level
public int level()Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-