Record Class DoubleDecisionContext
java.lang.Object
java.lang.Record
com.fortemate.dicechess.runtime.DoubleDecisionContext
- Record Components:
gameId- the game's idseat- the responder's seat, exactlyWhiteorBlackversion- the authoritative game-state version carried by the deliverydfen- the pre-roll position; no dice are presentclock- the game clock, ornullfor an untimed gamedoubling- the complete doubling state and pending response decision
- All Implemented Interfaces:
DoublingContext
public record DoubleDecisionContext(String gameId, String seat, long version, String dfen, GameClock clock, DoublingState doubling)
extends Record
implements DoublingContext
Authenticated pre-roll context for deciding an opponent's pending stake double offer.
This context is structurally dice-free: the platform resolves the double offer before
revealing the roll. Note that DoublingContext.turnSeat() identifies the opponent whose turn will resume
after an acceptance, whereas seat() identifies the responder currently deciding.
Warning: The DFEN active colour (turn indicator) in this context reflects the offerer
(whose turn was paused to deliver the offer), not the responder. Strategies evaluating position
or material must evaluate relative to seat(), not the DFEN active colour.
-
Constructor Summary
ConstructorsConstructorDescriptionDoubleDecisionContext(String gameId, String seat, long version, String dfen, GameClock clock, DoublingState doubling) Creates a validated double-decision context. -
Method Summary
Modifier and TypeMethodDescriptionclock()Returns the value of theclockrecord component.decision()Returns the typed doubling decision.dfen()Returns the value of thedfenrecord component.doubling()Returns the value of thedoublingrecord component.final booleanIndicates whether some other object is "equal to" this one.gameId()Returns the value of thegameIdrecord component.final inthashCode()Returns a hash code value for this object.Returns the seat that offered the stake double.seat()Returns the value of theseatrecord component.final StringtoString()Returns a string representation of this record class.longversion()Returns the value of theversionrecord component.Methods inherited from interface DoublingContext
cubeOwner, cubeValue, currency, currentStake, decisionId, initialStake, maximumMultiplier, mayOfferDouble, proposedStake, turnSeat
-
Constructor Details
-
DoubleDecisionContext
public DoubleDecisionContext(String gameId, String seat, long version, String dfen, GameClock clock, DoublingState doubling) Creates a validated double-decision context.
-
-
Method Details
-
decision
Description copied from interface:DoublingContextReturns the typed doubling decision.- Specified by:
decisionin interfaceDoublingContext- Returns:
- the doubling decision
-
offeredBy
Returns the seat that offered the stake double.- Returns:
- the offerer's seat
-
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. -
gameId
Returns the value of thegameIdrecord component.- Specified by:
gameIdin interfaceDoublingContext- Returns:
- the value of the
gameIdrecord component
-
seat
Returns the value of theseatrecord component.- Specified by:
seatin interfaceDoublingContext- Returns:
- the value of the
seatrecord component
-
version
public long version()Returns the value of theversionrecord component.- Specified by:
versionin interfaceDoublingContext- Returns:
- the value of the
versionrecord component
-
dfen
Returns the value of thedfenrecord component.- Specified by:
dfenin interfaceDoublingContext- Returns:
- the value of the
dfenrecord component
-
clock
Returns the value of theclockrecord component.- Specified by:
clockin interfaceDoublingContext- Returns:
- the value of the
clockrecord component
-
doubling
Returns the value of thedoublingrecord component.- Specified by:
doublingin interfaceDoublingContext- Returns:
- the value of the
doublingrecord component
-