diff options
Diffstat (limited to 'dealconvert/formats')
-rw-r--r-- | dealconvert/formats/__init__.py | 4 | ||||
-rw-r--r-- | dealconvert/formats/pbn.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/dealconvert/formats/__init__.py b/dealconvert/formats/__init__.py index 9ac48e3..1d8b460 100644 --- a/dealconvert/formats/__init__.py +++ b/dealconvert/formats/__init__.py @@ -4,9 +4,9 @@ import glob class DealFormat(object): cards = 'AKQJT98765432' - def __init__(self, interactive=True, jfr_only=False): + def __init__(self, interactive=True, **kwargs): self.interactive = interactive - self.jfr_only = jfr_only + self.options = kwargs def parse(self, input_file): with open(input_file, 'rb') as content: diff --git a/dealconvert/formats/pbn.py b/dealconvert/formats/pbn.py index 04db8a2..6108f4b 100644 --- a/dealconvert/formats/pbn.py +++ b/dealconvert/formats/pbn.py @@ -144,8 +144,8 @@ class PBNFormat(DealFormat): dd_board = PBNBoard(lines) dd_table = DDTable(dd_board).get_dd_table(self.interactive) dd_contract = ParScore(dd_board).get_par_contract(dd_table) - dd_board.save_dd_table(dd_table, jfr_only=self.jfr_only) - dd_board.save_par_contract(dd_contract, jfr_only=self.jfr_only) + dd_board.save_dd_table(dd_table, jfr_only=self.options['jfr_only']) + dd_board.save_par_contract(dd_contract, jfr_only=self.options['jfr_only']) lines = [field.raw_field for field in dd_board.fields] except Exception as e: warnings.warn('unable to determine double-dummy data: %s' % e) |