This commit is contained in:
2026-06-26 20:42:38 -04:00
commit a332e85658
134 changed files with 17288 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
import { getContextPlayerOrThrow, getGameOrThrow } from "data";
import { HandlerFn } from "types";
export const restartGameHandler: HandlerFn = async (ctx) => {
const player = getContextPlayerOrThrow(ctx);
const isHost = player.isHost();
if (!isHost) return;
const game = getGameOrThrow(player.gameId);
await game.restart(ctx);
};