Cavoke  1.1.0
A Platform for creating and hosting multiplayer turn-based board games
Loading...
Searching...
No Matches
gamestatistics.h
1#ifndef CAVOKE_GAMESTATISTICS_H
2#define CAVOKE_GAMESTATISTICS_H
3
4#include <QtCore/QJsonObject>
5#include <QtCore/QString>
7public:
9 GameStatistics(int _average_duration_sec,
10 int _average_players_count,
11 int _total_time_played_sec,
12 int _total_games_played);
13
14 void read(const QJsonObject &json);
15 static void write(QJsonObject &json);
16
17 int average_duration_sec = 0;
18 int average_players_count = 0;
19 int total_time_played_sec = 0;
20 int total_games_played = 0;
21
22private:
23 static inline const QString AVERAGE_DURATION_SEC = "average_duration_sec";
24 static inline const QString AVERAGE_PLAYERS_COUNT = "average_players_count";
25 static inline const QString TOTAL_TIME_PLAYED_SEC = "total_time_played_sec";
26 static inline const QString TOTAL_GAMES_PLAYED = "total_games_played";
27};
28
29#endif // CAVOKE_USERSTATISTICS_H