diff options
author | emkael <emkael@tlen.pl> | 2024-01-17 23:23:58 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2024-01-17 23:23:58 +0100 |
commit | 62ee2f3e192a868087f8fc9fd949005aa27add72 (patch) | |
tree | afa913ca130e9177b7ba6eda3716f6a4db77c0a1 /squaredeal/__init__.py | |
parent | 1c4d342e281ab8641486d42d4a916cc2c47c8671 (diff) |
Option to generate reserve sets
Diffstat (limited to 'squaredeal/__init__.py')
-rw-r--r-- | squaredeal/__init__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/squaredeal/__init__.py b/squaredeal/__init__.py index 2d4a020..8faeb71 100644 --- a/squaredeal/__init__.py +++ b/squaredeal/__init__.py @@ -26,8 +26,8 @@ class SquareDealPhase(object): def tostring(self): return ':'.join([str(self.sessions), str(self.boards), self.prefix, self.info or '']) - def _output_file_name(self, session): - return self.prefix.replace('#', str(session)) + def _output_file_name(self, session, reserve=False): + return self.prefix.replace('#', str(session)) + ('reserve' if reserve else '') def generate(self, session, delayed_info, reserve=False): if not SquareDeal.BIGDEALX_PATH: @@ -45,7 +45,7 @@ class SquareDealPhase(object): '-e', session_right, '-e', delayed_info, '-e', reserve_info, - '-p', self._output_file_name(session+1), + '-p', self._output_file_name(session+1, reserve), '-n', str(self.boards)] subprocess.run(args, cwd=os.path.realpath(SquareDeal.BIGDEALX_PATH)) @@ -169,7 +169,7 @@ class SquareDeal(object): phase.s_keys.append(self._generate_session_key()) self.phases.append(phase) - def generate(self, phase, session): + def generate(self, phase, session, reserve=False): phases_to_generate = range(0, len(self.phases)) if phase is None else [phase-1] for phase in phases_to_generate: - self.phases[phase].generate(session, self.delayed_info) + self.phases[phase].generate(session, self.delayed_value, reserve) |