-
Notifications
You must be signed in to change notification settings - Fork 59
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
Add File-based Runtime Loaded peanlty file #83
Merged
brian-brazil
merged 8 commits into
rollerderby:dev
from
official-sounding:bugfix/exp-penalty-codes-real
Jul 5, 2018
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
eb60649
runtime penalty file (initial implementation)
official-sounding 9fa32e3
return to approach 1: deliver penalty codes via WS, but send in JSON …
official-sounding dcd858c
fixes from code review
official-sounding aba1092
switch from jackson-databind to jackson-jr
official-sounding 9745934
convert from LinkedHashMap to LinkedList to pass scoreboard updates t…
official-sounding 43ba0c4
Move "FO" code to front-end only.
official-sounding 191936f
changed presentation of expulsion codes slightly, so its distinct fro…
official-sounding 5258ce1
code review fixes
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"penalties": [ | ||
{ "code": "B", "verbalCues": ["Back Block"]}, | ||
{ "code": "A", "verbalCues": ["High Block"]}, | ||
{ "code": "L", "verbalCues": ["Low Block"]}, | ||
{ "code": "E", "verbalCues": ["Elbows"]}, | ||
{ "code": "F", "verbalCues": ["Forearm"]}, | ||
{ "code": "H", "verbalCues": ["Blocking with the Head"]}, | ||
{ "code": "M", "verbalCues": ["Multi-player Block"]}, | ||
{ "code": "O", "verbalCues": ["Out of Bounds Block"]}, | ||
{ "code": "C", "verbalCues": ["Clockwise Block","Stop Block"]}, | ||
{ "code": "P", "verbalCues": ["Destroying the Pack","OOP Block","Failure to..."]}, | ||
{ "code": "S", "verbalCues": ["Skating OOB"]}, | ||
{ "code": "X", "verbalCues": ["Cutting"]}, | ||
{ "code": "I", "verbalCues": ["Illegal Procedure"]}, | ||
{ "code": "N", "verbalCues": ["Insubordination"]}, | ||
{ "code": "G", "verbalCues": ["Misconduct"]}, | ||
{ "code": "Z", "verbalCues": ["Delay of Game"]} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"penalties": [ | ||
{ "code": "B", "verbalCues": ["Back Block"]}, | ||
{ "code": "A", "verbalCues": ["High Block"]}, | ||
{ "code": "L", "verbalCues": ["Low Block"]}, | ||
{ "code": "E", "verbalCues": ["Leg Block"]}, | ||
{ "code": "F", "verbalCues": ["Forearm"]}, | ||
{ "code": "H", "verbalCues": ["Head Block"]}, | ||
{ "code": "M", "verbalCues": ["Multiplayer"]}, | ||
{ "code": "C", "verbalCues": ["Illegal Contact","Illegal Assist","OOP Block","Early/Late Hit"]}, | ||
{ "code": "D", "verbalCues": ["Direction","Stop Block"]}, | ||
{ "code": "P", "verbalCues": ["Illegal Position","Destruction","Skating OOB","Failure to..."]}, | ||
{ "code": "X", "verbalCues": ["Cut","Illegal Re-Entry"]}, | ||
{ "code": "I", "verbalCues": ["Illegal Procedure","Star Pass Violation","Pass Interference"]}, | ||
{ "code": "N", "verbalCues": ["Interference","Delay Of Game"]}, | ||
{ "code": "G", "verbalCues": ["Misconduct","Insubordination"]} | ||
] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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.
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.
We should use only one json library, there's already another one 4 lines up.
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.
I agree with this wholeheartedly, and my next project is to strip out org.json (both the seemingly unused vendored source code and the jar & uses in the scoreboard. org.json has a weird license and is much lower level than we should really be using.
That said, I think removing org.json is a bit of an undertaking that is outside of the scope of this PR. if you'd prefer me to rewrite PenaltyCodeManager to use org.json constructs for now I can, but I would rather not do that just to undo it in a few weeks.
Also, after doing a bit of reading (and realizing that I had added a 1.3MB dependency), I swapped jackson-databind for jackson-jr, that is much lighter weight but still gives us a much nicer org.json replacement.
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.
It's not the best of libraries alright.
I'd hold off on that until I've finished removing the Game directory, as that's going to have json-y impacts. Does jackson-jr permit building up json by hand like the currently library does?
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.
yes, jackson-jr provides a fluent api that works very similarly to how org.json manipulates json objects.