pub struct RuneBoxStanding {
pub player_id: i64,
pub username: String,
pub name: Option<PlayerName>,
pub round_wins: u8,
pub total_score: i32,
pub eliminated: bool,
}Expand description
One player’s standing in a RuneBox match, as of the end of some round.
A match is several rounds; ScoreInfo describes a single round. Both are
sent on RuneBoxRoundEnded because they answer different questions — “who
won this round” and “who is winning the match”.
Carries no word list, by construction. RuneBox found-sets are independent, so another player’s words stay worth full value to you and naming them at round end would hand over the answers for a board that is still fresh in everyone’s memory.
Fields§
§player_id: i64Serializes as a quoted STRING, like every snowflake on this wire — an id above 2^53 silently loses precision as a JSON number in JS.
username: StringThe player’s raw Discord username: the unique handle. Display
name instead when it is present.
name: Option<PlayerName>What to call this player. Absent from servers older than protocol
0.20; fall back to username.
round_wins: u8Rounds this player has won outright.
The deciding number in a two-player match, which is best-of-3 rather than elimination — there is nobody to eliminate until it is over. In a three-or-more-player match the field still counts round wins, but elimination is what decides the match, so nothing reads it.
total_score: i32This player’s scores summed across every round played so far.
eliminated: boolTrue once this player has been eliminated and moved to spectating.
Trait Implementations§
Source§impl Clone for RuneBoxStanding
impl Clone for RuneBoxStanding
Source§fn clone(&self) -> RuneBoxStanding
fn clone(&self) -> RuneBoxStanding
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more