You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@ilivss do you really need to invoke another move or is it rather the code path of a move. Semantically a move is something a player does actively so it doesn't really make sense to playback a move programatically in most cases.
However the type Move designates just a regular function you can call. So you could can just call the spawn function from inside the if block. (it won't count as a separate move for that matter, though, but just run the function body)
Just be aware that due to the use of immer you might have inner mutation of your gamestate. So the order of invocations matters. After your call tree is done there will be an immutable state update with all the changes you've made, handled by boardgame.io.
Hi,
I'm trying to invoke a move automatically from another move. For example I have the following moves:
however I can find any documentation on this nor any function that I could use to dispatch a move object.
The text was updated successfully, but these errors were encountered: