You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

run.sh 979 B

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
12345678910111213141516171819202122232425262728293031323334
  1. #!/usr/local
  2. nice -10 ./Server/Server --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600
  3. sleep 5
  4. for k in {1..2}
  5. do
  6. pushd /usr/local/team$k
  7. if [ $k -eq 1 ]; then
  8. for i in {1..4}
  9. do
  10. j=$((i - 1))
  11. if [-f "./python/player$i.py"]; then
  12. nice -0 python3 ./python/player$i.py -I 127.0.0.1 -P 8888 -p $j
  13. elif [-f "./capi$i"]; then
  14. nice -0 ./capi$i -I 127.0.0.1 -P 8888 -p $j
  15. else
  16. echo "ERROR. $i is not found."
  17. fi
  18. done
  19. else
  20. for i in {5..5}
  21. do
  22. j=$((i - 1))
  23. if [-f "./python/player$i.py"]; then
  24. nice -0 python3 ./python/player$i.py -I 127.0.0.1 -P 8888 -p $j
  25. elif [-f "./capi$i"]; then
  26. nice -0 ./capi$i -I 127.0.0.1 -P 8888 -p $j
  27. else
  28. echo "ERROR. $i is not found."
  29. fi
  30. done
  31. fi
  32. popd
  33. done