SamTheBlow / grand-strategy-game

A grand strategy game made in Godot.
MIT License
5 stars 4 forks source link

Armies should be independent from Provinces #120

Closed SamTheBlow closed 7 months ago

SamTheBlow commented 7 months ago

Instead of being a child of a Province node, they will be separate. The army will have a reference to the province it's on, which anyone may use.

Knowing what province an army is on seems to be used often for conditional checks in games.

This change will be needed in the future, because an army won't have to be on a province in some cases.

SamTheBlow commented 7 months ago

I forgot to mention that this change requires making the army IDs global beforehand

SamTheBlow commented 7 months ago

Okay, thinking about it, having a node inside of Province that knows what armies are here is way too useful to get rid of.

I do think the Province class itself should be less responsible for army-related things. I'll keep thinking about this