Skip to content
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

Import games from a QBJ file #251

Open
alopezlago opened this issue Aug 29, 2023 · 1 comment
Open

Import games from a QBJ file #251

alopezlago opened this issue Aug 29, 2023 · 1 comment
Labels
enhancement New feature or request Medium priority Medium priority issues

Comments

@alopezlago
Copy link
Owner

This would take a little bit of work and a lot of testing, but it'd help with tournaments since readers would no longer need to save a copy of the game if they needed to go back and resolve a protest or fix a statkeeping error.

@alopezlago alopezlago added enhancement New feature or request Medium priority Medium priority issues labels Aug 29, 2023
@alopezlago
Copy link
Owner Author

Mapping from QBJ to GameState/events:

collection of match_teams[i].match_players -> GameState.players
collection of match_questions[i].buzzes -> buzz events (correct, wrong, etc.)
collection of match_questions[i].bonus -> BonusAnswerEvent
replacement_tossup_question -> ThrownOutTossupEvent (only one supported)
replacement_bonus_question -> ThrownOutBonusEvent (only one supported)

Substitution events need to be derived from match_teams[i].lineups, with each lineup being diffed against the previous one to create the substitution/add/leave events. It may not be possible to always recover the exact sequence of events: a player leave event and a player join event together looks the same as a player substitution in a QBJ file.

Protests would be lost unless we want to parse the notes section, which is a fragile approach and means that the format used to write protests to a QBJ file cannot change easily in the future.

Note that the packet doesn't travel with the QBJ file, so the import would need the original packet file and the QBJ file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Medium priority Medium priority issues
Projects
None yet
Development

No branches or pull requests

1 participant