More work on client and server
This commit is contained in:
@@ -33,7 +33,7 @@ public:
|
|||||||
|
|
||||||
static PADDRINFOA find_good_addr(PADDRINFOA addrinfo) {
|
static PADDRINFOA find_good_addr(PADDRINFOA addrinfo) {
|
||||||
for (PADDRINFOA addr = addrinfo; addr != nullptr; addr = addr->ai_next) {
|
for (PADDRINFOA addr = addrinfo; addr != nullptr; addr = addr->ai_next) {
|
||||||
if ((addr->ai_family == AF_INET) || (addr->ai_family == AF_INET6)) {
|
if (addr->ai_family == AF_INET) {
|
||||||
return addr;
|
return addr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include "luaconsole.hpp"
|
#include "luaconsole.hpp"
|
||||||
#include "invocation.hpp"
|
#include "invocation.hpp"
|
||||||
#include "util.hpp"
|
#include "util.hpp"
|
||||||
|
#include "printbuffer.hpp"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
class LpxClient : public DrivenEngine {
|
class LpxClient : public DrivenEngine {
|
||||||
@@ -15,6 +16,7 @@ public:
|
|||||||
InvocationQueue unack_;
|
InvocationQueue unack_;
|
||||||
UniqueChannel channel_;
|
UniqueChannel channel_;
|
||||||
LuaConsole console_;
|
LuaConsole console_;
|
||||||
|
PrintChanneler print_channeler_;
|
||||||
Gui gui_;
|
Gui gui_;
|
||||||
int64_t gui_place_;
|
int64_t gui_place_;
|
||||||
|
|
||||||
@@ -186,6 +188,11 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void change_actor_id(int64_t actor_id) {
|
||||||
|
print_channeler_.reset();
|
||||||
|
actor_id_ = actor_id;
|
||||||
|
}
|
||||||
|
|
||||||
void receive_ack_from_server(StreamBuffer *sb) {
|
void receive_ack_from_server(StreamBuffer *sb) {
|
||||||
// An ack is just a single byte, so there's nothing left to read.
|
// An ack is just a single byte, so there's nothing left to read.
|
||||||
if (unack_.empty()) {
|
if (unack_.empty()) {
|
||||||
@@ -201,7 +208,8 @@ public:
|
|||||||
void receive_diff_from_server(StreamBuffer *sb) {
|
void receive_diff_from_server(StreamBuffer *sb) {
|
||||||
world_to_synchronous();
|
world_to_synchronous();
|
||||||
try {
|
try {
|
||||||
actor_id_ = world_->patch_everything(sb);
|
int nactor = world_->patch_everything(sb);
|
||||||
|
if (nactor != actor_id_) change_actor_id(nactor);
|
||||||
} catch (const StreamEof &seof) {
|
} catch (const StreamEof &seof) {
|
||||||
abandon_server();
|
abandon_server();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -2,25 +2,128 @@
|
|||||||
|
|
||||||
#include "world.hpp"
|
#include "world.hpp"
|
||||||
#include "drivenengine.hpp"
|
#include "drivenengine.hpp"
|
||||||
|
#include "luaconsole.hpp"
|
||||||
|
#include "util.hpp"
|
||||||
|
#include "printbuffer.hpp"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
class ServerClient {
|
class ServerClient {
|
||||||
public:
|
public:
|
||||||
int64_t actor_id_;
|
int64_t actor_id_;
|
||||||
Channel *channel_;
|
UniqueChannel channel_;
|
||||||
UniqueWorld sync_;
|
UniqueWorld sync_;
|
||||||
};
|
};
|
||||||
|
using UniqueServerClient = std::unique_ptr<ServerClient>;
|
||||||
|
using ServerClientVector = std::vector<UniqueServerClient>;
|
||||||
|
|
||||||
class LpxServer : public DrivenEngine {
|
class LpxServer : public DrivenEngine {
|
||||||
public:
|
public:
|
||||||
UniqueWorld master_;
|
UniqueWorld master_;
|
||||||
std::vector<std::unique_ptr<ServerClient>> clients_;
|
LuaConsole console_;
|
||||||
|
ServerClientVector clients_;
|
||||||
|
PrintChanneler print_channeler_;
|
||||||
|
int64_t admin_id_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual void event_init(int argc, char *argv[]) {
|
virtual void event_init(int argc, char *argv[]) {
|
||||||
|
// Create the master world model.
|
||||||
|
master_.reset(new World(util::WORLD_TYPE_MASTER));
|
||||||
|
|
||||||
|
// Create an actor for administrative commands.
|
||||||
|
admin_id_ = master_->create_login_actor();
|
||||||
|
|
||||||
|
// Print out admin ID for debugging purposes.
|
||||||
|
stdostream() << "Admin actor id = " << admin_id_ << std::endl;
|
||||||
|
|
||||||
|
// Enable listening on port 8085.
|
||||||
|
listen_port(8085);
|
||||||
|
|
||||||
|
// Set the console prompt.
|
||||||
|
get_stdio_channel()->set_prompt(console_.get_prompt());
|
||||||
|
}
|
||||||
|
|
||||||
|
void do_lua_command(const util::StringVec &words) {
|
||||||
|
if (words.size() != 2) {
|
||||||
|
stdostream() << "lua command (lua) takes a single string" << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const std::string &exp = words[1];
|
||||||
|
InvocationData dummyresult;
|
||||||
|
Invocation inv(Invocation::KIND_LUA, admin_id_, admin_id_, exp, dummyresult);
|
||||||
|
master_->invoke(inv);
|
||||||
|
}
|
||||||
|
|
||||||
|
void do_syntax_command(const util::StringVec &words) {
|
||||||
|
stdostream() << "Syntax Error: ";
|
||||||
|
for (int i = 1; i < int(words.size()); i++) {
|
||||||
|
stdostream() << words[i] << " ";
|
||||||
|
}
|
||||||
|
stdostream() << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
void do_quit_command(const util::StringVec &words) {
|
||||||
|
if (words.size() != 1) {
|
||||||
|
stdostream() << "quit command takes no arguments" << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
stop_driver();
|
||||||
|
}
|
||||||
|
|
||||||
|
void do_command(const util::StringVec &words) {
|
||||||
|
if (words.empty()) return;
|
||||||
|
else if (words[0] == "lua") do_lua_command(words);
|
||||||
|
else if (words[0] == "syntax") do_syntax_command(words);
|
||||||
|
else if (words[0] == "quit") do_quit_command(words);
|
||||||
|
else {
|
||||||
|
stdostream() << "Unknown command: " << words[0] << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool handle_invocation(ServerClient *sclient) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void event_update() {
|
virtual void event_update() {
|
||||||
|
// Check for keyboard input on stdin.
|
||||||
|
while (true) {
|
||||||
|
std::string line = get_stdio_channel()->in()->readline();
|
||||||
|
if (line == "") break;
|
||||||
|
console_.add(line);
|
||||||
|
get_stdio_channel()->set_prompt(console_.get_prompt());
|
||||||
|
do_command(console_.get_command());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Anything in the administrator printbuffer should go to stdostream.
|
||||||
|
if (print_channeler_.channel(master_->get_printbuffer(admin_id_), stdostream())) {
|
||||||
|
master_->invoke(print_channeler_.invocation(admin_id_));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check for new incoming channels, set up client structures.
|
||||||
|
while (true) {
|
||||||
|
UniqueChannel chan = new_incoming_channel();
|
||||||
|
if (chan == nullptr) break;
|
||||||
|
ServerClient *client = new ServerClient;
|
||||||
|
client->actor_id_ = master_->create_login_actor();
|
||||||
|
client->channel_ = std::move(chan);
|
||||||
|
client->sync_.reset(new World(util::WORLD_TYPE_S_SYNC));
|
||||||
|
client->sync_->create_login_actor();
|
||||||
|
clients_.emplace_back(client);
|
||||||
|
stdostream() << "New client: actor id=" << client->actor_id_ << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Traverse all existing channels, process any communication.
|
||||||
|
ServerClientVector keep;
|
||||||
|
for (UniqueServerClient &client : clients_) {
|
||||||
|
if (client->channel_->closed()) {
|
||||||
|
stdostream() << "Client closed: actor id=" << client->actor_id_ << std::endl;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// Check for received invocations.
|
||||||
|
while (handle_invocation(client.get()));
|
||||||
|
// Transfer the client to the keep vector.
|
||||||
|
keep.emplace_back(std::move(client));
|
||||||
|
}
|
||||||
|
clients_ = std::move(keep);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -97,6 +97,22 @@ void PrintBuffer::patch(StreamBuffer *sb) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool PrintChanneler::channel(const PrintBuffer *printbuffer, std::ostream &ostream) {
|
||||||
|
if (printbuffer == nullptr) return false;
|
||||||
|
if (printbuffer->first_line() > line_) {
|
||||||
|
line_ = printbuffer->first_line();
|
||||||
|
}
|
||||||
|
while (line_ < printbuffer->first_unchecked()) {
|
||||||
|
ostream << printbuffer->nth(line_) << std::endl;
|
||||||
|
line_ += 1;
|
||||||
|
}
|
||||||
|
return line_ > printbuffer->first_line();
|
||||||
|
}
|
||||||
|
|
||||||
|
Invocation PrintChanneler::invocation(int64_t actor_id) {
|
||||||
|
return Invocation(Invocation::KIND_FLUSH_PRINTS, actor_id, actor_id, std::to_string(line_), InvocationData());
|
||||||
|
}
|
||||||
|
|
||||||
LuaDefine(unittests_printbuffer, "c") {
|
LuaDefine(unittests_printbuffer, "c") {
|
||||||
PrintBuffer pbm(util::WORLD_TYPE_MASTER);
|
PrintBuffer pbm(util::WORLD_TYPE_MASTER);
|
||||||
PrintBuffer pbs(util::WORLD_TYPE_S_SYNC);
|
PrintBuffer pbs(util::WORLD_TYPE_S_SYNC);
|
||||||
|
|||||||
@@ -71,9 +71,11 @@
|
|||||||
|
|
||||||
#include "streambuffer.hpp"
|
#include "streambuffer.hpp"
|
||||||
#include "util.hpp"
|
#include "util.hpp"
|
||||||
|
#include "invocation.hpp"
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <ostream>
|
||||||
|
|
||||||
class PrintBuffer {
|
class PrintBuffer {
|
||||||
private:
|
private:
|
||||||
@@ -136,5 +138,25 @@ public:
|
|||||||
|
|
||||||
using UniquePrintBuffer = std::unique_ptr<PrintBuffer>;
|
using UniquePrintBuffer = std::unique_ptr<PrintBuffer>;
|
||||||
|
|
||||||
|
class PrintChanneler {
|
||||||
|
private:
|
||||||
|
int64_t line_;
|
||||||
|
public:
|
||||||
|
PrintChanneler() { line_ = 0; }
|
||||||
|
|
||||||
|
// Reset the print channeler.
|
||||||
|
void reset() { line_ = 0; }
|
||||||
|
|
||||||
|
// Copy any new lines from the printbuffer to the stdostream.
|
||||||
|
// Update the current line number. Return true if the printbuffer
|
||||||
|
// contains any lines that have already been channeled.
|
||||||
|
bool channel(const PrintBuffer *pb, std::ostream &ostream);
|
||||||
|
|
||||||
|
// Generate an invocation that removes unnecessary lines from the
|
||||||
|
// printbuffer.
|
||||||
|
Invocation invocation(int64_t actor_id);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // PRINTBUFFER_HPP
|
#endif // PRINTBUFFER_HPP
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
#include "textgame.hpp"
|
#include "textgame.hpp"
|
||||||
#include "luaconsole.hpp"
|
#include "luaconsole.hpp"
|
||||||
#include "pprint.hpp"
|
#include "pprint.hpp"
|
||||||
|
#include "printbuffer.hpp"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
@@ -23,32 +24,13 @@ private:
|
|||||||
using StringVec = LuaConsole::StringVec;
|
using StringVec = LuaConsole::StringVec;
|
||||||
UniqueWorld world_;
|
UniqueWorld world_;
|
||||||
LuaConsole console_;
|
LuaConsole console_;
|
||||||
|
PrintChanneler print_channeler_;
|
||||||
Gui gui_;
|
Gui gui_;
|
||||||
int64_t gui_place_;
|
int64_t gui_place_;
|
||||||
int64_t actor_id_;
|
int64_t actor_id_;
|
||||||
int64_t printbuffer_line_;
|
|
||||||
|
|
||||||
void do_lua_command(const StringVec &cmd);
|
|
||||||
void do_syntax_command(const StringVec &cmd);
|
|
||||||
void do_view_command(const StringVec &cmd);
|
|
||||||
void do_menu_command(const StringVec &cmd);
|
|
||||||
void do_choose_command(const StringVec &cmd);
|
|
||||||
void do_quit_command(const StringVec &cmd);
|
|
||||||
void do_snapshot_command(const StringVec &cmd);
|
|
||||||
void do_rollback_command(const StringVec &cmd);
|
|
||||||
void do_tick_command(const StringVec &cmd);
|
|
||||||
|
|
||||||
void do_command(const StringVec &exp);
|
void do_lua_command(const StringVec &words) {
|
||||||
|
|
||||||
void check_redirects();
|
|
||||||
void channel_printbuffer();
|
|
||||||
|
|
||||||
public:
|
|
||||||
virtual void event_init(int argc, char *argv[]);
|
|
||||||
virtual void event_update();
|
|
||||||
};
|
|
||||||
|
|
||||||
void TextGame::do_lua_command(const StringVec &words) {
|
|
||||||
assert(world_->stack_is_clear());
|
assert(world_->stack_is_clear());
|
||||||
if (words.size() != 2) {
|
if (words.size() != 2) {
|
||||||
stdostream() << "lua command (lua) takes a single string" << std::endl;
|
stdostream() << "lua command (lua) takes a single string" << std::endl;
|
||||||
@@ -60,7 +42,7 @@ void TextGame::do_lua_command(const StringVec &words) {
|
|||||||
world_->invoke(inv);
|
world_->invoke(inv);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextGame::do_syntax_command(const StringVec &words) {
|
void do_syntax_command(const StringVec &words) {
|
||||||
stdostream() << "Syntax Error: ";
|
stdostream() << "Syntax Error: ";
|
||||||
for (int i = 1; i < int(words.size()); i++) {
|
for (int i = 1; i < int(words.size()); i++) {
|
||||||
stdostream() << words[i] << " ";
|
stdostream() << words[i] << " ";
|
||||||
@@ -68,7 +50,7 @@ void TextGame::do_syntax_command(const StringVec &words) {
|
|||||||
stdostream() << std::endl;
|
stdostream() << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextGame::do_view_command(const StringVec &cmd) {
|
void do_view_command(const StringVec &cmd) {
|
||||||
if (cmd.size() != 1) {
|
if (cmd.size() != 1) {
|
||||||
stdostream() << "v command (view) takes no arguments" << std::endl;
|
stdostream() << "v command (view) takes no arguments" << std::endl;
|
||||||
return;
|
return;
|
||||||
@@ -80,7 +62,7 @@ void TextGame::do_view_command(const StringVec &cmd) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextGame::do_menu_command(const StringVec &cmd) {
|
void do_menu_command(const StringVec &cmd) {
|
||||||
int64_t id;
|
int64_t id;
|
||||||
if (cmd.size() == 1) {
|
if (cmd.size() == 1) {
|
||||||
id = actor_id_;
|
id = actor_id_;
|
||||||
@@ -99,7 +81,7 @@ void TextGame::do_menu_command(const StringVec &cmd) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextGame::do_choose_command(const StringVec &cmd) {
|
void do_choose_command(const StringVec &cmd) {
|
||||||
int64_t index;
|
int64_t index;
|
||||||
if (cmd.size() == 1) {
|
if (cmd.size() == 1) {
|
||||||
index = util::strtoint(cmd[0], -1);
|
index = util::strtoint(cmd[0], -1);
|
||||||
@@ -122,7 +104,7 @@ void TextGame::do_choose_command(const StringVec &cmd) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TextGame::do_snapshot_command(const StringVec &cmd) {
|
void do_snapshot_command(const StringVec &cmd) {
|
||||||
if (cmd.size() != 1) {
|
if (cmd.size() != 1) {
|
||||||
stdostream() << "s command (snapshot) takes no arguments" << std::endl;
|
stdostream() << "s command (snapshot) takes no arguments" << std::endl;
|
||||||
return;
|
return;
|
||||||
@@ -130,7 +112,7 @@ void TextGame::do_snapshot_command(const StringVec &cmd) {
|
|||||||
world_->snapshot();
|
world_->snapshot();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextGame::do_rollback_command(const StringVec &cmd) {
|
void do_rollback_command(const StringVec &cmd) {
|
||||||
if (cmd.size() != 1) {
|
if (cmd.size() != 1) {
|
||||||
stdostream() << "r command (rollback) takes no arguments" << std::endl;
|
stdostream() << "r command (rollback) takes no arguments" << std::endl;
|
||||||
return;
|
return;
|
||||||
@@ -138,7 +120,7 @@ void TextGame::do_rollback_command(const StringVec &cmd) {
|
|||||||
world_->rollback();
|
world_->rollback();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextGame::do_tick_command(const StringVec &cmd) {
|
void do_tick_command(const StringVec &cmd) {
|
||||||
int64_t clock;
|
int64_t clock;
|
||||||
if (cmd.size() == 2) {
|
if (cmd.size() == 2) {
|
||||||
clock = util::strtoint(cmd[1], -1);
|
clock = util::strtoint(cmd[1], -1);
|
||||||
@@ -149,7 +131,7 @@ void TextGame::do_tick_command(const StringVec &cmd) {
|
|||||||
world_->run_scheduled_threads(clock);
|
world_->run_scheduled_threads(clock);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextGame::do_quit_command(const StringVec &cmd) {
|
void do_quit_command(const StringVec &cmd) {
|
||||||
if (cmd.size() != 1) {
|
if (cmd.size() != 1) {
|
||||||
stdostream() << "q command (quit) takes no arguments" << std::endl;
|
stdostream() << "q command (quit) takes no arguments" << std::endl;
|
||||||
return;
|
return;
|
||||||
@@ -157,7 +139,7 @@ void TextGame::do_quit_command(const StringVec &cmd) {
|
|||||||
actor_id_ = 0;
|
actor_id_ = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextGame::do_command(const StringVec &words) {
|
void do_command(const StringVec &words) {
|
||||||
if (words.empty()) return;
|
if (words.empty()) return;
|
||||||
else if (words[0] == "lua") do_lua_command(words);
|
else if (words[0] == "lua") do_lua_command(words);
|
||||||
else if (words[0] == "syntax") do_syntax_command(words);
|
else if (words[0] == "syntax") do_syntax_command(words);
|
||||||
@@ -173,7 +155,7 @@ void TextGame::do_command(const StringVec &words) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextGame::check_redirects() {
|
void check_redirects() {
|
||||||
World::Redirects redir = world_->fetch_redirects();
|
World::Redirects redir = world_->fetch_redirects();
|
||||||
for (const auto &p : redir) {
|
for (const auto &p : redir) {
|
||||||
if (p.first == actor_id_) {
|
if (p.first == actor_id_) {
|
||||||
@@ -184,36 +166,17 @@ void TextGame::check_redirects() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextGame::channel_printbuffer() {
|
void event_init(int argc, char *argv[])
|
||||||
const PrintBuffer *printbuffer = world_->get_printbuffer(actor_id_);
|
|
||||||
if (printbuffer == nullptr) return;
|
|
||||||
if (printbuffer->first_line() > printbuffer_line_) {
|
|
||||||
printbuffer_line_ = printbuffer->first_line();
|
|
||||||
}
|
|
||||||
while (printbuffer_line_ < printbuffer->first_unchecked()) {
|
|
||||||
stdostream() << printbuffer->nth(printbuffer_line_) << std::endl;
|
|
||||||
printbuffer_line_ += 1;
|
|
||||||
}
|
|
||||||
if (printbuffer_line_ > printbuffer->first_line()) {
|
|
||||||
InvocationData data;
|
|
||||||
Invocation inv(Invocation::KIND_FLUSH_PRINTS, actor_id_, actor_id_, std::to_string(printbuffer_line_), data);
|
|
||||||
world_->invoke(inv);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void TextGame::event_init(int argc, char *argv[])
|
|
||||||
{
|
{
|
||||||
world_.reset(new World(util::WORLD_TYPE_STANDALONE));
|
world_.reset(new World(util::WORLD_TYPE_STANDALONE));
|
||||||
world_->update_source(get_lua_source());
|
world_->update_source(get_lua_source());
|
||||||
world_->run_unittests();
|
world_->run_unittests();
|
||||||
actor_id_ = world_->create_login_actor();
|
actor_id_ = world_->create_login_actor();
|
||||||
printbuffer_line_ = 0;
|
|
||||||
stdostream() << "Login actor ID: " << actor_id_ << std::endl;
|
stdostream() << "Login actor ID: " << actor_id_ << std::endl;
|
||||||
get_stdio_channel()->set_prompt(console_.get_prompt());
|
get_stdio_channel()->set_prompt(console_.get_prompt());
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextGame::event_update()
|
void event_update()
|
||||||
{
|
{
|
||||||
world_->update_source(get_lua_source());
|
world_->update_source(get_lua_source());
|
||||||
while (true) {
|
while (true) {
|
||||||
@@ -222,7 +185,9 @@ void TextGame::event_update()
|
|||||||
console_.add(line);
|
console_.add(line);
|
||||||
get_stdio_channel()->set_prompt(console_.get_prompt());
|
get_stdio_channel()->set_prompt(console_.get_prompt());
|
||||||
do_command(console_.get_command());
|
do_command(console_.get_command());
|
||||||
channel_printbuffer();
|
if (print_channeler_.channel(world_->get_printbuffer(actor_id_), stdostream())) {
|
||||||
|
world_->invoke(print_channeler_.invocation(actor_id_));
|
||||||
|
}
|
||||||
check_redirects();
|
check_redirects();
|
||||||
if (actor_id_ == 0) {
|
if (actor_id_ == 0) {
|
||||||
stop_driver();
|
stop_driver();
|
||||||
@@ -230,6 +195,7 @@ void TextGame::event_update()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
UniqueDrivenEngine make_TextGame() {
|
UniqueDrivenEngine make_TextGame() {
|
||||||
return UniqueDrivenEngine(new TextGame);
|
return UniqueDrivenEngine(new TextGame);
|
||||||
|
|||||||
Reference in New Issue
Block a user