-
Notifications
You must be signed in to change notification settings - Fork 707
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test: Add failing test for ANY_ONCE stage default If `ctx._stageOnce` is `true`, `flow.js` fetches keys from the `ctx.stage` object, but when it’s `null` (for example when ANY_ONCE has completed) there are no keys and a TypeError is thrown. * test: Add failing test for OTHERS_ONCE stage default * fix: Set _stageOnce to false once all players have played in stage * feat: Add `ctx.stageCompleted` property Adds a `stageCompleted` property, which is `null` when `once` is not active, `false` when it is, and `true` once all players have played during the stage. * refactor: Rename `stage` API to `activePlayers` `ctx.stage` ⇒ `ctx.activePlayers` `ctx._stageOnce` ⇒ `ctx._activePlayersOnce` `ctx.stageCompleted` ⇒ `ctx.activePlayersDone` `events.setStage` ⇒ `events.setActivePlayers` `turn.setStage` ⇒ `turn.activePlayers` `turn.stages` remains unchanged import { `Stage` ⇒ `ActivePlayers` } from 'boardgame.io/core' Internal: `SetStageEvent` ⇒ `SetActivePlayersEvent` `SetStage` ⇒ `SetActivePlayers` * refactor: `ANY` & `ANY_ONCE` ⇒ `ALL` & `ALL_ONCE` in `ActivePlayers` * fix: Fix comment to match rename * add test for actionPlayersDone * reset activePlayersDone at the start of each turn
- Loading branch information
1 parent
22c45cd
commit b85f61a
Showing
10 changed files
with
217 additions
and
118 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
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
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.