feat: rng & commands impl & tests

This commit is contained in:
hyper
2026-04-01 17:34:21 +08:00
parent ea337acacb
commit df9698b67b
10 changed files with 835 additions and 221 deletions
+7 -2
View File
@@ -26,7 +26,7 @@ export const GameContext = createModel((root: Context) => {
}
}
}
return {
parts,
regions,
@@ -35,4 +35,9 @@ export const GameContext = createModel((root: Context) => {
popContext,
latestContext,
}
})
})
/** 创建游戏上下文实例 */
export function createGameContext(root: Context = { type: 'game' }) {
return new GameContext(root);
}