feat: add initialSnakeSize and initialFoodCount to GameOptions

- New option: initialSnakeSize (defaults to 3)
- New option: initialFoodCount (defaults to 1)
- Snake spawns with configurable size
- Initial food count is configurable
- Example: useGame({ initialSnakeSize: 5, initialFoodCount: 2 })
This commit is contained in:
2025-10-31 00:31:52 +00:00
parent b82bef56e5
commit 2fcfd26429
4 changed files with 19 additions and 10 deletions
+2
View File
@@ -35,6 +35,8 @@ export type GameOptions = {
startingLevel?: number;
foodsPerLevel?: number;
maxLevel?: number;
initialSnakeSize?: number;
initialFoodCount?: number;
};
// ============================================================================