Difference between revisions of "User:Gregory Gauthier/JAGUARS++ design"

From QBWiki
Jump to navigation Jump to search
(expand)
(→‎Advanced commands: +BUZZERCHECK)
 
(3 intermediate revisions by the same user not shown)
Line 27: Line 27:
 
:Tell the GM that the player who has buzzed in answered incorrectly, but no points are to be deducted (the system will be reset and positions on the same team will be locked out).
 
:Tell the GM that the player who has buzzed in answered incorrectly, but no points are to be deducted (the system will be reset and positions on the same team will be locked out).
 
;NEG
 
;NEG
:Tell the GM that the player who has buzzed in answered incorrectly and should be assessed a neg (the system will be reset positions on the same team will be locked out).
+
:Tell the GM that the player who has buzzed in answered incorrectly and should be assessed a neg (the system will be reset and positions on the same team will be locked out).
;CLEAR
 
:Tell the GM that the buzzer system should be reset without any score adjustment and no change in who is eligible to buzz.  (NOTE:  Should we use this when UNDO is available?)
 
 
;ENDTOSSUP
 
;ENDTOSSUP
 
:Tell the GM that the tossup has ended with no further buzzes.
 
:Tell the GM that the tossup has ended with no further buzzes.
Line 38: Line 36:
  
 
====Advanced commands====
 
====Advanced commands====
 +
;BUZZERCHECK
 +
:Enter the buzzer check state.
 
;PROTEST memo
 
;PROTEST memo
 
:Store a protest about the current question with the given memo.
 
:Store a protest about the current question with the given memo.
Line 44: Line 44:
 
;AMEND
 
;AMEND
 
:Replace one event in the stack with another (TODO: details)
 
:Replace one event in the stack with another (TODO: details)
 +
;UNDO
 +
:Remove the top command on the stack
 +
;REDO
 +
:Add the most recently undone command, provided that no new commands have been introduced.
 
;REPLACE [qno]
 
;REPLACE [qno]
 
:Replace the current question with question qno or the next available question, and forbid the usage of this question again in the match (as, for example, when the moderator accidentally gives away the answer to a live question).  Compare SKIPTO.
 
:Replace the current question with question qno or the next available question, and forbid the usage of this question again in the match (as, for example, when the moderator accidentally gives away the answer to a live question).  Compare SKIPTO.

Latest revision as of 18:00, 16 March 2014

These are design notes for JAGUARS++, a proposed rewrite of JAGUARS in C++. The Qt framework will still be used, but the overall design of the program will change.

The main class will be a GameManager which runs a game by handling commands. It sends responses to the moderator console. It also emits messages that may be of interest to other listeners as well. For example, it may notify of a score change in case a scoreboard window wants to be aware of it. The other key difference from JAGUARS is that the GameManager will store a stack of commands, so that it can intelligently roll back the game in case of moderator error or protest. Derived classes can be tailored to specific formats and kinds of formats; as an example, one inheritance structure might be the following:

  • GameManager
    • TUBonusGameManager
      • ACFGameManager
      • NAQTGameManager
      • IHSAGameManager
    • TossupGameManager
      • HistoryBeeGameManager
      • NTAEGameManager
    • HistoryBowlGameManager

GameManager implementation details

Commands

These are classified into two groups: essential commands (a moderator will likely use these every game) and advanced commands (infrequently-used commands that are still necessary in some games or to ensure that errors can be corrected).

Essential commands

START
Start the game. Parameters (to be determined) will be passed to the GM in this command (for example: what are the teams, who will be sitting in which buzzer position, what packet is going to be used, etc.)
PROCEED
Continue the game after an intermission/
BUZZ pos
Register that the player in the game position has attempted to trigger the lockout system.
RIGHT [points]
Tell the GM that the player who has buzzed in answered correctly. The optional points value indicates the number of points to be awarded; this defaults to a GM-set value.
WRONG
Tell the GM that the player who has buzzed in answered incorrectly, but no points are to be deducted (the system will be reset and positions on the same team will be locked out).
NEG
Tell the GM that the player who has buzzed in answered incorrectly and should be assessed a neg (the system will be reset and positions on the same team will be locked out).
ENDTOSSUP
Tell the GM that the tossup has ended with no further buzzes.
BONUS points
Tell the GM that the team in control of a bonus has received the given number of points.
SUBSTITUTE pos playerid
Remove the player in the given position and replace that position by the player with the given playerid.

Advanced commands

BUZZERCHECK
Enter the buzzer check state.
PROTEST memo
Store a protest about the current question with the given memo.
CONFER pos
Register that the player in the given position was responsible for illegal conferring during a toss-up question. This is different from ruling neg, as the player who conferred receives a -5, not the player who actually buzzed in (see ACF rules E.5 and E.13). (TODO: handle conferring after the question is finished, which does not earn a -5)
AMEND
Replace one event in the stack with another (TODO: details)
UNDO
Remove the top command on the stack
REDO
Add the most recently undone command, provided that no new commands have been introduced.
REPLACE [qno]
Replace the current question with question qno or the next available question, and forbid the usage of this question again in the match (as, for example, when the moderator accidentally gives away the answer to a live question). Compare SKIPTO.
SKIPTO qno
Set aside this question for later use and use in its place question qno (as, for example, when the moderator reads the questions out of order).
LOCKOUT TEAM teamid; LOCKOUT POSITION pos
Lockout the designated position or team from answering this toss-up question.