Record Class GameClock
java.lang.Object
java.lang.Record
com.fortemate.dicechess.runtime.GameClock
- Record Components:
remainingMillis- milliseconds left on the bot's own clockopponentRemainingMillis- milliseconds left on the opponent's clockincrementMillis- the per-turn Fischer increment in milliseconds, ornullfor a control with no increment
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theincrementMillisrecord component.longReturns the value of theopponentRemainingMillisrecord component.longReturns the value of theremainingMillisrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GameClock
Creates an instance of aGameClockrecord class.- Parameters:
remainingMillis- the value for theremainingMillisrecord componentopponentRemainingMillis- the value for theopponentRemainingMillisrecord componentincrementMillis- the value for theincrementMillisrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
remainingMillis
public long remainingMillis()Returns the value of theremainingMillisrecord component.- Returns:
- the value of the
remainingMillisrecord component
-
opponentRemainingMillis
public long opponentRemainingMillis()Returns the value of theopponentRemainingMillisrecord component.- Returns:
- the value of the
opponentRemainingMillisrecord component
-
incrementMillis
Returns the value of theincrementMillisrecord component.- Returns:
- the value of the
incrementMillisrecord component
-