noyciy7037
8136e91a0f
Some checks failed
Extinction Online CI / build (false, 6.0.x, linux-x64) (push) Failing after 3s
Extinction Online CI / build (false, 6.0.x, osx-x64) (push) Failing after 0s
Extinction Online CI / build (false, 6.0.x, win-x64) (push) Failing after 1s
Extinction Online CI / build (true, 6.0.x, linux-x64) (push) Failing after 1s
Extinction Online CI / build (true, 6.0.x, osx-x64) (push) Failing after 1s
Extinction Online CI / build (true, 6.0.x, win-x64) (push) Failing after 1s
25 lines
539 B
JavaScript
25 lines
539 B
JavaScript
"use strict";
|
|
const AsyncFunction = async function () {}.constructor;
|
|
|
|
function discard(target, card) {
|
|
console.log("DIS!CAR!D!");
|
|
postMessage({ type: "game", game: { command: "discard", target: target, card: card } });
|
|
}
|
|
|
|
function selectUser() {
|
|
|
|
}
|
|
|
|
function selectCard(count, target) {
|
|
|
|
}
|
|
|
|
onmessage = e => {
|
|
console.log(e);
|
|
switch (e.data.type) {
|
|
case "run":
|
|
let fun = new AsyncFunction("target", "players", e.data.function);
|
|
fun(e.data.target, e.data.players);
|
|
break;
|
|
}
|
|
} |