This commit is contained in:
2025-10-22 23:09:39 +01:00
parent 774fa5ecf3
commit 66f591c6df
2 changed files with 138 additions and 2 deletions
+28
View File
@@ -443,6 +443,34 @@ useGame({
---
## Game Instructions Export
The package exports a structured `gameInfo` object containing complete game documentation:
```typescript
import { gameInfo } from '@vimazing/vim-sudoku';
// Access structured instructions
console.log(gameInfo.name); // "VIM Sudoku"
console.log(gameInfo.controls); // Navigation, editing, deletion, hints, game
console.log(gameInfo.rules); // Cell types, modes, visual feedback
console.log(gameInfo.scoring); // Formula, penalties, multipliers, examples
console.log(gameInfo.gameOver); // Time and hint limit conditions
console.log(gameInfo.hints); // How the hint system works
console.log(gameInfo.objective); // Win condition
```
**Use cases:**
- Render in-game help screens
- Generate tutorials
- Display control reference
- Show scoring breakdown
- Explain game mechanics
All data is fully typed with the `GameInfo` type for type safety.
---
## Example App
A demo application lives under `example/` and consumes the package directly.