Browse Source

Update run.sh

tags/0.1.0
Changli Tang GitHub 2 years ago
parent
commit
e162111264
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 9 deletions
  1. +26
    -9
      dependency/shell/run.sh

+ 26
- 9
dependency/shell/run.sh View File

@@ -2,16 +2,33 @@


nice -10 ./Server/Server --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600 nice -10 ./Server/Server --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600
sleep 5 sleep 5
cd /usr/local/thuai6

for i in {1..5}
for k in {1..2}
do do
j=$((i - 1))
if [-f "./python/player$i.py"]; then
nice -0 python3 ./python/player$i.py -I 127.0.0.1 -P 8888 -p $j
elif [-f "./capi$i"]; then
nice -0 ./capi$i -I 127.0.0.1 -P 8888 -p $j
pushd /usr/local/team$k
if [ $k -eq 1 ]; then
for i in {1..4}
do
j=$((i - 1))
if [-f "./python/player$i.py"]; then
nice -0 python3 ./python/player$i.py -I 127.0.0.1 -P 8888 -p $j
elif [-f "./capi$i"]; then
nice -0 ./capi$i -I 127.0.0.1 -P 8888 -p $j
else
echo "ERROR. $i is not found."
fi
done
else else
echo "ERROR. $i is not found."
for i in {5..5}
do
j=$((i - 1))
if [-f "./python/player$i.py"]; then
nice -0 python3 ./python/player$i.py -I 127.0.0.1 -P 8888 -p $j
elif [-f "./capi$i"]; then
nice -0 ./capi$i -I 127.0.0.1 -P 8888 -p $j
else
echo "ERROR. $i is not found."
fi
done
fi fi
popd
done done

Loading…
Cancel
Save