Skip to content

Conversation

@wvpm
Copy link
Contributor

@wvpm wvpm commented Nov 22, 2025

Completely refactored GameActions to use the X-macro pattern.
This allows us to define new game actions and their arguments with 1 line.
For example X(set_ai, country_and_boolean_t) \
The macros generate an enum entry, the switch case, the argument type alias and the method definition.
All you need to do is write the implementation in the cpp.

The game actions implementations have been rewritten and province number vs province index bugs resolved.

@wvpm wvpm added topic:core topic:codestyle enhancement New feature or request bug Something isn't working labels Nov 22, 2025
@wvpm wvpm force-pushed the type_safe_game_actions branch 3 times, most recently from 1ac3110 to 3ebe474 Compare November 22, 2025 19:49
@wvpm wvpm force-pushed the type_safe_game_actions branch from 3ebe474 to 453bd0b Compare November 22, 2025 19:56
@wvpm wvpm merged commit d50d9cf into master Nov 22, 2025
16 checks passed
@wvpm wvpm deleted the type_safe_game_actions branch November 22, 2025 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request topic:codestyle topic:core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants