3#include <tt/world/Signature.h>
4#include <tt/world/Assignment.h>
45 const std::string&
getCode()
const;
64 bool operator==(
const State& rhs)
const;
66 friend void from_json(
const nlohmann::json& j, State& obj);
67 friend void to_json(nlohmann::json& j,
const State& obj);
68 friend std::ostream&
operator<<(std::ostream& os,
const State& a);
71 std::string description;
75 std::vector<std::unique_ptr<Assignment>> assignments;
77 mutable std::vector<const Assignment *> assignmentsPtrs;
80 void from_json(
const nlohmann::json& j,
State& obj);
81 void to_json(nlohmann::json& j,
const State& obj);
A state is an assignment of values to each variable in a story world.
Definition State.h:18
std::string toString() const
Returns a string representation of this object.
Definition State.cpp:8
const std::string & getDescription() const
Returns a human-readable natural language description of the object.
Definition State.cpp:19
const Value * get(const Variable *variable) const
Returns the value assigned to the given variable, or nullptr if the variable does not exist in this s...
Definition State.cpp:41
friend std::ostream & operator<<(std::ostream &os, const State &a)
Override stream insertion operator to allow printing the State class.
const std::string & getCode() const
Returns a string of 1's and 0's that uniquely represents this object among other objects of the same ...
Definition State.cpp:24
const std::vector< const Assignment * > & getAssignments() const
Returns an unmodifiable list of assignments of a value to each variable in the state.
Definition State.cpp:29
A value is a logical expression which evaluates to itself.
Definition Value.h:17
A variable is an asset that represents a feature of the story world state that can change.
Definition Variable.h:19
Tandem Tales is a platform that enables short, paired storytelling exercises between two agents over ...
Definition Client.h:22
std::ostream & operator<<(std::ostream &os, const Client &a)
Override stream insertion operator to allow printing the Client class.
Definition Client.cpp:556