feat: add runtime gameInfo enrichment with gameOver condition
- Add gameOverCondition to GameManager for runtime tracking - Create enrichGameInfo() function to merge runtime condition with static gameInfo - Add formatGameOverCondition() utility to stringify boolean/function conditions - Returns enriched info with: - condition: formatted string representation - type: 'none' | 'static' | 'function' - Platform can call enrichGameInfo(gameManager) to get complete game configuration - Handles all condition types: undefined, boolean, function - Truncates long function strings at 200 chars
This commit is contained in:
@@ -25,6 +25,7 @@ export function useGame(options: GameOptions, platformHook?: unknown): GameManag
|
||||
hero,
|
||||
renderer,
|
||||
scoreManager,
|
||||
gameOverCondition: gameOver,
|
||||
}
|
||||
|
||||
if (typeof platformHook === 'function') {
|
||||
|
||||
Reference in New Issue
Block a user