19 virtual QJsonObject
toJson()
const override;
20 virtual void doWork()
override;
GameEndedCommand(Timer::TimerMSec timeStamp, bool youWin)
Definition: gameendedcommand.cpp:8
The GameEndedCommand signals that the remote game detected a winning or losing condition. It will display a victory or defeat screen accordingly.
Definition: gameendedcommand.h:13
Definition: commands.h:16
virtual QJsonObject toJson() const override
Every command must define how its members can be serialized.
Definition: gameendedcommand.cpp:21
bool youWin() const
Definition: gameendedcommand.h:24
bool m_youWin
Definition: gameendedcommand.h:27
Commands
The Commands enum stores all command types with corresponding ID.
Definition: commands.h:9
virtual void doWork() override
Every Commands must define its effects on the receiving game.
Definition: gameendedcommand.cpp:27
signed int TimerMSec
Definition: timer.h:22
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
virtual Commands commandType() const override
Every Command must specify its type.
Definition: gameendedcommand.h:22
The AbstractCommand class defines the interface that every command has to implement.
Definition: abstractcommand.h:23