Record Class DrawDecisionContext

java.lang.Object
java.lang.Record
com.fortemate.dicechess.runtime.DrawDecisionContext
Record Components:
gameId - the game's id
seat - the bot's seat, exactly White or Black
version - the authoritative game-state version carried by the delivery
dfen - the pre-roll position; no dice are present
clock - the game clock, or null for an untimed game

public record DrawDecisionContext(String gameId, String seat, long version, String dfen, GameClock clock) extends Record
Authenticated pre-roll context for deciding an opponent's pending draw offer.

This context deliberately has no legal moves or dice-dependent data: the platform requests a draw decision before revealing the roll.

  • Constructor Details

    • DrawDecisionContext

      public DrawDecisionContext(String gameId, String seat, long version, String dfen, GameClock clock)
      Creates a validated draw-decision context.
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • gameId

      public String gameId()
      Returns the value of the gameId record component.
      Returns:
      the value of the gameId record component
    • seat

      public String seat()
      Returns the value of the seat record component.
      Returns:
      the value of the seat record component
    • version

      public long version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • dfen

      public String dfen()
      Returns the value of the dfen record component.
      Returns:
      the value of the dfen record component
    • clock

      public GameClock clock()
      Returns the value of the clock record component.
      Returns:
      the value of the clock record component