Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support move limits in setActivePlayers #452

Merged
merged 18 commits into from
Sep 15, 2019
Merged

feat: Support move limits in setActivePlayers #452

merged 18 commits into from
Sep 15, 2019

Conversation

delucis
Copy link
Member

@delucis delucis commented Sep 10, 2019

Continuing work towards #445

  • Support moveLimit option in setActivePlayers, storing result in ctx._activePlayersMoveLimit

  • Track moves by currently active players in ctx._activePlayersNumMoves

  • Reset player counts whenever setActivePlayers is called and when the turn ends

  • End stages when player has reached move limit

  • Remove once option in favour of moveLimit

  • Restore previous move limits and counts when using revert: true

Enables passing a `moveLimit` option to `setActivePlayers` similar in 
API to `setActivePlayers` itself
@delucis delucis changed the title [WIP] feat: Support move limits in stages feat: Support move limits in setActivePlayers Sep 10, 2019
@delucis
Copy link
Member Author

delucis commented Sep 14, 2019

@nicolodavis Let me know if you think anything needs changing here.

I think it's ready to merge, but you might have better ideas for variable naming or more efficient implementations.

@nicolodavis
Copy link
Member

Will take a look soon. A bit busy this weekend, so probably sometime on Monday. Thanks for the great work!

@nicolodavis nicolodavis merged commit ca61bf6 into boardgameio:master Sep 15, 2019
@delucis delucis deleted the delucis/active-players-move-limit branch September 15, 2019 14:01
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.

None yet

2 participants