There are three kinds:
Change of the active bout
- if the referee is skipping a bout or returning to an earlier incomplete bout
- send the new bout number
Example:
// Bout 3
currBout=3; currFencer1 = 1; currFencer2 = 3;
Change to the mid-bout score
- if a fencer scores a hit, or the referee corrects a typo
- send all the latest info for both of the fencers in the current bout
Example:
///////////////////////////////////////////////////
// Bout 1
currBout=1; boutStartTimes[1] = '2015-01-26T19:48:00.548Z';
currFencer1 = 1; currFencer2 = 2;
boutStarted[1][2] = true ; boutStarted[2][1] = true ;
boutScores[1][2] = 3; boutScores[2][1] = 0;
Bout is complete
- if the referee confirms the bout is over
- send the final bout scores
Example:
///////////////////////////////////////////////////
///////////////////////////////////////////////////
// Bout 1 over
///////////////////////////////////////////////////
currBout=1; boutStartTimes[1] = '2015-01-26T19:48:00.548Z';
currFencer1 = 1; currFencer2 = 2;
boutScores[1][2] = 4; boutScores[2][1] = 0;
boutVictors[1][2] = 'V'; boutVictors[2][1] = 'L';
boutStarted[1][2] = true ; boutStarted[2][1] = true ;
boutStartTimes[1] = '2015-01-26T19:48:00.548Z';
boutFinishTimes[1] = '2015-01-26T19:48:05.427Z';
/////////// /////////////// ///////////
Typical lengths
Question. What if the current bout is changed to a partially complete bout?
Then the previous logging of the latest score should still exist.
What if it did not write successfully back then?
Gawain (GW) should re-write the most recent score for the part-complete bout which has now returned to being the current bout.