Skip to content

Commit

Permalink
feat: ✨ add debug.py to conveniently add all players
Browse files Browse the repository at this point in the history
  • Loading branch information
sigureling committed Mar 30, 2024
1 parent e69bc20 commit 2096045
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions CAPI/python/debug.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import subprocess
import time
commands = [
"python PyAPI\main.py -I 127.0.0.1 -P 8888 -p 0 -t 0 -o",
"python PyAPI\main.py -I 127.0.0.1 -P 8888 -p 1 -t 0 -o",
"python PyAPI\main.py -I 127.0.0.1 -P 8888 -p 2 -t 0 -o",
"python PyAPI\main.py -I 127.0.0.1 -P 8888 -p 3 -t 0 -o",
"python PyAPI\main.py -I 127.0.0.1 -P 8888 -p 4 -t 0 -o",

"python PyAPI\main.py -I 127.0.0.1 -P 8888 -p 0 -t 1 -o",
"python PyAPI\main.py -I 127.0.0.1 -P 8888 -p 1 -t 1 -o",
"python PyAPI\main.py -I 127.0.0.1 -P 8888 -p 2 -t 1 -o",
"python PyAPI\main.py -I 127.0.0.1 -P 8888 -p 3 -t 1 -o",
"python PyAPI\main.py -I 127.0.0.1 -P 8888 -p 4 -t 1 -o",
]

processes = []
for cmd in commands:
processes.append(subprocess.Popen(cmd, shell=True))
time.sleep(0.5)

for process in processes:
process.wait()

0 comments on commit 2096045

Please sign in to comment.