add option to overwrite color with env param

This commit is contained in:
2024-04-17 13:43:58 +02:00
parent d4b54d48b9
commit 12ac257d19
+3
View File
@@ -75,6 +75,9 @@ class Server:
# TIP: If you open your Battlesnake URL in a browser you should see this data
def _info(self) -> dict:
snake_config = self._read_json_config_or_create()
if os.environ.get("COLOR", None):
snake_config["color"] = os.environ.get("COLOR")
print("INFO Snake:", snake_config)
return snake_config