3d65afde16bebc31f9456f815d1aaf7955b62ef4 diff --git a/content/games/string-calc/spec.ts b/content/games/string-calc/spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..e728b013680d8d78b7806c97b49378a9b428a89b --- /dev/null +++ b/content/games/string-calc/spec.ts @@ -0,0 +1,14 @@ +import type { Game } from "../../../src/games"; + +export const spec: Game = { + id: "string-calc", + steps: [ + { id: "empty" }, + { id: "single-number" }, + { id: "two-numbers" }, + { id: "n-numbers" }, + { id: "newline-separator" }, + { id: "custom-separator" }, + { id: "negatives-throw" }, + ], +}; diff --git a/src/games.ts b/src/games.ts index f02c57f410e2bc06eff4ac45aa9b2bc8ca3ec452..5417fd4894304f1651233af42dcabb8936e82757 100644 --- a/src/games.ts +++ b/src/games.ts @@ -8,5 +8,6 @@ export interface Game { } export async function loadGame(id: string): Promise { - return { id, steps: [] }; + const mod = await import(`../content/games/${id}/spec.ts`); + return mod.spec as Game; }