summaryrefslogtreecommitdiff
path: root/web/web_main.c
blob: 42535aa7a5332b9332fd33cecb04f240df59cd10 (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
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());
}