Strategická: Client: - je stdin
This commit is contained in:
parent
616f554549
commit
c2c343697d
1 changed files with 6 additions and 3 deletions
|
@ -41,9 +41,12 @@ def main(args: argparse.Namespace) -> None:
|
|||
min_round = round + 1
|
||||
# if requested, dump state to file instead
|
||||
if args.save_state is not None:
|
||||
with open(args.save_state, "w") as f:
|
||||
json.dump(state, f)
|
||||
return
|
||||
if args.save_state == "-":
|
||||
print(json.dumps(state))
|
||||
else:
|
||||
with open(args.save_state, "w") as f:
|
||||
json.dump(state, f)
|
||||
return
|
||||
|
||||
turn_json = run_subprocess(
|
||||
program, json.dumps(state), state["time_to_response"]
|
||||
|
|
Loading…
Reference in a new issue