X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=plomrogue-server.py;h=eb6ace2696c0d386b1fbab7aa681056ad1af058d;hb=774bf6e5e1e506dd8eca699098babaf56c1a8538;hp=a8b48b3db34a6c5027c6ff1e752df1eb0e0f556d;hpb=45ebb121ae376b3b6d624590c3a76abd904e1b43;p=plomrogue diff --git a/plomrogue-server.py b/plomrogue-server.py index a8b48b3..eb6ace2 100755 --- a/plomrogue-server.py +++ b/plomrogue-server.py @@ -9,14 +9,16 @@ import time def setup_server_io(io_db): """Fill IO files DB with proper file( path)s. Write process IO test string. - Decide file paths. Ensure IO files directory at server/. Remove any old in - file if found. Set up new in file (io_db["file_in"]) for reading at - io_db["path_in"], and new out file (io_db["file_out"]) for writing at - io_db["path_out"]. Start out file with process hash line of format PID + - " " + floated UNIX time (io_db["teststring"]). Run detect_atomic_leftover - on io_db["path_record"] and io_db["path_save"]. + Set io_db["kicked_by_rival"] to False. Decide file paths. Ensure IO files + directory at server/. Remove any old in file if found. Set up new in file + (io_db["file_in"]) for reading at io_db["path_in"], and new out file + (io_db["file_out"]) for writing at io_db["path_out"]. Start out file with + process hash line of format PID + " " + floated UNIX time + (io_db["teststring"]). Run detect_atomic_leftover on io_db["path_record"] + and io_db["path_save"]. """ io_dir = "server/" + io_db["kicked_by_rival"] = False io_db["path_in"] = io_dir + "in" io_db["path_out"] = io_dir + "out" io_db["path_worldstate"] = io_dir + "worldstate" @@ -162,7 +164,6 @@ try: server_test(io_db) obey(file.readline().rstrip(), io_db, prefix + str(line_n)) line_n = line_n + 1 - world_db["turn"] = world_db["turn"] + 1 while io_loop(): server_test(io_db) obey(file.readline().rstrip(), io_db, prefix + str(line_n))