-
Notifications
You must be signed in to change notification settings - Fork 716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(simultaneous-moves): add option to long form move to ignore stale stateID (close #828) #832
feat(simultaneous-moves): add option to long form move to ignore stale stateID (close #828) #832
Conversation
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
This reverts commit 62e98e7.
…into nicolodavis/fix-github-install
Sync master from original repository
Merge from base repository
…state. Add ignoreStateState option to LongFormMove. Export IsLongFormMove function from game.ts. On master.ts, get the move and check if it does not have the ignoreStateState option thuthy before triggering invalid stateID error.
Nicolodavis/fix GitHub install
…om:evandroabukamel/boardgame.io into evandroabukamel/process-move-stale-stateid
The file |
That’s OK — you don’t need to try to fix the |
Improved unit test for simultaneous moves.
07441a2
to
3572f61
Compare
I've refactored the code for getMove on master.ts and improved the unit test for simultaneous moves. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @evandroabukamel — how’s this going? It looks pretty good to me, we probably just need to include a test using an asynchronous storage (like the AsyncInMemory
) somehow to make sure the queue protects the master from race conditions as expected.
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
…om:evandroabukamel/boardgame.io into evandroabukamel/process-move-stale-stateid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @evandroabukamel, I have a couple of questions regarding the implementation, before I look into some more of the details. Thanks!
Reducing PQueue interval to 50ms. It needs to be tested in real world,
I managed to upload a user-scoped package to NPM and it seem to work fine. |
3097c5d
to
48df54e
Compare
I think the changes in #749 might help, but don’t remember the status there. The |
Fixing unit tests.
…om:evandroabukamel/boardgame.io into evandroabukamel/process-move-stale-stateid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @evandroabukamel — sorry for the wait on going through these and thanks for your patience. Glad to hear the tests with your app went smoothly. Hopefully most of these changes are small details and we can get this merged soon 👍
Merged! Thanks for your persistence @evandroabukamel 🎉 |
Solves issue #828 .
Adding
ignoreStateStateID
option toLongFormMove
.Exporting
IsLongFormMove
function from game.ts.On master.ts, getting the move and checking if it does not have the
ignoreStateStateID
option thuthy before triggering invalid stateID error.Checklist
master
).