Last active
December 4, 2015 00:33
-
-
Save oskar-szulc/1a5b225da4c694ce3736 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <emscripten.h> | |
#include "Game.h" | |
extern "C" | |
{ | |
Game* game; | |
void EMSCRIPTEN_KEEPALIVE start(char* data, int size) | |
{ | |
game = new Game(); | |
char* move = game->input(data); | |
emscripten_worker_respond(move, strlen(move) + 1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment