From 87bbdcdd4b6ff69e1228bc0c7bf018f974bc40e7 Mon Sep 17 00:00:00 2001 From: Supergecki <46622920+Supergecki@users.noreply.github.com> Date: Wed, 27 Mar 2024 12:00:53 +0100 Subject: [PATCH 1/4] Update run_seekers.py Update config file dependency in run_seekers.py. --- run_seekers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run_seekers.py b/run_seekers.py index 9d1ade9..fd275e4 100644 --- a/run_seekers.py +++ b/run_seekers.py @@ -33,8 +33,8 @@ def main(): parser.add_argument("--debug", action="store_true", help="Enable debug mode. This will enable debug drawing.") parser.add_argument("-address", "-a", type=str, default="localhost:7777", help="Address of the server. (default: localhost:7777)") - parser.add_argument("-config", "-c", type=str, default="default_config.ini", - help="Path to the config file. (default: default_config.ini)") + parser.add_argument("-config", "-c", type=str, default="config.ini", + help="Path to the config file. (default: config.ini)") parser.add_argument("-config-override", "-co", action="append", help="Override a config option. Use the form option=value, e.g. global.seed=43.") parser.add_argument("-loglevel", "-log", "-l", type=str, default="INFO", From ac6741e087be519e2e08a6030ef23529c96200ae Mon Sep 17 00:00:00 2001 From: Supergecki <46622920+Supergecki@users.noreply.github.com> Date: Wed, 27 Mar 2024 12:06:36 +0100 Subject: [PATCH 2/4] Update test_seekers.py Updated the hard-coded dependencies for the config.ini --- seekers/tests/test_seekers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/seekers/tests/test_seekers.py b/seekers/tests/test_seekers.py index 7d3fe10..c88672e 100644 --- a/seekers/tests/test_seekers.py +++ b/seekers/tests/test_seekers.py @@ -9,7 +9,7 @@ class TestSeekers(unittest.TestCase): def test_seekers(self): """Test that a SeekersGame can be created and run without errors.""" - config = Config.from_filepath("default_config.ini") + config = Config.from_filepath("config.ini") config.global_playtime = 200 config.global_speed = 20 @@ -68,7 +68,7 @@ def start_grpc_client(filepath: str, address: str, joined_event: threading.Event def grpc_game(playtime: int, speed: int, players: int, seed: int, filepaths: list[str], address: str = "localhost:7778") -> dict[str, int]: - config = Config.from_filepath("default_config.ini") + config = Config.from_filepath("config.ini") config.global_fps = 1000 config.global_playtime = playtime @@ -106,7 +106,7 @@ def grpc_game(playtime: int, speed: int, players: int, seed: int, filepaths: lis def nogrpc_game(playtime: int, speed: int, players: int, seed: int, filepaths: list[str]) -> dict[str, int]: - config = Config.from_filepath("default_config.ini") + config = Config.from_filepath("config.ini") config.global_fps = 1000 config.global_wait_for_players = True From 2c3bd4d3a916a853bdbf8b0fc9d4642b42f4bcab Mon Sep 17 00:00:00 2001 From: Supergecki <46622920+Supergecki@users.noreply.github.com> Date: Wed, 27 Mar 2024 12:07:41 +0100 Subject: [PATCH 3/4] Rename default_config.ini to config.ini --- default_config.ini => config.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename default_config.ini => config.ini (98%) diff --git a/default_config.ini b/config.ini similarity index 98% rename from default_config.ini rename to config.ini index 8e89104..c798604 100644 --- a/default_config.ini +++ b/config.ini @@ -59,4 +59,4 @@ thrust=0.1 # center - the center of the map # player// - the specified seeker of the specified player # goal/ - the specified goal -relative-drawing-to=center \ No newline at end of file +relative-drawing-to=center From a3bbbd409622020b1fe280ebdff3dcd2569e518c Mon Sep 17 00:00:00 2001 From: Supergecki <46622920+Supergecki@users.noreply.github.com> Date: Wed, 27 Mar 2024 12:09:01 +0100 Subject: [PATCH 4/4] Update freeze.sh Update dependency of freeze.sh to match the new config file name --- freeze.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freeze.sh b/freeze.sh index 4551c56..8911574 100644 --- a/freeze.sh +++ b/freeze.sh @@ -10,7 +10,7 @@ build() { echo "Building projekt ..." pip install -r requirements.txt pip install cx_Freeze - cxfreeze -c run_seekers.py --target-dir dist --include-files default_config.ini + cxfreeze -c run_seekers.py --target-dir dist --include-files config.ini } start() {