summaryrefslogtreecommitdiff
path: root/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game.cpp')
-rw-r--r--game.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/game.cpp b/game.cpp
index d198720..42e8b53 100644
--- a/game.cpp
+++ b/game.cpp
@@ -10,12 +10,19 @@ Game* Game::game = NULL;
Game::Game() : socket(io_service) {
scene = new Scene();
+
+ scene->lua->set_say_func(boost::bind(&Game::say, this, _1));
}
Game::~Game() {
delete scene;
}
+void Game::say(const std::string msg) {
+ message::Message m(msg);
+ m.send(socket);
+}
+
void Game::run(const std::string host, const unsigned int port) {
run(host, boost::lexical_cast<std::string>(port));
}