Cavoke  1.1.0
A Platform for creating and hosting multiplayer turn-based board games
Loading...
Searching...
No Matches
player.h
1#ifndef CAVOKE_PLAYER_H
2#define CAVOKE_PLAYER_H
3
4#include <QtCore/QJsonObject>
5#include <QtCore/QString>
6#include "user.h"
7struct Player {
8public:
9 Player();
10 Player(int _player_id, User _user);
11
12 void read(const QJsonObject &json);
13 static void write(QJsonObject &json);
14
15 int player_id{};
16 User user;
17
18private:
19 static inline const QString PLAYER_ID = "player_id";
20 static inline const QString USER = "user";
21};
22
23#endif // CAVOKE_PLAYER_H
Definition: player.h:7
Definition: user.h:6