TT Client Library 1.0.0
C++ library for Tandem Tales clients.
Loading...
Searching...
No Matches
Start.h
1#pragma once
2
3#include <tt/io/Message.h>
4#include <tt/world/World.h>
5
6#ifndef START_H
7#define START_H
8
9namespace tt {
17 class Start : public Message {
18 public:
26 std::unique_ptr<World> world;
27
28 Start(): role(Role::NONE) {}
29
30 std::string toString() const override;
31
32 std::string type() const override {
33 return "Start";
34 }
35 };
36
37 void from_json(const nlohmann::json& j, Start& msg);
38 void to_json(nlohmann::json& j, const Start& msg);
39}
40
41#endif
Message()
Constructs a message.
Definition Message.h:32
Role role
The role the recipient of this message will have in the session.
Definition Start.h:20
std::string toString() const override
Returns a string representation of this object.
Definition Start.cpp:6
std::string type() const override
Type used for JSON deserialization.
Definition Start.h:32
std::unique_ptr< World > world
The story world in which the session will take place.
Definition Start.h:26
Tandem Tales is a platform that enables short, paired storytelling exercises between two agents over ...
Definition Client.h:22
Role
Represents the two roles in a collaborative storytelling session: the Player, who typically controls ...
Definition Role.h:16
@ NONE
No role, used as a "null" value.
Definition Role.h:32