Cavoke  1.1.0
A Platform for creating and hosting multiplayer turn-based board games
Loading...
Searching...
No Matches
UserGameStatistics Struct Reference

Public Member Functions

 UserGameStatistics (QString _game_id, int _time_played_sec, int _games_played, double _win_rate)
 
void read (const QJsonObject &json)
 

Static Public Member Functions

static void write (QJsonObject &json)
 

Public Attributes

QString game_id
 
int time_played_sec = 0
 
int games_played = 0
 
double win_rate = 0
 

Detailed Description

Definition at line 6 of file usergamestatistics.h.

Constructor & Destructor Documentation

◆ UserGameStatistics()

UserGameStatistics::UserGameStatistics ( QString  _game_id,
int  _time_played_sec,
int  _games_played,
double  _win_rate 
)

Definition at line 6 of file usergamestatistics.cpp.

Member Function Documentation

◆ read()

void UserGameStatistics::read ( const QJsonObject &  json)

Definition at line 16 of file usergamestatistics.cpp.

◆ write()

void UserGameStatistics::write ( QJsonObject &  json)
static

Definition at line 31 of file usergamestatistics.cpp.

Member Data Documentation

◆ game_id

QString UserGameStatistics::game_id

Definition at line 17 of file usergamestatistics.h.

◆ games_played

int UserGameStatistics::games_played = 0

Definition at line 19 of file usergamestatistics.h.

◆ time_played_sec

int UserGameStatistics::time_played_sec = 0

Definition at line 18 of file usergamestatistics.h.

◆ win_rate

double UserGameStatistics::win_rate = 0

Definition at line 20 of file usergamestatistics.h.


The documentation for this struct was generated from the following files: