Cavoke
1.1.0
A Platform for creating and hosting multiplayer turn-based board games
Loading...
Searching...
No Matches
usergamestatistics.h
1
#ifndef CAVOKE_USERGAMESTATISTICS_H
2
#define CAVOKE_USERGAMESTATISTICS_H
3
4
#include <QJsonObject>
5
#include <QString>
6
struct
UserGameStatistics
{
7
public
:
8
UserGameStatistics
();
9
UserGameStatistics
(QString _game_id,
10
int
_time_played_sec,
11
int
_games_played,
12
double
_win_rate);
13
14
void
read(
const
QJsonObject &json);
15
static
void
write(QJsonObject &json);
16
17
QString game_id;
18
int
time_played_sec = 0;
19
int
games_played = 0;
20
double
win_rate = 0;
21
22
private
:
23
static
inline
const
QString GAME_ID =
"game_id"
;
24
static
inline
const
QString TIME_PLAYED_SEC =
"time_played_sec"
;
25
static
inline
const
QString GAMES_PLAYED =
"games_played"
;
26
static
inline
const
QString WIN_RATE =
"win_rate"
;
27
};
28
29
#endif
// CAVOKE_USERGAMESTATISTICS_H
UserGameStatistics
Definition:
usergamestatistics.h:6
client
entities
usergamestatistics.h
Generated by
1.9.6