-
Notifications
You must be signed in to change notification settings - Fork 70
[WIP] Improved network protocol (more stable on slow clients) #890
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
Merged
Merged
Changes from 23 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
6a8b9b6
ENH: Add default_zmq_context
Debilski 81006a4
BF: Do not crash tk when no team name is passed
Debilski 8646bf7
BF: Keyboard interrupt should not cause a freeze
Debilski 05aec98
ENH: Better bot repr
Debilski bba5358
RF: New network/subprocess protocol
Debilski 037f20f
BF: Fix remote test
Debilski 7397f86
RF: New error handling mechanism, errors renamed to timeouts
Debilski c949728
BF: Playing with bad rounds or no food should trigger FAILURE
Debilski 19bf9c1
RF: Use game_phase in prepare_bot_state
Debilski ed66c4a
RF: Rename allow_exceptions → raise_bot_exceptions
Debilski 1c523b4
ENH: When a UI controller exits in init, we go into failure mode
Debilski 289a2b8
ENH: Rename Errors to Timeouts in Tk
Debilski 5157fb7
RF: Remove timeout handling from apply_move
Debilski c57f72b
RF: Use more game_phases
Debilski f4b557e
BF: Fix timeout counting
Debilski 78375e4
TST: Test that long team names are detected
Debilski cf17dbe
UI: Show failure
Debilski b42f710
RF: Cleanup superfluous functions
Debilski 0f7cbcc
RF: Raise (if needed) from add_fatal_error
Debilski 1941050
RF: Print the error before potential exceptions are raised
Debilski ac9ad35
TST: Add network protocol test
Debilski e7e3dec
ENH: Add 60*60 second timeout to pelita_player
Debilski 6925dc0
ENH: Reorganise remote Team classes
Debilski 4595c22
ENH: Remove xfail
Debilski a26625c
TST: Add test for --no-timeout cli option
Debilski 0455642
BF: Fix --no-timeout
Debilski d4ce537
BF: Fix default_zmq_context
Debilski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,16 @@ | ||
|
|
||
| class FatalException(Exception): # TODO rename to FatalGameException etc | ||
| pass | ||
|
|
||
| class NonFatalException(Exception): | ||
| class NoFoodWarning(Warning): | ||
| """ Warns when a layout has no food during setup. """ | ||
| pass | ||
|
|
||
| class PlayerTimeout(NonFatalException): | ||
| class GameOverError(Exception): | ||
| """ raised from game when match is game over """ | ||
| pass | ||
|
|
||
| class PlayerDisconnected(FatalException): | ||
| # unsure, if PlayerDisconnected should be fatal in the sense of that the team loses | ||
| # it could simply be a network error for both teams | ||
| # and it would be random who will be punished | ||
| class PelitaBotError(Exception): | ||
| """ Raised when raise_bot_exceptions is turned on """ | ||
| pass | ||
|
|
||
| class NoFoodWarning(Warning): | ||
| """ Warns when a layout has no food during setup. """ | ||
| class PelitaIllegalGameState(Exception): | ||
| """ Raised when there is something wrong with the game state """ | ||
| pass |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Did you mean this?