boardgamers / gaia-engine

Javascript engine for project gaia
MIT License
13 stars 6 forks source link

Made a property counting the effective satellites for a faction. #228

Closed Zevenberge closed 3 years ago

Zevenberge commented 3 years ago

As we are now displaying the satellites on the faction board, it might be convinient to have a reusable function that returns the correct count. For the final scoring, Ivits' space stations were already counted. However, these were not displayed on the faction board. Both can now call the property on player data.

Back-end for https://github.com/boardgamers/gaia-viewer/issues/160

coyotte508 commented 3 years ago

Thank you for your contribution!

The reusable function is already kind of there: player.eventConditionCount(Condition.Satellite) - a bit wordy, I know. It would make sense to create the getter if satellites & space stations played more of a role in the code (maybe with new factions or mechanics), but as it is things are fine.

As a general rule, I try to avoid changing code in the engine to specifically help the viewer, other than exporting classes, enums and functions that are not already exported.