From 544480095f745660df8d157d36370a469ad70ae8 Mon Sep 17 00:00:00 2001 From: Henri Lotze Date: Wed, 19 Jan 2022 11:00:32 +0100 Subject: [PATCH 1/2] Fix #42 by adding previously missing newline after carriage returns --- algobattle/battle_wrappers/averaged.py | 4 ++-- algobattle/battle_wrappers/iterated.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/algobattle/battle_wrappers/averaged.py b/algobattle/battle_wrappers/averaged.py index 0736b9a4..202db23a 100644 --- a/algobattle/battle_wrappers/averaged.py +++ b/algobattle/battle_wrappers/averaged.py @@ -152,8 +152,8 @@ def format_as_utf8(self, match_data: dict) -> str: + '║{:>6.2f}║{:>6d}║{:>3d}/{:>3d} ║'.format(latest_approx_ratio, match_data['approx_inst_size'], curr_iter, - match_data['approx_iters']) + '\r' - formatted_output_string += '\n╚═════════╩═════════╩' \ + match_data['approx_iters']) + '\r\n' + formatted_output_string += '╚═════════╩═════════╩' \ + ''.join(['══════╩' for i in range(match_data['rounds'])]) \ + '══════╩══════╩════════╝' + '\n\r' diff --git a/algobattle/battle_wrappers/iterated.py b/algobattle/battle_wrappers/iterated.py index 82de48b0..0b44749f 100644 --- a/algobattle/battle_wrappers/iterated.py +++ b/algobattle/battle_wrappers/iterated.py @@ -173,8 +173,8 @@ def format_as_utf8(self, match_data: dict) -> str: formatted_output_string += '║{:>9s}║{:>9s}'.format(pair[0], pair[1]) \ + ''.join(['║{:>6d}'.format(match_data[pair][i]['solved']) for i in range(match_data['rounds'])]) \ - + '║{:>6d}║{:>6d}║'.format(match_data[pair][curr_round]['cap'], avg) + '\r' - formatted_output_string += '\n╚═════════╩═════════╩' \ + + '║{:>6d}║{:>6d}║'.format(match_data[pair][curr_round]['cap'], avg) + '\r\n' + formatted_output_string += '╚═════════╩═════════╩' \ + ''.join(['══════╩' for i in range(match_data['rounds'])]) \ + '══════╩══════╝' + '\n\r' From 2095e3bdbe756f5539cd5418ec0e7e6adc8be11f Mon Sep 17 00:00:00 2001 From: Henri Lotze Date: Thu, 20 Jan 2022 12:55:52 +0100 Subject: [PATCH 2/2] Increment version number --- algobattle/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/algobattle/__init__.py b/algobattle/__init__.py index a576ee0f..390860f1 100644 --- a/algobattle/__init__.py +++ b/algobattle/__init__.py @@ -1,4 +1,4 @@ __title__ = 'Algorithmic Battle' -__version__ = '3.0.0' +__version__ = '3.0.1' __author__ = 'Jan Dreier, Henri Lotze' __license__ = 'MIT'