-
Notifications
You must be signed in to change notification settings - Fork 716
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support move limits in
setActivePlayers
(#452)
* feat: Add `ctx._activePlayersMoveLimit` Enables passing a `moveLimit` option to `setActivePlayers` similar in API to `setActivePlayers` itself * feat: Track moves by active players in `ctx._activePlayersNumMoves` * feat: Remove `ctx._activePlayersOnce` * refactor: Replace uses of `once: true` with `moveLimit: 1` * feat: Remove players from `activePlayers` when they reach move limit * test: Add tests for active player move limits * feat: Restore move limits and counts with `revert: true` * test: Add test for `revert` restoring move limits & counts * fix: Remove stray code from copy/paste * test: Add test for `value` syntax in `moveLimit` * refactor: Don’t set `_activePlayersMoveLimit` if `activePlayers` is null * refactor: Flatten unnecessarily nested logic * refactor: Simplify variable name in `ProcessMove` * feat: Set `_activePlayersMoveLimit` to null when `activePlayers` empties * style: Make active players field ordering consistent * refactor: Use `const` for variable which isn’t changed
- Loading branch information
1 parent
7833734
commit ca61bf6
Showing
4 changed files
with
370 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.