Interface DoublingContext

All Known Implementing Classes:
DoubleDecisionContext, DoubleOpportunityContext

public interface DoublingContext
Common pre-roll context for stake-doubling decisions in a staked game.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the game clock, or null for an untimed game.
    default String
    Returns the seat owning the cube, or null if centered.
    default int
    Returns the doubling cube multiplier.
    default String
    Returns the stake currency name.
    default long
    Returns the current active stake in whole currency units.
    Returns the typed doubling decision.
    default String
    Returns the opaque decision identifier for this doubling episode.
    Returns the pre-roll position; no dice are present.
    Returns the complete doubling state.
    Returns the game's unique identifier.
    default long
    Returns the initial stake in whole currency units.
    default int
    Returns the configured maximum multiplier cap.
    default boolean
    Returns whether the decision actor is eligible to offer a double.
    default long
    Returns the proposed doubled stake in whole currency units.
    Returns the decision actor's seat, exactly White or Black.
    default String
    Returns the seat whose turn it is.
    long
    Returns the authoritative game-state version carried by the delivery.
  • Method Details

    • gameId

      String gameId()
      Returns the game's unique identifier.
      Returns:
      the game id
    • seat

      String seat()
      Returns the decision actor's seat, exactly White or Black.
      Returns:
      the seat
    • version

      long version()
      Returns the authoritative game-state version carried by the delivery.
      Returns:
      the version
    • dfen

      String dfen()
      Returns the pre-roll position; no dice are present.
      Returns:
      the DFEN string
    • clock

      GameClock clock()
      Returns the game clock, or null for an untimed game.
      Returns:
      the clock or null
    • doubling

      DoublingState doubling()
      Returns the complete doubling state.
      Returns:
      the doubling state
    • decision

      DoublingDecision decision()
      Returns the typed doubling decision.
      Returns:
      the doubling decision
    • decisionId

      default String decisionId()
      Returns the opaque decision identifier for this doubling episode.
      Returns:
      the decision id
    • currentStake

      default long currentStake()
      Returns the current active stake in whole currency units.
      Returns:
      the current stake
    • proposedStake

      default long proposedStake()
      Returns the proposed doubled stake in whole currency units.
      Returns:
      the proposed stake
    • initialStake

      default long initialStake()
      Returns the initial stake in whole currency units.
      Returns:
      the initial stake
    • cubeValue

      default int cubeValue()
      Returns the doubling cube multiplier.
      Returns:
      the cube value
    • cubeOwner

      default String cubeOwner()
      Returns the seat owning the cube, or null if centered.
      Returns:
      the cube owner seat or null
    • maximumMultiplier

      default int maximumMultiplier()
      Returns the configured maximum multiplier cap.
      Returns:
      the maximum multiplier
    • mayOfferDouble

      default boolean mayOfferDouble()
      Returns whether the decision actor is eligible to offer a double.
      Returns:
      true if eligible to offer
    • turnSeat

      default String turnSeat()
      Returns the seat whose turn it is.
      Returns:
      the turn seat
    • currency

      default String currency()
      Returns the stake currency name.
      Returns:
      the currency name