TDLib
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
stakeDiceState Class Referencefinal

Inherits Object.

Description

Describes state of the stake dice.

Public Member Functions

 stakeDiceState ()
 
 stakeDiceState (string const &state_hash_, int53 stake_gram_amount_, array< int53 > &&suggested_stake_gram_amounts_, int32 current_streak_, array< int32 > &&prize_per_mille_, int32 streak_prize_per_mille_)
 
void store (TlStorerToString &s, const char *field_name) const final
 
- Public Member Functions inherited from TlObject
TlObject & operator= (const TlObject &)=delete
 
TlObject & operator= (TlObject &&)=default
 
virtual void store (TlStorerCalcLength &s) const
 
virtual void store (TlStorerUnsafe &s) const
 
 TlObject ()=default
 
 TlObject (const TlObject &)=delete
 
 TlObject (TlObject &&)=default
 
virtual ~TlObject ()=default
 

Public Attributes

int32 current_streak_
 The number of rolled sixes towards the streak; 0-2.
 
array< int32 > prize_per_mille_
 The number of Grams received by the user for each 1000 Grams staked if the dice outcome is 1-6 correspondingly; may be empty if the stake dice can't be sent by the current user.
 
int53 stake_gram_amount_
 The amount of TON Grams staked in the previous roll; in the smallest units of the currency.
 
string state_hash_
 Hash of the state to use for sending the next dice; may be empty if the stake dice can't be sent by the current user.
 
int32 streak_prize_per_mille_
 The number of Grams received by the user for each 1000 Grams staked if the dice outcome is 6 three times in a row with the same stake.
 
array< int53 > suggested_stake_gram_amounts_
 The amounts of Grams that are suggested to be staked; in the smallest units of the currency.
 

Static Public Attributes

static const std::int32_t ID = 560859690
 Identifier uniquely determining a type of the object.
 

Constructor & Destructor Documentation

◆ stakeDiceState() [1/2]

Describes state of the stake dice.

◆ stakeDiceState() [2/2]

stakeDiceState ( string const &  state_hash_,
int53  stake_gram_amount_,
array< int53 > &&  suggested_stake_gram_amounts_,
int32  current_streak_,
array< int32 > &&  prize_per_mille_,
int32  streak_prize_per_mille_ 
)

Describes state of the stake dice.

Parameters
[in]state_hash_Hash of the state to use for sending the next dice; may be empty if the stake dice can't be sent by the current user.
[in]stake_gram_amount_The amount of TON Grams staked in the previous roll; in the smallest units of the currency.
[in]suggested_stake_gram_amounts_The amounts of Grams that are suggested to be staked; in the smallest units of the currency.
[in]current_streak_The number of rolled sixes towards the streak; 0-2.
[in]prize_per_mille_The number of Grams received by the user for each 1000 Grams staked if the dice outcome is 1-6 correspondingly; may be empty if the stake dice can't be sent by the current user.
[in]streak_prize_per_mille_The number of Grams received by the user for each 1000 Grams staked if the dice outcome is 6 three times in a row with the same stake.

Member Function Documentation

◆ store()

void store ( TlStorerToString &  s,
const char *  field_name 
) const
finalvirtual

Helper function for to_string method. Appends string representation of the object to the storer.

Parameters
[in]sStorer to which object string representation will be appended.
[in]field_nameObject field_name if applicable.

Implements TlObject.


The documentation for this class was generated from the following file: