bnordli / rftg

Race for the Galaxy AI
173 stars 32 forks source link

Refactor expansion data #27

Closed bnordli closed 7 years ago

bnordli commented 7 years ago

(Follow up from #26.)

I would rather see expansion settings in one struct per expansion, to group related information together. expansion_has_goals(exp) should then be replaced with exp_data[exp].has_goals (for instance).

(Using designated initializers, fields set to FALSE can be omitted.)

Information needed per expansion:

Marsux commented 7 years ago

So it is ok to do this post release? I would be happy to delay.

Also what do you mean by "Using designated initializers, fields set to FALSE can be omitted." ?

bnordli commented 7 years ago

Yes, this is just a reminder to do it at some time.

See http://gcc.gnu.org/onlinedocs//gcc/Designated-Inits.html. Using this, only BOW would need to mention the prestige flag (say).