summaryrefslogtreecommitdiff
path: root/web/web_main.c
blob: 50dd318a424f92c0e3a1643893bc5b686a26c682 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#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);

	handle_next();
}

int main()
{
	EM_ASM(boatAfloat());
}