Showing posts with label Referee. Show all posts
Showing posts with label Referee. Show all posts

Tuesday, 20 October 2015

Referee architecture

getBout.php - which bout are we on
getScores.php - the latest current score in the current bout
getResults.php - all the latest info at the End of the Bout


gawainDev is the dev area
gawain is the testing area
clubknight-trial is pre-production
trial is (currently) production

Each of them uses their own Organisation lists


Thursday, 8 October 2015

Naive thoughts on how to structure the Referee data for CouchDB

Option 1
A Database per pool
Document per match?
Sub-doc per hit?

Option 2
A Database per match
Document per hit?


For the authorised users database:
A database per user

Wednesday, 7 October 2015

Logging from Referee

Currently, Referee attempts to send any changes in data incrementally, as and when they happen.

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.

Tuesday, 6 October 2015

The Love Swordplay Gawain Suite

Gawain - Gordon's Application Without An Interesting Name

ClubKnight
App for phones that allows device users to enter Fencer names and start Referee for one pool at a time.

Referee
The JS app for recording and displaying scores

Later sophistication
Differing colours for complete and incomplete bouts.

Audience
Referee minus access to Bout and Boutlist, and without storing anything back to the server.

Later sophistication:
Store the bout being viewed

BigScreen
Audience

Later sophistication
Tickertapes of latest events along the bottom of the screen.
Auto slideshow from one pool to another
Additional area for who is about to fence

Directoire
The central app for adding fencers, and altering who fights who, and recording results, and then determining the next round's pools and matches

Later Sophistication
Organising Season championships results
Perhaps as a different Name
Season

AskGawain
All results for all fencers from all fights, searchable