feat: GameEngineWorker

This commit is contained in:
2024-03-09 16:28:46 +00:00
parent c42a97bb5f
commit e0784a670c
3 changed files with 62 additions and 8 deletions
+11 -2
View File
@@ -1,6 +1,6 @@
import type { RPCLists } from "@sammo/server_util";
import type { ActionRequest, ActionResult } from "./GameEngine.js";
import type { MessagePort } from "node:worker_threads";
export type GameEngineRPCDefs = {
@@ -15,4 +15,13 @@ type WorkerUpdate = {
lastExecuted: string,
}
export type GameEngineMsg = WorkerUpdate;
export type GameEngineMsg = WorkerUpdate;
type WorkerInit = {
type: 'init',
port: MessagePort,
guid: string,
}
export type GameEngineWorkerMsg = WorkerInit;