Record Class LinePreference.Builder<I>
java.lang.Object
java.lang.Record
dev.twilite.game.simulation.rules.preference.LinePreference.Builder<I>
- Type Parameters:
I- plugin-defined input for each run- Record Components:
scorePerNode- score added to each node along a clear line
- Enclosing class:
LinePreference
Builder for line preference scoring.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionendBonus(int endBonus) Builds a line preference task.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thescorePerNoderecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Builder
public Builder(int scorePerNode) Creates an instance of aBuilderrecord class.- Parameters:
scorePerNode- the value for thescorePerNoderecord component
-
-
Method Details
-
endBonus
Builds a line preference task.- Parameters:
endBonus- extra score added to the final clear node in each line
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
scorePerNode
public int scorePerNode()Returns the value of thescorePerNoderecord component.- Returns:
- the value of the
scorePerNoderecord component
-