Files

Bridge Suite uses two files: INxxx.txt for the list of the boards to play as input file, and OUTxxx.txt where their results and bidding sequences are added, as output file

File names

The file name, in addition to the root IN and OUT is greated by the concatenation of the Pair, Table or Board set number. In front to the Table and Board set number a T or B, respectively, is added.

E.g. the full file names are

IN_1.txt  IN_2.txt  IN_101.txt  IN_102.txt

and

OUT_1.txt  OUT_2.txt  OUT_101.txt  OUT_102.txt

for Pair 1, 2, 101 and 102, respectively

and

IN_T1.txt  IN_T2.txt  IN_B1.txt,  IN_B4.txt, and the same for files OUT

for Tables 1 and 2 and Board set 1,2,3 and 4,5,6 respectively.

For Board number the number of the first board of the set per turn is used. In the above example we have 3 boards per turn.

 

Where are the files stored

If, as by default, the Cloud Dropbox is used, the files are in the folder, set in Preferences, starting from Dropbox root. Their content is automatically synchronized between the tournament PC and all tablets. 

If instead the SDCARD preference is selected, the file folder is in the SDCARD memory root.

If Dropbox is not used, it is a task of tournament manager saving and reading the files to and from the tablet SDCARD..

File format

CSV format is used, i.e. strings separated by commas and new lines.

File IN

IN file record fields are

table, board, NS pair, EW pair, dealer, NS vulnerable , EW vulnerabile

for instance, the IN file on the tablet/Smartphone used by pair 2 (IN_2.txt) is:

3,1,2,4,N,false,false
3,2,2,4,E,true,false
3,3,2,4,S,false,true
2,19,2,6,S,false,true
2,20,2,6,W,true,true
2,21,2,6,N,true,false
4,13,2,3,N,true,true
4,14,2,3,E,false,false
4,15,2,3,S,true,false

N.B.:  The above example is from an Howell tournament where pair 2 plays both as NE and as EW, but in IN_2 file there are only the hands where they play NS, otherwise the same hand would be present twice in the IN files of two pairs. This is a practical rule but is not a constraint of the App that makes no control of the hand sequence.

Should we put all hands played by a pair into its IN file (regardless of NS or EW position), each time two pairs (e.g. pair 2 and 4 for hand 1) should decide who records that result inside the OUT file (i.e. OUT_2 or OUT_4). Should both pairs record the result, no big harm, if they record the same result, of course. 

 

As you see, being an Howell tournament, pair 2 playes both in NS and in EW

While the input file on a table fixed on table 2 (IN_T2.txt) is

2,10,6,3,E,true,true
2,11,6,3,S,false,false
2,12,6,3,W,true,false
2,13,7,4,N,true,true
2,14,7,4,E,false,false
2,15,7,4,S,true,false
2,16,1,5,W,false,true
2,17,1,5,N,false,false
2,18,1,5,E,true,false
2,19,2,6,S,false,true
2,20,2,6,W,true,true
2,21,2,6,N,true,false
2,1,3,7,N,false,false
2,2,3,7,E,true,false
2,3,3,7,S,false,true
2,4,4,1,W,true,true
2,5,4,1,N,true,false
2,6,4,1,E,false,true
2,7,5,2,S,true,true
2,8,5,2,W,false,false
2,9,5,2,N,false,true

File OUT 

OUT file record fields are those of the input file plus:

played contract, plus or minus tricks, by whom, leading card, NS result, and the bidding sequence composed of bid and time interval in milliseconds (the first bid has time interval 0 by default). A + next to a bidding means that it was alerted.

For instance, the first three deals of the table 1 above produce this OUT file:

1,1,1,101,N,false,false,2♡,+1,W,J♤,-140,1♤,0,X,6434,PASS,3212,2♡,5435,PASS,2411,PASS,2434,PASS,3210

1,2,1,110,E,true,false,3NT,-1,E,A♧,50,1NT,0,PASS,2421,2♧,3211,PASS,2090,2♢,3121,PASS,2109,2NT,4532,PASS,2019,3NT,6437,PASS,2033,PASS,2010,PASS,2100

1,3,1,109,S,false,true,All Pass,,,,,PASS,0,PASS,2121,PASS,2310,PASS,5321

Please note that the third deal ended with All Pass

Moreover at the head of OUT files there is this row:

Latest nn  AndroidId xxxxxxxxxxxxxxxxxxxx

nn is the number of the latest played hand, so that when you use the Continue! button in Home Page, the next hand is shown.

xxxxxxxxxxxxxxxxxxxx is an unique identifier of the used tablet/smartphone. It can help to avoid frauds during a tournament,

File OUT crypted

OUT files can be encrypted or clear text, based on To encrypt Preference.

Non encrypted files end with .txt (e.g. OUT_1.txt), while encrypted  files end with _E.txt (e.g. OUT_1_E.txt).

Encryption is done with

  • Java class chipher
  • AES algorithm
  • 128 bit key created by repeating the Secret Key four times
  • Base64 encode

To decrypt a file is hence necessary to

  • Base64 decode
  • decrypt with AES algorithm and the same key