How hsn723/anime-quiz works
This project is a desktop-based quiz application (specifically targeting the McGill Students Anime Club) built using C# and WPF. Its primary purpose is to allow a Game Master to administer and control quiz games (including managing question sets, teams, and scoring) while providing a separate interface for players. The system is split into several visual components with supporting logic and a file-based database (animequiz.s3db).
Main Components
• UI Layers:
• Game Master UI: Windows such as GameMasterWindow, GameStartPage, BuzzerSetupWindow, HelpWindow, QuestionSetEditor, SettingsWindow, and TeamEditor.
• Player UI: PlayerWindow, QuestionPage, and QuestionSetPage.
• Scoring UI: IndividualScores and TeamScoresView.
• Domain/Business Logic:
• Core classes managing quiz state (CurrentQuestion, CurrentQuestionSet, CurrentTeam) which are found in the Classes folder.
• Controls for quiz interactions (e.g., AbstractQuestionControl, BluetoothBuzzer, MusicControl, Score, ScoringControl, etc.), found under the Controls folder.
• Data Layer:
• Database interface connected via GameDB* files and the animequiz.s3db file representing a SQLite database structure.
• Resources and Config:
• Resources folder providing audio files.
• Configuration and settings files such as app.config and the Properties folder files which include AssemblyInfo, resource settings, etc.
Relationships and Interactions
• UI Components communicate with the underlying business logic to load, process, and display questions, answers, scores, and team data.
• The Game Master UI has controls for starting games, loading question sets (which are created or modified in the Question Set Editor) and configuring game settings.
• The Player UI receives data streamed from the Game Master (e.g., when a question is selected and then revealed).
• Both UIs update and retrieve data from the local database (animequiz.s3db) for persisting scores, teams, and question sets.
• Bluetooth functionality for buzzers is implemented via specific controls (BluetoothBuzzer) which may interact with hardware APIs.
Architectural Patterns and Key Design Principles
• Separation of Concerns: There is a clear division of responsibilities between the UI presentation layer, business logic (classes in the “Classes” directory), and data access layer (database files).
• MVVM (Model-View-ViewModel) or code-behind approach: Given the WPF XAML windows and controls, even if not explicitly MVVM, there is a separation between layout (XAML) and code-behind (.cs files).
• Modular design: The project separates different functional areas (Game Master vs. Player, and their respective editors) into distinct folders.
• Extensibility: The README mentions the potential for additional features (like testing for Bluetooth serial or playback options), so the architecture must be designed keeping extensibility in mind.
Putting It All Together
– Do not forget to note additional interactions such as the Bluetooth buzzer control’s communications with external hardware.