Record Class DoubleOfferAction
java.lang.Object
java.lang.Record
com.fortemate.dicechess.runtime.DoubleOfferAction
- Record Components:
offerDouble-trueto offer a stake double,falseto proceed to rollisResign-trueto resign the game
A bot's response to a
doubleOpportunity delivery.-
Constructor Summary
ConstructorsConstructorDescriptionDoubleOfferAction(boolean offerDouble) Creates a double offer action.DoubleOfferAction(boolean offerDouble, boolean isResign) Creates an instance of aDoubleOfferActionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic DoubleOfferActiondecline()Synonym forroll(): declines to offer a double and proceeds to roll.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisResign()Returns the value of theisResignrecord component.static DoubleOfferActionoffer()Returns an action that offers a stake double.booleanReturns the value of theofferDoublerecord component.static DoubleOfferActionresign()Returns an action that resigns the game.static DoubleOfferActionroll()Returns an action that declines to double and proceeds to roll.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DoubleOfferAction
public DoubleOfferAction(boolean offerDouble) Creates a double offer action.- Parameters:
offerDouble-trueto offer a stake double,falseto proceed to roll
-
DoubleOfferAction
public DoubleOfferAction(boolean offerDouble, boolean isResign) Creates an instance of aDoubleOfferActionrecord class.- Parameters:
offerDouble- the value for theofferDoublerecord componentisResign- the value for theisResignrecord component
-
-
Method Details
-
offer
Returns an action that offers a stake double.- Returns:
- an offering action
-
roll
Returns an action that declines to double and proceeds to roll.- Returns:
- a rolling action
-
decline
Synonym forroll(): declines to offer a double and proceeds to roll.- Returns:
- a rolling action
-
resign
Returns an action that resigns the game.- Returns:
- a resigning action
-
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. -
offerDouble
public boolean offerDouble()Returns the value of theofferDoublerecord component.- Returns:
- the value of the
offerDoublerecord component
-
isResign
-