feat: GameEngineController

This commit is contained in:
2024-03-09 16:15:43 +00:00
parent 554588fb42
commit ddfff44c12
4 changed files with 135 additions and 4 deletions
+18
View File
@@ -0,0 +1,18 @@
import type { RPCLists } from "@sammo/server_util";
import type { ActionRequest, ActionResult } from "./GameEngine.js";
export type GameEngineRPCDefs = {
stop: ()=>Promise<void>,
pushAPIAction: (action: ActionRequest)=>Promise<ActionResult>,
pushServerAction: (action: ActionRequest)=>Promise<ActionResult>,
};
type WorkerUpdate = {
type: 'update',
lastExecuted: string,
}
export type GameEngineMsg = WorkerUpdate;