summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2015-09-01 11:58:07 +0200
committeremkael <emkael@tlen.pl>2015-09-01 12:20:11 +0200
commit2aae8272b822f59705220d927385c1ba7ceba50e (patch)
tree7392e759185ac049c147679e96e7e7985d23ec8a
parentb636e3eb6ab2a583e32bb761f2dc0a6f3f9a9db3 (diff)
* round data parsing and checking for board number mapping
-rw-r--r--bidding_data.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/bidding_data.py b/bidding_data.py
index 2c23035..d0573af 100644
--- a/bidding_data.py
+++ b/bidding_data.py
@@ -112,17 +112,20 @@ class JFRBidding:
if re.search(self.__tournament_files_match, f)]
for round_data in self.__lineup_data:
# 13th column has JFR number for the first board
- if len(round_data[12]):
+ if len(round_data) > 12:
jfr_number = int(round_data[12])
- if jfr_number:
+ round_no = int(round_data[2])
+ sector_no = int(round_data[0])
+ table_no = int(round_data[1])
+ if jfr_number and round_no:
# 5th and 6th - actual board number
for board_number in range(int(round_data[5]),
int(round_data[6])+1):
board_string = '_'.join([
str(board_number),
- str(round_data[2]), # round number
- str(round_data[0]), # sector number
- str(round_data[1])]) # table number
+ str(round_no),
+ str(sector_no),
+ str(table_no)])
self.__board_number_mapping[
board_string] = jfr_number + board_number - \
int(round_data[5])