14 class NetworkConnection;
57 virtual QJsonObject
toJson()
const = 0;
Timer::TimerMSec m_timeStamp
Definition: abstractcommand.h:69
Game * m_game
Definition: abstractcommand.h:68
static QVector3D VectorFromJsonObject(QJsonObject jsonObject)
Definition: abstractcommand.cpp:24
void setGame(Game *game)
set the game instance this command should operate on
Definition: abstractcommand.cpp:48
AbstractCommand(Timer::TimerMSec timeStamp)
Definition: abstractcommand.cpp:38
The Game class is the main entry point. It subclasses QQuickItem and handles all communication betwee...
Definition: game.h:36
virtual Commands commandType() const =0
Every Command must specify its type.
Commands
The Commands enum stores all command types with corresponding ID.
Definition: commands.h:9
virtual void doWork()=0
Every Commands must define its effects on the receiving game.
virtual QJsonObject toJson() const =0
Every command must define how its members can be serialized.
signed int TimerMSec
Definition: timer.h:22
Definition: eventhandler.cpp:18
virtual ~AbstractCommand()
Definition: abstractcommand.cpp:44
Timer::TimerMSec timeStamp() const
get the time as counted by the sending game that this command was created and sent ...
Definition: abstractcommand.cpp:54
static QJsonObject VectorToJsonObject(QVector3D vector)
Definition: abstractcommand.cpp:14
The AbstractCommand class defines the interface that every command has to implement.
Definition: abstractcommand.h:23