split class name and print out with spaces
This commit is contained in:
+2
-2
@@ -6,7 +6,7 @@ from server.SnakeBuilder import SnakeBuilder
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from flask import Flask
|
from flask import Flask
|
||||||
from flask import request
|
from flask import request
|
||||||
import logging, json, os
|
import logging, json, os, re
|
||||||
|
|
||||||
class Server:
|
class Server:
|
||||||
default_snake_config = {"apiversion":"1","author":"","color":"#888888","head":"default","tail":"default"}
|
default_snake_config = {"apiversion":"1","author":"","color":"#888888","head":"default","tail":"default"}
|
||||||
@@ -57,7 +57,7 @@ class Server:
|
|||||||
def run(self, host:str="0.0.0.0", port:str="8000", debug:bool=False):
|
def run(self, host:str="0.0.0.0", port:str="8000", debug:bool=False):
|
||||||
logging.getLogger("werkzeug").setLevel(logging.ERROR)
|
logging.getLogger("werkzeug").setLevel(logging.ERROR)
|
||||||
|
|
||||||
print(f"\nRunning Battlesnake at http://{host}:{port} with the {self.snake_type.replace('Snake', '')} Snake")
|
print(f"\nRunning Battlesnake at http://{host}:{port} with the {' '.join(re.findall('[A-Z][^A-Z]*', self.snake_type))}")
|
||||||
self.app.run(host=host, port=port, debug=debug)
|
self.app.run(host=host, port=port, debug=debug)
|
||||||
|
|
||||||
def _read_json_config_or_create(self):
|
def _read_json_config_or_create(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user