diff options
Diffstat (limited to 'web/web_main.c')
-rw-r--r-- | web/web_main.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/web/web_main.c b/web/web_main.c new file mode 100644 index 0000000..42535aa --- /dev/null +++ b/web/web_main.c @@ -0,0 +1,31 @@ +#include "web_control.h" +#include "web_opts.h" +#include "web_prompt.h" +#include "web_svg.h" + +#include "comp.h" + +#include <stdlib.h> +#include <time.h> + +#include <emscripten/emscripten.h> + +EMSCRIPTEN_KEEPALIVE +void init() +{ + srand(time(NULL)); + init_board(); + svg_draw_board(); + + EM_ASM(readOpts()); + EM_ASM({updateDelay($0)}, delay_ms); + EM_ASM({updateStdev($0)}, horizontal_stdev); + + set_prompt_mode(PM_VISIT); + handle_next(); +} + +int main() +{ + EM_ASM(boatAfloat()); +} |