19 virtual QJsonObject
toJson()
const override;
20 virtual void doWork()
override;
virtual QJsonObject toJson() const override
Every command must define how its members can be serialized.
Definition: preparenewgamecommand.cpp:24
PrepareNewGameCommand(Timer::TimerMSec timeStamp, bool isPlayerOne, unsigned int terrainSeed)
Definition: preparenewgamecommand.cpp:9
The PrepareNewGameCommand is sent to the client when a multiplayer session begins to synchronize the ...
Definition: preparenewgamecommand.h:13
unsigned int m_terrainSeed
Definition: preparenewgamecommand.h:28
bool m_isPlayerOne
Definition: preparenewgamecommand.h:27
unsigned int terrainSeed() const
Definition: preparenewgamecommand.cpp:49
Commands
The Commands enum stores all command types with corresponding ID.
Definition: commands.h:9
virtual Commands commandType() const override
Every Command must specify its type.
Definition: preparenewgamecommand.cpp:39
signed int TimerMSec
Definition: timer.h:22
virtual void doWork() override
Every Commands must define its effects on the receiving game.
Definition: preparenewgamecommand.cpp:32
bool isPlayerOne() const
Definition: preparenewgamecommand.cpp:44
Definition: eventhandler.cpp:18
Timer::TimerMSec timeStamp() const
get the time as counted by the sending game that this command was created and sent ...
Definition: abstractcommand.cpp:54
The AbstractCommand class defines the interface that every command has to implement.
Definition: abstractcommand.h:23