Hi
I have a game that I need to change the current active player to let interact the opponent (depends on which card is played).
States :
A -> B -> A
(A) : MainPhase : Play a card
(B) : Need to resolve the card with a server change (ex: Draw 5 cards and discard 3, or Draw 3 cards and draw 2 more cards unless the opponent discard a card).
I think I have two options :
1. Add a global variable to remember who is the current player turn to go back to that player's turn after the opponent made is move.
- In this case, when I play the card, I need a gamestate between (A) and (B) only if I switch the current user. Same thing when reswitching between (B) to (A).
2. Use multipleactiveplayer state and only activate the opponent (or the current player). When the opponent finish his move, the game go back to the active player without the need of a global variable.
I would like to know if anyone is thinking for a third options or a best practice with the framework.
Thanks
I have a game that I need to change the current active player to let interact the opponent (depends on which card is played).
States :
A -> B -> A
(A) : MainPhase : Play a card
(B) : Need to resolve the card with a server change (ex: Draw 5 cards and discard 3, or Draw 3 cards and draw 2 more cards unless the opponent discard a card).
I think I have two options :
1. Add a global variable to remember who is the current player turn to go back to that player's turn after the opponent made is move.
- In this case, when I play the card, I need a gamestate between (A) and (B) only if I switch the current user. Same thing when reswitching between (B) to (A).
2. Use multipleactiveplayer state and only activate the opponent (or the current player). When the opponent finish his move, the game go back to the active player without the need of a global variable.
I would like to know if anyone is thinking for a third options or a best practice with the framework.
Thanks