1 // For asynchronous computer move search
2 onmessage = function(e
)
8 '/javascripts/base_rules.js',
9 '/javascripts/utils/array.js',
10 '/javascripts/variants/' + e
.data
[1] + '.js');
11 self
.V
= eval(e
.data
[1] + "Rules");
14 const fen
= e
.data
[1];
15 self
.vr
= new VariantRules(fen
);
18 self
.vr
.play(e
.data
[1]);
21 const compMove
= self
.vr
.getComputerMove();
22 postMessage(compMove
);