Curious Flow: Second phase's onTurnBegin() is not calling
See original GitHub issueHello, I’d like to use your impressive framework, but I met a strange situation.
Here’s my simplified code: https://github.com/ybbarng/boardgame-io-test/blob/master/src/App.js
In phase1, each turn is automatically ended because endTurn() is called in onTurnBegin(). Because the phase1’s TurnOrder is ONCE, the phase will be moved to next phase2. At this time, onTurnBegin() of phase2 is not calling. I hope someone figure out my mistake or explain why this happens.
Context when it stuck,
The log of console:
phase1 onPhaseBegin
phase1 onTurnBegin 0
phase1 onTurnEnd 0
phase1 onTurnBegin 1
phase1 onTurnEnd 1
phase1 onPhaseEnd
phase2 onPhaseBegin
The debug pannel:
G: {}
ctx: {
"numPlayers": 2,
"turn": 2,
"currentPlayer": "0",
"actionPlayers": [
"0"
],
"currentPlayerMoves": 0,
"playOrder": [
"0",
"1"
],
"playOrderPos": 0,
"stats": {
"turn": {
"numMoves": {},
"allPlayed": false
},
"phase": {
"numMoves": {},
"allPlayed": false
}
},
"allPlayed": false,
"phase": "phase2",
"prevPhase": "phase1",
"allowedMoves": null
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:19 (11 by maintainers)
Top Results From Across the Web
Curious Flow: Second phase's onTurnBegin() is not calling ...
Essentially I'm trying to have a setup phase that happens at the beginning of a 2 player game. Each player can make a...
Read more >How to Handle Multiple Phases in Coriolis Flow Measurement
This webinar will focus on multiphase challenges in allocation measurement such as volatile fluids and changing process and reservoir ...
Read more >How two-phase flow (entrained gas) affects a Coriolis meter
This video is second in a series that explains how entrained gas can affect a Coriolis flowmeter and speak about the errors associated...
Read more >Two Phase Flow Entrained Gas Applications - YouTube
This video is first in the series that explains how Micro Motion® Coriolis meters work in two - phase flow (entrained gas) applications....
Read more >Webinar: Enhancing Coriolis Performance in Entrained Gas ...
Micro Motion Coriolis Flow and Density Measurement ... measurement can provide additional insight into two - phase flows Thanks for watching!
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you ever want to subdivide a turn into multiple “phases”, you should use
stages
.phases
are for general game phases inside which multiple turns are played.stages
are different parts of a single turn.npm run prepack
was what I was missing, thanks.FWIW here is the error I was seeing trying to reference the git branch directly. This was after installing cross-env globally: