-
Notifications
You must be signed in to change notification settings - Fork 716
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(simultaneous-moves): add option to long form move to ignore stal…
…e stateID (close #828) (#832) * fix github install * Update package.json Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * remove unused script * Revert "Update package.json" This reverts commit 62e98e7. * feat(stale-state-move): add option to long form move to ignore stale 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. * Rename ignoreStaleState option to ignoreStaleStateID. * Undo merge with nicolodavis/fix-github-install. * Refactoring usage of getMove on master.ts. Improved unit test for simultaneous moves. * Implemented class InMemoryAsync to test simultaneous moves. * Using PQueue library to create a per-match queue for actions sent to SocketIO onUpdate calls. * Update src/server/transport/socketio.ts Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * Update src/server/transport/socketio.ts Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * Implemented all base methods on InMemoryAsync class. * Refactor createMatchQueue method to getMatchQueue. * Fix to install boardgame.io from GitHub. * Export InMemory in server/db. * Fix comment text. * Improve error logging messages on Master. * Add 300 miliseconds interval to PQueue for sync storages. * Working on simultaneous moves tests with SocketIO server and client. * Skipping failing test just to push he code. * Skipping failing test just to push he code. * Undoing changes on server and socketio files. * Working on simultaneous moves tests using mocks. * Fix unit test for simultaneous moves. * Adjust error messages on Master. * Undo changes to fix GitHub install. * Separating simultaneous moves tests to use sync and async storages. Reducing PQueue interval to 50ms. It needs to be tested in real world, * Add logging messages for InMemory setState and setMetatada methods. * Cleaning code removing PQueue interval, which wasn't needed. Fixing unit tests. * Removing unnecessary mock for IsSynchronous. * Fixing unit tests and doing adjustments from code review. * test(socketio): Remove unused import * test: Randomise InMemoryAsync interval * style(master): Revert style change * docs(Game): Document `ignoreStaleStateID` move option Co-authored-by: Nicolo Davis <nicolodavis@gmail.com> Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> Co-authored-by: Evandro Abu Kamel <evandro.costa@maxmilhas.com.br>
- Loading branch information
1 parent
aca811b
commit 6c4e94f
Showing
10 changed files
with
721 additions
and
37 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.