Skip to content

4 refactor centralize game logic and constants#7

Merged
MrJacob12 merged 3 commits intomainfrom
4-refactor-centralize-game-logic-and-constants
Mar 10, 2026
Merged

4 refactor centralize game logic and constants#7
MrJacob12 merged 3 commits intomainfrom
4-refactor-centralize-game-logic-and-constants

Conversation

@MrJacob12
Copy link
Contributor

#4 #5

MrJacob12 and others added 3 commits March 10, 2026 13:47
- Create `src/config/gameConfig.ts` to house all game constants, formulas, and balancing values.
- Create `src/types/game.ts` to centralize shared TypeScript interfaces and prevent circular dependencies.
- Implement a unified `calculateCurrentIncome` helper function to standardize active and offline income logic.
- Refactor `gameStore.ts` and UI components (PackOpening, Dimension, Upgrades, etc.) to consume centralized configuration.
- Remove hardcoded values for pack requirements, upgrade costs, sell prices, and card generation weights.
Fix [FIX] Improve type safety and remove any casts
Fixes #5
@MrJacob12 MrJacob12 linked an issue Mar 10, 2026 that may be closed by this pull request
4 tasks
@MrJacob12 MrJacob12 merged commit ffe3e13 into main Mar 10, 2026
1 of 2 checks passed
@MrJacob12 MrJacob12 deleted the 4-refactor-centralize-game-logic-and-constants branch March 10, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFACTOR] Centralize game logic and constants

1 participant