TT Client Library 1.0.0
C++ library for Tandem Tales clients.
Loading...
Searching...
No Matches
Update.h
1#pragma once
2
3#include <tt/io/Message.h>
4#include <tt/world/Status.h>
5
6#ifndef UPDATE_H
7#define UPDATE_H
8
9namespace tt {
17 class Update : public Message {
18 public:
27 std::unique_ptr<Status> status;
28
29 Update() {};
30
31 std::string toString() const override;
32
33 std::string type() const override {
34 return "Update";
35 }
36
37 friend void from_json(const nlohmann::json& j, Update& msg);
38 friend void to_json(nlohmann::json& j, const Update& msg);
39 private:
40
41 };
42
43 void from_json(const nlohmann::json& j, Update& msg);
44 void to_json(nlohmann::json& j, const Update& msg);
45}
46
47#endif
Message()
Constructs a message.
Definition Message.h:32
The update message is sent from the server to a client each time a turn is taken and the state of the...
Definition Update.h:17
std::string toString() const override
Returns a string representation of this object.
Definition Update.cpp:6
std::string type() const override
Type used for JSON deserialization.
Definition Update.h:33
std::unique_ptr< Status > status
An object describing the history of the story so far, the current state of the story world,...
Definition Update.h:27
Tandem Tales is a platform that enables short, paired storytelling exercises between two agents over ...
Definition Client.h:22