Skip to content

Conversation

@esbudylin
Copy link
Contributor

@esbudylin esbudylin commented Dec 12, 2025

This PR refactors the game creation code. It decouples the logic for setting up a new game from PlayerSetup into a new class, GameSetup. The reasoning is to make PlayerSetup responsible only for UI logic, while separating the "model" into the GameSetup.

There are also a few smaller improvements:

  • The GlobalSingleton now directly holds the SaveGame instance produced by setting up a game. There is no longer need to dump this data to a temporary JSON file and re-read it after entering the game scene.
  • The "barbarian" flag is now a property of a civilization, not a player. It was done to avoid error-prone string look-ups in the PlayerSetup.

@esbudylin esbudylin changed the title Refacor: Game creation Refactor: Game creation Dec 13, 2025
@esbudylin esbudylin merged commit d600cf6 into Development Dec 17, 2025
3 checks passed
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.

3 participants